Monitor remote machine's memory using Nagios Core

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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitor remote machine's memory using Nagios Core

Post by abrist »

vinothsethuram wrote:/usr/local/nagios/libexec/check_nrpe -H localhost
connect to address 127.0.0.1 port 5666: Connection refused
If I specify a host other than local host then I am getting socket time out
Are you starting nrpe through xinetd or an init script?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Monitor remote machine's memory using Nagios Core

Post by vinothsethuram »

I started the daemon. Do we need to install nagios in remote server which we are going to monitor. And also please give syntax/example.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitor remote machine's memory using Nagios Core

Post by abrist »

vinothsethuram wrote:Do we need to install nagios in remote server which we are going to monitor.
No, the nrpe daemon runs on the remote host. Your nagios server checks the remote host with check_nrpe.
vinothsethuram wrote:And also please give syntax/example.
Of what?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Monitor remote machine's memory using Nagios Core

Post by vinothsethuram »

Syntax/Example about disk usage and processor check
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitor remote machine's memory using Nagios Core

Post by abrist »

I would suggest you start with the following doc as examples without an understanding of the syntax will not get you very far:
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Monitor remote machine's memory using Nagios Core

Post by vinothsethuram »

Given link is very useful. I'm able to get output for local host. however i couldn't get output for remote host. getting port 5666: Connection refused
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor remote machine's memory using Nagios Core

Post by tmcdonald »

vinothsethuram wrote:Given link is very useful. I'm able to get output for local host. however i couldn't get output for remote host. getting port 5666: Connection refused
Did you open port 5666 in the firewall?
Former Nagios employee
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Monitor remote machine's memory using Nagios Core

Post by vinothsethuram »

Added nrpe 5666/tcp # NRPE in services file and executed this command

iptables -A INPUT -p tcp --dport 5666 -j ACCEPT
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor remote machine's memory using Nagios Core

Post by tmcdonald »

You forgot the -m flag, might make a difference:

Code: Select all

iptables -A INPUT -p tcp -m tcp --dport 5666 -j ACCEPT
Then also make sure to run:

Code: Select all

service iptables save
so changes will persist after a reboot.
Former Nagios employee
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Monitor remote machine's memory using Nagios Core

Post by vinothsethuram »

Still getting port 5666: Connection refused
Locked