You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was searching for a while, after I realized, that signalilo cannot handle alertnames with spaces correctly.
You can repreduce my problem if you fire an alert with an Alertname like "This is a test".
The regex https://github.com/vshn/signalilo/blob/master/webhook/icinga.go#L28 prevents that anything with a space will be sent to icinga2.
Is there a reason, that there is no string replace to convert spaces to underscores or just properly encode the spaces to the GET method for the Icinga2 API?
I would love to see this fixed, since many people are using spaces in their names.
Thanks and best regards,
Dennis
The text was updated successfully, but these errors were encountered:
Decstasy
changed the title
No spaces in validateServiceName
No spaces in validateServiceName allowed
Jan 19, 2021
One more thing: If the validation failed in the first place, signalilo is still trying to create the service and gets an 500 error from the Icinga2 API, that there is no service name given.
status": "Object could not be created."}]}{"level":"error","msg":"Error in checkOrCreateService for : create /services/signalilo! : 500 Internal Server Error - Object could not be created. Error: Object name must not be empty.
Thanks for the report. To address your initial question: we've simply not encountered the case of having spaces in the Alertname until now, so we never considered this when generating the internal service name for Icinga2.
Looking at the service name computation and validation and subsequent Icinga2 API calls, I see a whole bunch of issues. I'll try to find some time to clean up the implementation soon.
Hello,
I was searching for a while, after I realized, that signalilo cannot handle alertnames with spaces correctly.
You can repreduce my problem if you fire an alert with an Alertname like "This is a test".
The regex https://github.com/vshn/signalilo/blob/master/webhook/icinga.go#L28 prevents that anything with a space will be sent to icinga2.
Is there a reason, that there is no string replace to convert spaces to underscores or just properly encode the spaces to the GET method for the Icinga2 API?
I would love to see this fixed, since many people are using spaces in their names.
Thanks and best regards,
Dennis
The text was updated successfully, but these errors were encountered: