I can't seem to find documentation supporting it, but does Nagios allow for arrays for checks? For instance, I have an LDAP account check. We'd like to know if users are locked. But if you are checking 30 users that is a lot of code for something that is repeated.
In the example below:
User taboyer's account is being monitored. I'd like to be able to use a variable or array here and have the user list be plugged in so I'm not repeating the entire service definition 30+ times.
Code: Select all
define service{
host_name boy-adams
use nm-default-service
service_description Account lockout check - Tim
notes Tim's AD account taboyer is locked out.
check_command check_ldap_account!P!taboyer
notes_url onenote:///\\boy-elbert\one$\IS-RUNBOOK\General%20IS\Knowledge%20Base.one#Nagios%20Alert%20-%20Linux%20-%20LDAP%20Account%20Check§ion-id={E9C18768-B037-4F6F-AC7E-ADD79E20AB49}&page-id={C19FF347-6402-4BC9-8322-F5C4267C1D2A}&end
}
Jordan