Getting the right $HOSTGROUPNOTE$ field
Posted: Thu Mar 16, 2017 8:24 am
Hi,
We've got an issue and with an issue comes a question
The issue which we are facing is that we've created a script which is called from a host escalation, the script takes a number of arguments like $HOSTNAME$ and $HOSTSTATETYPE$ from a nagios command, but we run into a problem when we try to pass the $HOSTGROUPNOTE$ variable to the command. When a host is added to multiple hostgroups or has added mutiple hostgroups to itself, we were unable to specify which hostgroup notes the command should be send to the script, i.e.:
- hostgroup1: notes : testing
- hostgroup2: notes : testtest
- hostgroup3: notes : testing123
The host has been added to all three hostgroups, but we want to pass the notes of hostgroup2 to the command/script.
is there a way that you guys know of that can help me specify which hostgroupnote variable should be passed?
Thnx in advance!
regards,
Kees
We've got an issue and with an issue comes a question
The issue which we are facing is that we've created a script which is called from a host escalation, the script takes a number of arguments like $HOSTNAME$ and $HOSTSTATETYPE$ from a nagios command, but we run into a problem when we try to pass the $HOSTGROUPNOTE$ variable to the command. When a host is added to multiple hostgroups or has added mutiple hostgroups to itself, we were unable to specify which hostgroup notes the command should be send to the script, i.e.:
- hostgroup1: notes : testing
- hostgroup2: notes : testtest
- hostgroup3: notes : testing123
The host has been added to all three hostgroups, but we want to pass the notes of hostgroup2 to the command/script.
is there a way that you guys know of that can help me specify which hostgroupnote variable should be passed?
Thnx in advance!
regards,
Kees