Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Selectable service_description containing spechial character $ produces error #353

Open
IceByteZ opened this issue Sep 12, 2023 · 2 comments
Labels

Comments

@IceByteZ
Copy link

Describe the bug
A selectable service includes a $ in his name, and therefore does not meet the regulations for the regex

NagVis Version
1.9.34

Checkmk Version

2.1.0p32 (CEE)

To Reproduce
Steps to reproduce the behavior:

  1. have a db-host with a service named "service_MSSQL$PROD" in checkmk
  2. open a nagvis-map and add a new service icon
  3. select the db-host as host_name
  4. select the service as service_description
  5. press "Save"

Expected behavior
An icon for the selected service will be created on the map

Actual behavior
The "add service-icon"-dialogue shows an error message:
The attribute has wrong format (Regex: /^[0-9a-zа-яё\p{L}\s:+[]()_.,'-*?!#@=/\]+$/iu)

Screenshots
image

Additional information
If there are multiple instances of a MS SQL-Server on an sigle host, Microsoft adds the instancename to the servicenames and splits both using the $ sign. These services are not renameable and will be included into checkmk using the name "service_DB$INSTANCE". The $ sign works inside of checkmk like a charm but seems to disable usage in NagVis.

@IceByteZ IceByteZ added the bug label Sep 12, 2023
@IceByteZ
Copy link
Author

Finally i searched through all nagvis-files and changed the regex-pattern by myself.
It works for me, but i don't know if it will produce any sideeffects.

File: ./share/nagvis/htdocs/server/core/defines/matches.php
Change the 'MATCH_SERVICE_DESCRIPTION' adding a \$ behind the \*

Perhaps anyone with more knowledge of NagVis can create a mergerequest for this.

@jzuellig
Copy link

jzuellig commented Mar 5, 2024

I had the same issue with thees both chars < >

thanks for your workaround not sexy but working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants