Page 1 of 1

Host and Service Dependencies

Posted: Tue Jul 26, 2016 11:01 pm
by hazly92
Hi All,

Im having a bit confused about "Add dependencies to your nagios configuration", I want to use these plugin check_as400. where can i find config file to put the dependencies?


Thank You.

Hazly

Re: Host and Service Dependencies

Posted: Wed Jul 27, 2016 9:42 am
by tmcdonald
Can you please clarify what you are trying to do? Dependencies in Nagios are not required to run any particular plugin.

Re: Host and Service Dependencies

Posted: Wed Jul 27, 2016 8:03 pm
by hazly92
OK~ :)
sorry for not being cleared when asking~ :)
here the guideline provided :
1) For languages other than English you will need to recompile the plugin before continuing. Refer to steps 1 and 2 of the Manual installation section below.
* Type
./install

2) Modify your $NAGIOS_PATH/libexec/.as400 with the correct user and password
3) Add the contents of the checkcommands.example file into your $NAGIOS/etc/checkcommands.cfg
4) Add services to your nagios configuration. There are examples in the services.example file.
5) Add dependencies to your nagios configuration. There are examples in the dependency.example file.
I able to follow all the step except no 5. I'm still confused which configuration file I need to put the dependencies

here the dependencies
define servicedependency{
host_name as400host
service_description Active Jobs
dependent_host_name as400host
dependent_service_description Login
execution_failure_criteria c,u
notification_failure_criteria c,u
}

#outq dependency
define servicedependency{
host_name prtis1
service_description AS400 OUTQ
dependent_host_name as400host
dependent_service_description Login
execution_failure_criteria c,u
notification_failure_criteria c,u
}

Thanks

Re: Host and Service Dependencies

Posted: Thu Jul 28, 2016 1:13 pm
by tmcdonald
Dependency definitions can go into any file which Nagios is configured to read, but it makes sense to put them in the same file as the services which they are related to.