Custom host Variables for services use

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Custom host Variables for services use

Post by mguthrie »

Can you take a look at your /usr/local/nagios/etc/status.dat file and take a look at the actual command that's being sent with the variables in it? I'm looking for something like the following for one of your services that you're testing the ORACLESID. I just want to make sure the variable is being translated correctly.

Code: Select all

check_command=check_xi_host_ping!3000.0!80%!5000.0!100%
Hendrik
Posts: 14
Joined: Wed Jan 26, 2011 2:18 am

Re: Custom host Variables for services use

Post by Hendrik »

Yup Seems it is not passing the --connect:

check_command=check_oracle_health_vartest!test!test!!connection-time!--warning 3!--critical 5!

Command Used:
$USER1$/check_oracle_health --username $ARG1$ --password $ARG2$ --connect $_ORACLE_SID$ --mode $ARG4$ $ARG5$ $ARG6$
Hendrik
Posts: 14
Joined: Wed Jan 26, 2011 2:18 am

Re: Custom host Variables for services use

Post by Hendrik »

Hi guys, any ideas?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Custom host Variables for services use

Post by mguthrie »

Can you also check the objects.cache file for the check command for that service? If it's not in that file, there there might be a bug in NagiosQL that's causing that variable to get dropped before writing it to the config file.

You could test the theory by putting the service config in the static folder with the correct check command defined and restart nagios. If the results come back correctly then the above theory is probably correct.
Hendrik
Posts: 14
Joined: Wed Jan 26, 2011 2:18 am

Re: Custom host Variables for services use

Post by Hendrik »

mguthrie wrote:Can you also check the objects.cache file for the check command for that service? If it's not in that file, there there might be a bug in NagiosQL that's causing that variable to get dropped before writing it to the config file.

You could test the theory by putting the service config in the static folder with the correct check command defined and restart nagios. If the results come back correctly then the above theory is probably correct.

Isnt it dropped from the Host config and just called from the service config, not 100% with you on what to do, sorry still new to Nagios
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Custom host Variables for services use

Post by rdedon »

The path for this would be /usr/local/nagios/var for the objects.cache
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked