-
Notifications
You must be signed in to change notification settings - Fork 24
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
No spaces in validateServiceName allowed #53
Comments
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.
|
Hi Dennis, 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. Best regards, |
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: