Page 2 of 2

Re: Need help in nagios XI:

Posted: Mon Feb 23, 2015 4:36 pm
by lmiltchev
Open the objects.cache in a text editor and search for "System - Uptime". See if nagios "thinks" the check command is defined.

Re: Need help in nagios XI:

Posted: Tue Feb 24, 2015 1:00 am
by shan_1986
System - Uptime is the service description. Its not in objects.cache file.
Sorry to pester so much.

Its working now. But i'm facing something else now.
This is what i have done.
1. I have created a host template and bind that template to a specific host.
2. Created a service.cfg file for that host, created a service template with the the "Uptime" command specified. Uptime command is present in the commands.cfg file.
When i apply this service template to the host, I could see the service "uptime" is added, but when i open the CCM and look for the service its not showing.
And the variable values from the service template is also not visible in GUI. I couldn't see the service in CCM, (command field is blank in CCM for the service)

define service {
host_name ********
use wizard_servicetemplate_test
notification_options w,c,u,r
register 1
}




define service {
name wizard_servicetemplate_test
host_name ********,********
service_description Test template - UPTIME
check_command check_xi_service_nsclient!nsclientpassw0rdabc!UPTIME!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
notification_interval 60
notifications_enabled 1
register 0

}

Re: Need help in nagios XI:

Posted: Tue Feb 24, 2015 1:51 am
by Box293
shan_1986 wrote:Created a service.cfg file for that host
Where are you creating this file? Any files you manipulate will be ignored by CCM or deleted. The only exception is by playing files in the static directory HOWEVER they will NOT appear in CCM.

If you want to create a service and template you need to create them through CCM.

Re: Need help in nagios XI:

Posted: Wed Feb 25, 2015 7:12 am
by shan_1986
I'm importing the service file with the same host name and applying using the reconfigure.sh script.
Could you guide me how to do that or is there any document with example?

Re: Need help in nagios XI:

Posted: Wed Feb 25, 2015 8:58 am
by scottwilkerson
shan_1986 wrote:When i apply this service template to the host, I could see the service "uptime" is added, but when i open the CCM and look for the service its not showing.
And the variable values from the service template is also not visible in GUI. I couldn't see the service in CCM, (command field is blank in CCM for the service)
This is normal as the check is going to inherit the command and ARGn from the template, inherited items don't show in the CCM unless you are looking at the template.

Re: Need help in nagios XI:

Posted: Wed Feb 25, 2015 9:22 pm
by Box293
The only true way to see the "final object" is to look for it in /usr/local/nagios/var/objects.cache after Applying Config.