HI!
For a host in DOWN status, can I have a host definition which allows me to receive 3 phone calls and only 1 email?
Or I have to create 2 host definitions for the same host, one for phone calls and another for emails?
Thank you
different number of notifications for email and phone calls
Re: different number of notifications for email and phone ca
Considering all the timing-related notification options (notification_interval, first_notification_delay, notification_period, etc) are in the host definition, these isn't a way built in to separate out the notifications like that. However you can always edit the notification handler to take the current notification into consideration and then make the decision on whether to email or call based on that.
Former Nagios employee
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: different number of notifications for email and phone ca
Are you looking to get a email and a sms message/call together on the first notification? What you could do, is you could create an additional contact for your text message/call and then define an escalation, so you would receive either an email for the first notification and calls/messages there after, or vice versa.
Re: different number of notifications for email and phone ca
Thank you, I already did that, but I wanna keep as less as possible in Nagios configuration and event handler looks more suitable for that.
I give 4 parameters to my script, like this
command_line $USER2$/asteriks-service-phone-call $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $CONTACTEMAIL$
No limits for number of parameters (other than for bash) in event handlers? Can I use $CONTACTEMAIL$ macros here? The reason I'm asking event handler works with the first three parameters (of course with some changes in the script)
Thank you
I give 4 parameters to my script, like this
command_line $USER2$/asteriks-service-phone-call $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $CONTACTEMAIL$
No limits for number of parameters (other than for bash) in event handlers? Can I use $CONTACTEMAIL$ macros here? The reason I'm asking event handler works with the first three parameters (of course with some changes in the script)
Thank you
Re: different number of notifications for email and phone ca
The $CONTACTEMAIL$ can only be used with notification handlers. If you are attempting to access this macro from an event handler, it will not work.vvz wrote:Can I use $CONTACTEMAIL$ macros here?
No limits, but you must change the syntax for a passed variable larger than nine. Where you would normally use $1, $2, etc, after nine, you need to use ${10}, ${11}, etc.vvz wrote:No limits for number of parameters (other than for bash) in event handlers?
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.
Re: different number of notifications for email and phone ca
Thank you, it's clear