LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Facing Issue in Nagios 3.3 (https://www.linuxquestions.org/questions/linux-software-2/facing-issue-in-nagios-3-3-a-924560/)

manoj.linux 01-19-2012 03:02 AM

Facing Issue in Nagios 3.3
 
Hi,

I have installed Nagios on Redhat Linux,

I have installed Nagios+Plugins+NRPE on Server A (Host Server) and Nagios Plugins + nrpe on remote linux server (red hat linux)

run the command on remote linux host, it returns nrpe version

usr/local/nagios/libexec/check_nrpe -H localhost


run the command from Nagios Host Server

/usr/local/nagios/libexec/check_nrpe -H 192.168.2.3 (remote linux host)

it has return the nrpe version

now whenever I opening web browser and going to services, it is showing all the crtical and showing plugins are missing

I have run the below command on Nagios server

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

it is showing 0 Warning.

also it is not showing any cpu and memory graph.

Please suggest

foodown 01-19-2012 03:17 AM

Do you have the NRPE daemon running on the remote host? You don't mention it, and without it, you'd see exactly what you describe.

manoj.linux 01-19-2012 03:30 AM

Thanks for your response,

I have done the below steps


Edited Xinetd NRPE entry:

# vi /etc/xinetd.d/nrpe

only_from = 127.0.0.1 <nagios_ip_address>

Add entry for nrpe daemon

# vi /etc/services

nrpe 5666/tcp # NRPERestart Xinetd and Set to start at boot:

# chkconfig xinetd on

# service xinetd restart


# netstat -at |grep nrpe

getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
tcp 0 0 *:nrpe *:* LISTEN


# /usr/local/nagios/libexec/check_nrpe -H localhost

NRPE v2.13

Satyaveer Arya 01-19-2012 03:54 AM

It seems that you haven't installed all the needed nagios plugins.
Download plugins from this link : http://www.nagios.org/download and configure it accordingly.

manoj.linux 01-19-2012 09:59 AM

Thanks Satyaveer Arya,

I have reinstalled Negios Plugin and nrpe as per below steps, still I am getting previous messages but at last it is showing,

can you please suggest any steps go wrong as per below sequences of commands?

useradd nagios
passwd nagios


Installed nagios-plugin
[remotehost]#
[remotehost]# tar xvfz nagios-plugins-1.4.15.tar.gz
[remotehost]# cd nagios-plugins-1.4.15
[remotehost]# export LDFLAGS=-ldl

[remotehost]# ./configure --with-nagios-user=nagios --with-nagios-group=nagios --enable-redhat-pthread-workaround
[remotehost]# make
[remotehost]# make install

[remotehost]# chown nagios.nagios /usr/local/nagios
[remotehost]# chown -R nagios.nagios /usr/local/nagios/libexec/




Install NRPE
[remotehost]# cd /home/downloads
[remotehost]# tar xvfz nrpe-2.13.tar.gz
[remotehost]# cd nrpe-2.13

[remotehost]# ./configure
[remotehost]# make all
[remotehost]# make install-plugin
[remotehost]# make install-daemon
[remotehost]# make install-daemon-config
[remotehost]# make install-xinetd

# vi /etc/xinetd.d/nrpe

only_from = 127.0.0.1 <nagios_ip_address>

Add entry for nrpe daemon

# vi /etc/services

nrpe 5666/tcp # NRPERestart Xinetd and Set to start at boot:

# chkconfig xinetd on

# service xinetd restart


# netstat -at |grep nrpe

getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
tcp 0 0 *:nrpe *:* LISTEN


# /usr/local/nagios/libexec/check_nrpe -H localhost

NRPE v2.13

chrism01 01-19-2012 06:24 PM

As a rule that indicates that DNS is not resolving....

Satyaveer Arya 01-20-2012 12:45 AM

Exactly it is DNS problem.

getnameinfo translates a socket address to a host nodename.

By default the fully-qualified domain name (FQDN) for the host shall be returned.

try nslookup for some external ip address. if dns is down it will fail, too.

manoj.linux 01-23-2012 05:53 AM

Thanks Satyaveer,

I have tried on another server by installing Nagios Plugins and Nrpe agent, on that server, it is showing below output

nestat -at | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN


but on another server also nagios is showing same massage.

now whenever I opening web browser and going to services, it is showing all the crtical and showing plugins are missing for this server also.

Satyaveer Arya 01-23-2012 06:43 AM

Checkout these two pages if it helps you:

http://nagiosplugins.org/man/check_http
http://nagiosplugins.org/book/export/html/1

vinilvijayan 01-23-2012 07:09 AM

Does the plugins under "/usr/local/nagios/libexec/" has execute permission?

If no, give "chmod u+x <path of the plugins>".

cheers,
vinil

manoj.linux 01-24-2012 12:26 AM

I have checked and found below permissions.

drwxrwxr-x 2 nagios nagios 4096 Jan 23 13:14 libexec

[root@ind-test libexec]# pwd
/usr/local/nagios/libexec
[root@ind-test libexec]# ls -l
total 4524
-rwxr-xr-x 1 nagios nagios 98734 Jan 23 13:02 check_apt
-rwxr-xr-x 1 nagios nagios 2254 Jan 23 13:02 check_breeze
-rwxr-xr-x 1 nagios nagios 111214 Jan 23 13:02 check_by_ssh
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_clamd -> check_tcp
-rwxr-xr-x 1 nagios nagios 83122 Jan 23 13:02 check_cluster
-r-xr-xr-x 1 nagios nagios 113427 Jan 23 13:02 check_dhcp
-rwxr-xr-x 1 nagios nagios 106280 Jan 23 13:02 check_dig
-rwxr-xr-x 1 nagios nagios 135784 Jan 23 13:02 check_disk
-rwxr-xr-x 1 nagios nagios 8704 Jan 23 13:02 check_disk_smb
-rwxr-xr-x 1 nagios nagios 112333 Jan 23 13:02 check_dns
-rwxr-xr-x 1 nagios nagios 63358 Jan 23 13:02 check_dummy
-rwxr-xr-x 1 nagios nagios 3056 Jan 23 13:02 check_file_age
-rwxr-xr-x 1 nagios nagios 6318 Jan 23 13:02 check_flexlm
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_ftp -> check_tcp
-rwxr-xr-x 1 nagios nagios 107108 Jan 23 13:02 check_hpjd
-rwxr-xr-x 1 nagios nagios 208427 Jan 23 13:02 check_http
-r-xr-xr-x 1 nagios nagios 119303 Jan 23 13:02 check_icmp
-rwxr-xr-x 1 nagios nagios 88268 Jan 23 13:02 check_ide_smart
-rwxr-xr-x 1 nagios nagios 15137 Jan 23 13:02 check_ifoperstatus
-rwxr-xr-x 1 nagios nagios 12601 Jan 23 13:02 check_ifstatus
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_imap -> check_tcp
-rwxr-xr-x 1 nagios nagios 6890 Jan 23 13:02 check_ircd
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_jabber -> check_tcp
-rwxr-xr-x 1 nagios nagios 99407 Jan 23 13:02 check_ldap
lrwxrwxrwx 1 root root 10 Jan 23 13:02 check_ldaps -> check_ldap
-rwxr-xr-x 1 nagios nagios 93540 Jan 23 13:02 check_load
-rwxr-xr-x 1 nagios nagios 6020 Jan 23 13:02 check_log
-rwxr-xr-x 1 nagios nagios 20287 Jan 23 13:02 check_mailq
-rwxr-xr-x 1 nagios nagios 88028 Jan 23 13:02 check_mrtg
-rwxr-xr-x 1 nagios nagios 87175 Jan 23 13:02 check_mrtgtraf
-rwxr-xr-x 1 nagios nagios 94418 Jan 23 13:02 check_nagios
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_nntp -> check_tcp
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_nntps -> check_tcp
-rwxrwxr-x 1 nagios nagios 55743 Jan 23 13:14 check_nrpe
-rwxr-xr-x 1 nagios nagios 113925 Jan 23 13:02 check_nt
-rwxr-xr-x 1 nagios nagios 115509 Jan 23 13:02 check_ntp
-rwxr-xr-x 1 nagios nagios 109499 Jan 23 13:02 check_ntp_peer
-rwxr-xr-x 1 nagios nagios 107029 Jan 23 13:02 check_ntp_time
-rwxr-xr-x 1 nagios nagios 131378 Jan 23 13:02 check_nwstat
-rwxr-xr-x 1 nagios nagios 8324 Jan 23 13:02 check_oracle
-rwxr-xr-x 1 nagios nagios 100866 Jan 23 13:02 check_overcr
-rwxr-xr-x 1 nagios nagios 116572 Jan 23 13:02 check_ping
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_pop -> check_tcp
-rwxr-xr-x 1 nagios nagios 114049 Jan 23 13:02 check_procs
-rwxr-xr-x 1 nagios nagios 98470 Jan 23 13:02 check_real
-rwxr-xr-x 1 nagios nagios 9584 Jan 23 13:02 check_rpc
-rwxr-xr-x 1 nagios nagios 1135 Jan 23 13:02 check_sensors
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_simap -> check_tcp
-rwxr-xr-x 1 nagios nagios 153711 Jan 23 13:02 check_smtp
-rwxr-xr-x 1 nagios nagios 155414 Jan 23 13:02 check_snmp
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_spop -> check_tcp
-rwxr-xr-x 1 nagios nagios 95168 Jan 23 13:02 check_ssh
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_ssmtp -> check_tcp
-rwxr-xr-x 1 nagios nagios 98028 Jan 23 13:02 check_swap
-rwxr-xr-x 1 nagios nagios 137559 Jan 23 13:02 check_tcp
-rwxr-xr-x 1 nagios nagios 97280 Jan 23 13:02 check_time
lrwxrwxrwx 1 root root 9 Jan 23 13:02 check_udp -> check_tcp
-rwxr-xr-x 1 nagios nagios 106844 Jan 23 13:02 check_ups
-rwxr-xr-x 1 nagios nagios 92110 Jan 23 13:02 check_users
-rwxr-xr-x 1 nagios nagios 2939 Jan 23 13:02 check_wave
-rwxr-xr-x 1 nagios nagios 95949 Jan 23 13:02 negate
-rwxr-xr-x 1 nagios nagios 91603 Jan 23 13:02 urlize
-rwxr-xr-x 1 nagios nagios 1939 Jan 23 13:02 utils.pm
-rwxr-xr-x 1 nagios nagios 862 Jan 23 13:02 utils.sh

Satyaveer Arya 01-24-2012 12:47 AM

Permissions of all the plugins seems to be ok...

vinilvijayan 01-24-2012 01:07 AM

Permissions looks fine.

Check "/usr/local/nagios/etc/objects/commands.cfg", how the commands are defined. See below example,

define command{
command_name check_local_procs
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}



"$USER1$" is defined in "/usr/local/nagios/etc/resource.cfg" as below.

# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/nagios/libexec

Check whether the path to the plugins are defined properly.

Cheers,
Vinil

manoj.linux 01-24-2012 03:16 AM

I have checked and below is output of files.

regarding -> /usr/local/nagios/etc/objects/commands.cfg"

define command{
command_name check_local_procs
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}


Regarding -> "$USER1$" is defined in "/usr/local/nagios/etc/resource.cfg" as below, it is already defined as below.

$USER1$=/usr/local/nagios/libexec

vinilvijayan 01-24-2012 03:26 AM

Could you paste the exact error message you are getting in the dashboard and nagios.cfg file here?

cat /usr/local/nagios/etc/nagios.cfg |grep -v "#" |grep "\n"


All times are GMT -5. The time now is 04:26 AM.