Different notification command for different host group
Different notification command for different host group
Hi, I want to know is it possible to run different notification command for hosts under different host group for same contacter?
Re: Different notification command for different host group
Typically a contact will only have one notification script for all hosts and services. However you could change that script to one of your own design that will inspect the host name and take appropriate actions.
Former Nagios employee
Re: Different notification command for different host group
Thanks for your reply, do you mean that I could put "if clause" in the notification command? So that I could test the value of host name and do different logic?tmcdonald wrote:Typically a contact will only have one notification script for all hosts and services. However you could change that script to one of your own design that will inspect the host name and take appropriate actions.
Re: Different notification command for different host group
Typically all the logic would be stored in a file that is run, but you could probably technically put it in the command and get away with it. However, I would suggest against this as some characters used in bash scripting might be illegal characters in a Nagios config definition and would break things.
Former Nagios employee