Hello!
Short question - Can I assign 2 event handlers for one host definition?
define host {
host_name test-condor-site
alias test-condor-site
address 172.16.37.44
check_command check-host-alive
max_check_attempts 5
check_interval 1
retry_interval 1
active_checks_enabled 1
check_period 24x7
contacts vassiliy,vassiliy-phone ;mike,mike-phone
#contact_groups admins
notification_interval 3
notification_period 24x7
notification_options d
notifications_enabled 1
event_handler asteriks-host-phone-call-vassiliy, asteriks-host-phone-call-mike
event_handler_enabled 1
}
it would solve my problem I'm discussing right now in another thread - "event handler"
event handlers
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: event handlers
Not that I know of, however you certainly could have a script that calls both instead!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: event handlers
Unfortunately, you can only specify 1 event handler. You will need to create a wrapper script to run both of them. Pay attention to the macros - hosts and services do have a handful of slightly different macros.
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: event handlers
that's the problem - I wanna send a call to different people, depends on who is on duty today.
It's quite simple inside nagios using time periods, but to right a special script ... -yes it's possible, but I wanted to do everything in nagios
It's quite simple inside nagios using time periods, but to right a special script ... -yes it's possible, but I wanted to do everything in nagios
Re: event handlers
would command accept more than 3 parameters in commands.cfg it's also quite simple, but unfortunately for now I can give only 3 parameters, I don't know why
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: event handlers
Commands absolutely should take up to 9 within ccm or 254 within static files. On that note, you can also pass multiple items via one argument and as long as they are not quoted each space will be treated as normal, just like with the cli.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: event handlers
yes, I understand that - like a normal bash script
I'm working on the problem.
I got the answer, so I believe we can close the thread
Thank you for your help, I really appreciate your help
I'm working on the problem.
I got the answer, so I believe we can close the thread
Thank you for your help, I really appreciate your help
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: event handlers
ok locking up. Let us know if it needs to be reopened.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.