[BUG] Selectable service_description containing spechial character $ produces error
IceByteZ opened this issue · comments
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:
- have a db-host with a service named "service_MSSQL$PROD" in checkmk
- open a nagvis-map and add a new service icon
- select the db-host as host_name
- select the service as service_description
- 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)
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.
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.
I had the same issue with thees both chars <
>
thanks for your workaround not sexy but working