Page 1 of 1

Host cant be monitor wrta not set

Posted: Tue Apr 22, 2014 7:01 am
by bryansin
Hi all,

Having some problem after install nagios on centos 6.5.

follow guide installed and, it seems the plugin is not there. but when i try to re-install the plugin its say is up to date

[root@monitoring ~]# yum install nagios-plugins
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.secureax.com
* epel: mirror.nus.edu.sg
* extras: centos.mirror.secureax.com
* updates: centos.mirror.secureax.com
Setting up Install Process
Package nagios-plugins-1.4.16-10.el6.x86_64 already installed and latest version
Nothing to do


[root@monitoring ~]# /usr/local/nagios/libexec/check_ping -H 10.184.2.4
-bash: /usr/local/nagios/libexec/check_ping: No such file or directory
[root@monitoring ~]# cd /usr/local/nagios/libexec
[root@monitoring libexec]# pwd
/usr/local/nagios/libexec
[root@monitoring libexec]# ll
total 0
[root@monitoring libexec]#


at nagios web interface i have this error ( attached pic )


Do hope there is someone who can guide me on this

Re: Host cant be monitor wrta not set

Posted: Tue Apr 22, 2014 1:24 pm
by slansing
I'm not sure where yum installed the plugins to, you will need to find the directory and point *all* of your commands to there, or remove it with yum and install from source which is what I would do personally, follow the plugin installation section here:

http://assets.nagios.com/downloads/nagi ... Source.pdf

Re: Host cant be monitor wrta not set

Posted: Tue Jul 01, 2014 9:10 am
by salpula
I followed this guide: http://www.unixmen.com/install-and-conf ... -rhel-6-4/ and ran into the same problem. It turns out it was syntax in my host config file. The sample they gave was:

Code: Select all

define host{
use linux-server
host_name client
alias client
address 192.168.1.100 ## Client IP ##
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
Once I removed the '## CLIENT IP ##' from the address line, the issue was resolved. I believe the script is not "smart" enough to ignore the comment in the line and it breaks the command.

Re: Host cant be monitor wrta not set

Posted: Tue Jul 01, 2014 9:47 am
by eloyd
The Nagios core parser is smart enough to ignore comments at the end of the line, but it uses the semi-colon as the comment separator. I'd suggest that the documentation referenced be updated to say "; ### Client IP ###" instead.

Re: Host cant be monitor wrta not set

Posted: Tue Jul 01, 2014 9:53 am
by tmcdonald
Very close. If the first character in a line is a # it is a comment, but if it is at the end of a line you use the semi-colon.

Re: Host cant be monitor wrta not set

Posted: Tue Jul 01, 2014 9:56 am
by eloyd
Maybe I wasn't clear, but isn't that what I said?
smart enough to ignore comments at the end of the line

Re: Host cant be monitor wrta not set

Posted: Tue Jul 01, 2014 10:00 am
by tmcdonald
I was clarifying since my initial reading of your comment seemed slightly ambiguous.

Re: Host cant be monitor wrta not set

Posted: Tue Jul 01, 2014 5:45 pm
by salpula
Thanks for clarifying guys. It makes sense, since I commented some of the other config files with that convention already.

Re: Host cant be monitor wrta not set

Posted: Wed Jul 02, 2014 9:32 am
by tmcdonald
So we're all clear to close this up?