LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Network Monitoring - Communication between Nagios & NRPE (https://www.linuxquestions.org/questions/linux-networking-3/network-monitoring-communication-between-nagios-and-nrpe-865597/)

aocferreira 02-28-2011 06:43 PM

Network Monitoring - Communication between Nagios & NRPE
 
Hello,

The communication between nagios and nrpe agent in the monitored host, can be without SSL? The problem is that I have 2 different versions of debian running on the machines and there are problems related to the libssl-dev package! Thanks

quanta 02-28-2011 10:05 PM

Quote:

Originally Posted by aocferreira (Post 4274553)
Hello,

The communication between nagios and nrpe agent in the monitored host, can be without SSL?

Yes, it can.
Quote:

Originally Posted by aocferreira (Post 4274553)
The problem is that I have 2 different versions of debian running on the machines and there are problems related to the libssl-dev package! Thanks

What exactly is your problem?

aocferreira 03-01-2011 07:26 AM

I already forgot the idea to use SSL. Now i have installed both nagios and nrpe plugin with the --disable-ssl option. I am following the NRPE official documentation but in this step:

ii. Test communication with the NRPE daemon
Make sure the check_nrpe plugin can talk to the NRPE daemon on the remote host. Replace "192.168.0.1" in the
command below with the IP address of the remote host that has NRPE installed.
/usr/local/nagios/libexec/check_nrpe -H 192.168.0.1
You should get a string back that tells you what version of NRPE is installed on the remote host, like this:
NRPE v2.8

I get an error: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Any idea?

EricTRA 03-01-2011 07:32 AM

Hello,

What error do you get in the remote server logs? That should tell you something. Also, do you have firewall enabled (IPTABLES)?

Kind regards,

Eric

aocferreira 03-01-2011 08:45 AM

Remote server logs is /var/log/messages ? There's nothing there about npre..
Yap, firewall was configured:

# iptables -I INPUT -p tcp -m tcp --dport 5666 -j DROP
# iptables -I INPUT -s <IP_SERVIDOR_NAGIOS> -p tcp -m tcp --dport 5666 -j ACCEPT

aocferreira 03-01-2011 09:03 AM

Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 192.168.100.110 anywhere tcp dpt:nrpe
DROP tcp -- anywhere anywhere tcp dpt:nrpe
ACCEPT tcp -- 192.168.100.110 anywhere tcp dpt:nrpe
DROP tcp -- anywhere anywhere tcp dpt:nrpe

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

aocferreira 03-01-2011 10:00 AM

I think the problem is in the connection between the server and the remote machine.. But i don't know how to solve this!
If i try 'telnet 192.168.100.1 5666' in the Monitoring machine:

Trying 192.168.100.1...
Connected to 192.168.100.1.
Escape character is '^]'.
Connection closed by foreign host.

quanta 03-01-2011 08:01 PM

Which mode did you run NRPE: standalone or under xinetd (inetd)?

aocferreira 03-02-2011 06:59 PM

the problem was solved.. i had to add the IP of the server to /etc/hosts.allow otherweise there was no connection!thank u all :)

quanta 03-02-2011 09:01 PM

Quote:

Originally Posted by aocferreira (Post 4277061)
the problem was solved.. i had to add the IP of the server to /etc/hosts.allow otherweise there was no connection!thank u all :)

Surprising! I have never been forced to add the monitoring host's IP to /etc/hosts.allow on remote host. What Nagios and NRPE version did you run?

EricTRA 03-03-2011 01:21 AM

Hi,

Neither did I have to modify those settings. Do you have by any chance SELinux activated?

Kind regards,

Eric

aocferreira 03-03-2011 10:13 AM

nagios 3.2.3 & nrpe 2.12 :)


All times are GMT -5. The time now is 12:39 AM.