seyren
seyren copied to clipboard
Hipchat notifications are too generic
I have a lot of checks which cover multiple hosts, i.e. the check uses the following target for example:
collectd.*.load.load.longterm
When an alert is generated, the actual host shows up in the target and I can see that in the PagerDuty notification for example.
In Hipchat however, the message only shows up like follows:
Check Longterm Load has entered its WARN state.
What I would expect is the actual target that triggered the alert showing up in the message.
I see the Hipchat message is being generated by the following code: https://github.com/scobal/seyren/blob/master/seyren-core/src/main/java/com/seyren/core/service/notification/HipChatNotificationService.java#L81
Is there any chance that you can include the alert details in the message like it is being done with the PagerDuty notification? May be make the details optional?
Thanks a bunch!
- Anita
one of our devs fixed this with a regex in the subscription target. I don't see that he did a PR for it, but I'll remind him on Monday.
Here is the regex working. It does exactly what you want in the hipchat message
http://i.imgur.com/OsS3tCc.png
Ah ok. Trying to understand what the regex does exactly. Is the HipChat notification service parse the target differently?
Thanks a lot!!
using a regex you can say what piece of the target you want to have put into your hipchat message.
Here's the modified code:
https://github.com/johnboker/seyren/blob/master/seyren-core/src/main/java/com/seyren/core/service/notification/HipChatNotificationService.java#L100
If i get some time i'll create a pull request to see if it can be put into the master repo.
That would be cool, thanks for the heads up.
@johnboker Any chance you can create a pull request for this? Thanks a bunch
@anitakrueger @johnboker and his wife just had a baby. He's out of commission for a bit....
In the meantime you could always just clone his fork? The change you want is already in his fork (so its essentially what you'd get if he did a PR and they pulled it in)
https://github.com/johnboker/seyren.git
I'm not a java dev, but I'm pretty sure that's all you'd have to do is build it with javac. Then instead of using the official build (wget https://github.com/scobal/seyren/releases/download/1.3.0/seyren-1.3.0.jar ) just use the build you just made.
@johnboker congratulations! I have a 5-month old so I know what out of commission means :)
@ezeeetm I'll try. Haven't compiled any java in a long time, but I'll see how far I get. May be I can submit the PR
@anitakrueger did you make any progress on this? I was just working on this today, going to submit a PR when I clean it up.
No, no progress here unfortunately :(
@anitakrueger OK, I'll ping you in the patch I'm making, hopefully will be able to finish it this week.
@sofam that would be awesome!
Was this fixed?
@anitakrueger no, I'll re-open, apologies.