Page 4 of 5
Re: check_ping
Posted: Tue Jun 27, 2017 10:28 am
by tgriep
The command
check_command check_nrpe!check_load
Check the load of a remote server using the check_nrpe plugin to run the command on a remote server that is running the NRPE Agent.
Re: check_ping
Posted: Tue Jun 27, 2017 10:47 am
by donnyforbes
I made did the following..
Code: Select all
#check-host-alive
define command{
command_name check-host-alive
command_line $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
Code: Select all
define service{
use generic-service
host_name huey
service_description CPU Load
check_command check-host-alive
}
tail -f /var/log/messages and got this .
Jun 27 08:30:27 nag nagios: Error: Could not add object property in file '/usr/local/nagios/etc/objects/commands.cfg' on line 345.
Jun 27 08:30:27 nag nagios: Error: Invalid max_check_attempts value for host 'duey'
Jun 27 08:30:27 nag nagios: Error: Could not register host (config file '/usr/local/nagios/etc/objects/commands.cfg', starting on line 56)
Jun 27 08:30:27 nag nagios: Error processing object config files!
Jun 27 08:30:27 nag nagios: ***> One or more problems was encountered while processing the config files...
Why is it complaining about duey if I made the change to huey? Please advise.
Re: check_ping
Posted: Tue Jun 27, 2017 10:58 am
by tgriep
Check those settings for the other host and verify that they are correct and exist.
Make sure you did not edit the template that host uses or deleted too many lines from the config file.
Re: check_ping
Posted: Tue Jun 27, 2017 10:58 am
by donnyforbes
The command
check_command check_nrpe!check_load
Check the load of a remote server using the check_nrpe plugin to run the command on a remote server that is running the NRPE Agent
Then I would want to use this, however what your saying is I can't use another check_command for icmp if I am using this. That doesn't make since
unless I am missing something.
Re: check_ping
Posted: Tue Jun 27, 2017 11:06 am
by donnyforbes
Check those settings for the other host and verify that they are correct and exist.
Make sure you did not edit the template that host uses or deleted too many lines from the config file.
here is what I see in this commands.cfg file
Code: Select all
[root@nag objects]# cat commands.cfg | grep max_check_attempts
max_check_attempts 10
not sure why it's complaining about that .. Where else could I look?
Re: check_ping
Posted: Tue Jun 27, 2017 11:11 am
by tgriep
You would create a separate service check for that host with the different command defined, that is how you would use a different command for the same host.
A lot of your questions can be answered by going through the Nagios Table of Contents.
https://assets.nagios.com/downloads/nag ... n/toc.html
Re: check_ping
Posted: Tue Jun 27, 2017 11:19 am
by donnyforbes
This has been good help and all, but I do have a question. If purchasing the XI product is the support better? I just want to make sure what we are going to be spending is worth it. This has been very complicated and I know for a fact i will need support since I HAVE NEVER used this product before.. Really all we need this system to do is send us notification for certain things and then call cell phone when system goes down and is not pingable. I feel this should not be that difficult but maybe I am wrong. TO be honest with you I can''t even get a simple ping command to work correct which is very strange. Anyhow just letting you know how I feel about all this.
Re: check_ping
Posted: Tue Jun 27, 2017 11:20 am
by donnyforbes
You would create a separate service check for that host with the different command defined, that is how you would use a different command for the same host.
A lot of your questions can be answered by going through the Nagios Table of Contents.
https://assets.nagios.com/downloads/nag ... n/toc.html
Where would I do this on the nagios server? and how would I got about doing this? DO I add something in the commands.cfg file?
Re: check_ping
Posted: Tue Jun 27, 2017 11:37 am
by donnyforbes
I have been reading that link you sent me and i notice in the following;
Code: Select all
[root@nag objects]# pwd
/usr/local/nagios/etc/objects
[root@nag objects]# ls
commands.cfg contacts.cfg localhost.cfg printer.cfg switch.cfg templates.cfg timeperiods.cfg windows.cfg
These are config file correct? The windows.cfg is where I have all my windows hosts added there, the contacts.cfg is where I should put my contact like the one you sent me the other day correct.
The commands.cfg is where all the commands go and the hosts checks etc. is that right? Just trying to get a grasp on this.
Re: check_ping
Posted: Tue Jun 27, 2017 11:56 am
by donnyforbes
Can you show me an example of what the commands.cfg, hosts, services config files should look like?