Host cant be monitor wrta not set

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bryansin
Posts: 1
Joined: Tue Apr 22, 2014 6:50 am

Host cant be monitor wrta not set

Post 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
Attachments
Capture.JPG
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Host cant be monitor wrta not set

Post 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
salpula
Posts: 2
Joined: Mon Jun 30, 2014 1:54 pm

Re: Host cant be monitor wrta not set

Post 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.
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Host cant be monitor wrta not set

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Host cant be monitor wrta not set

Post 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.
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Host cant be monitor wrta not set

Post 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
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Host cant be monitor wrta not set

Post by tmcdonald »

I was clarifying since my initial reading of your comment seemed slightly ambiguous.
Former Nagios employee
salpula
Posts: 2
Joined: Mon Jun 30, 2014 1:54 pm

Re: Host cant be monitor wrta not set

Post by salpula »

Thanks for clarifying guys. It makes sense, since I commented some of the other config files with that convention already.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Host cant be monitor wrta not set

Post by tmcdonald »

So we're all clear to close this up?
Former Nagios employee
Locked