Is there an easy way to remove the ability for users to disable ack notifications?
When integrated with pagerduty, ack notifications are required for the pagerduty service to be ack'd from nagios. For some reason, users always want to uncheck the notification box (see attached).
So, I want to ALWAYS send ack notifications when a service or host problem is ackd...
How?
force always send ack notifications
-
[email protected]
- Posts: 3
- Joined: Mon Jan 20, 2014 12:17 pm
Re: force always send ack notifications
An easy way? Not really. You would need to make that modification in the CGI source for cmd.cgi and recompile. Essentially you would have to remove that check box or make it hidden in the HTML, but still send the checked value so Nagios knows to send the notification.
Edit: Actually, you might be able to just set
near the beginning of the code because it is FALSE by default and doing so would keep it as TRUE since unchecking the box does nothing but checking it sets it to TRUE.
Edit: Actually, you might be able to just set
Code: Select all
int persistent_comment = TRUE;Former Nagios employee
-
[email protected]
- Posts: 3
- Joined: Mon Jan 20, 2014 12:17 pm
Re: force always send ack notifications
I am still (back to actually) working with this, and related issues.
Is there a reference for variables included in cmd.c + their related functions?
Is there a reference for variables included in cmd.c + their related functions?
Re: force always send ack notifications
Not beyond what is mentioned in the source comments. Did you try editing the variable as tmcd suggested?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
[email protected]
- Posts: 3
- Joined: Mon Jan 20, 2014 12:17 pm
Re: force always send ack notifications
yes, I also made the checkbox hidden.
An unintended side effect is it DIDN'T send acks at all to pagerduty anymore.
It's a time consuming process in my environment to change the code, build, and deploy the test so I was hoping for a little more visibility into the variables as I don't want to change more than one value per test. The naming is fairly straightforward, but not sure exactly the intended result of changing, for example (and especially):
int send_notification=FALSE;
int force_notification=0;
Thanks in advance!
Paul
An unintended side effect is it DIDN'T send acks at all to pagerduty anymore.
It's a time consuming process in my environment to change the code, build, and deploy the test so I was hoping for a little more visibility into the variables as I don't want to change more than one value per test. The naming is fairly straightforward, but not sure exactly the intended result of changing, for example (and especially):
int send_notification=FALSE;
int force_notification=0;
Thanks in advance!
Paul
- Nagios Support
- Posts: 36
- Joined: Thu Sep 04, 2014 12:16 pm
Re: force always send ack notifications
Trevor is the person who is most familiar with this issue. He is not working today, but he should be in tomorrow and will follow up with you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: force always send ack notifications
In your original post, you showed Persistent Comment as being unchecked, so I think I was looking at that when I wrote my reply. The variable that would make sense to change to TRUE is actually send_notification. force_notification and broadcast_notification have to do with modifying the normal notification logic as described below:
http://old.nagios.org/developerinfo/ext ... and_id=134
As for more comments on the code, that is something the core devs would need to decide on. My guess is that most people who would be digging into the source would be used to variables being self-documenting, and since a lot of these are only referenced a few times their uses wouldn't be too hard to figure out.
http://old.nagios.org/developerinfo/ext ... and_id=134
As for more comments on the code, that is something the core devs would need to decide on. My guess is that most people who would be digging into the source would be used to variables being self-documenting, and since a lot of these are only referenced a few times their uses wouldn't be too hard to figure out.
Former Nagios employee
Re: force always send ack notifications
after looking into this some more, the original suggestion was correct. I was hiding the checkbox/option the incorrect way.
The way I ended up doing it was hiding the row:
printf("<tr><td CLASS='optBoxItem'></td><td><b>");
altering it to:
printf("<tr style='display:none;'><td CLASS='optBoxItem'></td><td><b>");
(using the smae method for service and host notification checkboxes/text)
Thank you for your help.
The way I ended up doing it was hiding the row:
printf("<tr><td CLASS='optBoxItem'></td><td><b>");
altering it to:
printf("<tr style='display:none;'><td CLASS='optBoxItem'></td><td><b>");
(using the smae method for service and host notification checkboxes/text)
Thank you for your help.