IS it possible to define per-host resource (logins.passwords, …) Otherwise i’d have to define about 100 different checkcommands or services, which is stupid. I need it for my snmpv3 checks.
define macro, user3 etc. check in doc or in the google
I did rtfm and found the macros, but there are only 32 possible macros for let say snmp auth login. If I have 33 hosts with each different snmp auth I run out of macros. And either way I’d had to use many service definitions because USERXY would need to be different for each host.
I would need something like this:
check_command check_snmp_example! $HOST_SNMP_PASS$
and a per-host resource:
HOST_SNMP_PASS,server12 = password1ababab
HOST_SNMP_PASS,server13 = password2xyxyxy
HOST_SNMP_PASS,server14 = password2gfgfg
HOST_SNMP_PASS,server97 = password2gfgfg
HOST_SNMP_PASS,server98 = password3342gfgfg
HOST_SNMP_PASS,server99 = password23wgfgfg
this way we could have 1 service definition for what really is only same service but running on multiple hosts. Enabling and disabling services on new hosts would be easy as adding to a hostgroup
The is some discussion about per-host macros here, but the only solution seems to be EXTERNAL resources via perl: mail-archive.com/nagios-user … 04904.html
Understood! I have no other solution. Except the obvious solution to create a ldap or AD user with very limited permissions and use it to access all the servers. Since you are asking I assume thats not an option.
I have no other solution. Except the obvious solution to create a ldap or AD user with very limited permissions and use it to access all the servers.
Since you are asking I assume thats not an option.