Error in AWS EC2 Uubuntu Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ivp2015
Posts: 142
Joined: Fri Feb 20, 2015 12:32 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by ivp2015 »

Hi i have send wrong info on last post

also i have tried to check with

allowed_hosts=127.0.0.1,115.114.12.4,182.74.168.35

allowed_hosts=127.0.0.1 115.114.12.4 182.74.168.35
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by tgriep »

If you are running the NRPE agent using xinetd, you would edit the following file and add the IP address in the only_from option with spaces between them. No commas.
/etc/xinetd.d/nrpe

Code: Select all

only_from       = 127.0.0.1 115.114.12.4 182.74.168.35
If you are running the NRPE as a daemon, you would edit the nrpe.cfg file and add the IP address in the allowed_hosts option with commas between the addresses.

Code: Select all

allowed_hosts=127.0.0.1, 115.114.12.4,182.74.168.35
Be sure to check out our Knowledgebase for helpful articles and solutions!
ivp2015
Posts: 142
Joined: Fri Feb 20, 2015 12:32 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by ivp2015 »

Done

root@ip-172-31-28-18:~# nano /etc/xinetd.d/nrpe
GNU nano 2.2.6 File: /etc/xinetd.d/nrpe

# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 115.114.12.4 182.74.168.35
}

2) /usr/local/nagios/etc/nrpe.cfg
allowed_hosts=127.0.0.1, 115.114.12.4,182.74.168.35

3) root@ip-172-31-28-18:~# nano /etc/nagios/nrpe.cfg
allowed_hosts=127.0.0.1, 115.114.12.4,182.74.168.35

4) root@ip-172-31-28-18:~# service xinetd restart
xinetd stop/waiting
xinetd start/running, process 19831
root@ip-172-31-28-18:~#

but still not working
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by tgriep »

Can you login to the ubuntu server in a shell, run the following commands and post the output?

Code: Select all

netstat -apn |grep 5666
nmap 127.0.0.1 -p 5666
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
Be sure to check out our Knowledgebase for helpful articles and solutions!
ivp2015
Posts: 142
Joined: Fri Feb 20, 2015 12:32 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by ivp2015 »

1) root@ip-172-31-28-18:~# netstat -apn |grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 5341/nrpe
tcp6 0 0 :::5666 :::* LISTEN 5341/nrpe

2) root@ip-172-31-28-18:~# nmap 127.0.0.1 -p 5666

Starting Nmap 6.40 ( http://nmap.org ) at 2017-04-06 13:57 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000044s latency).
PORT STATE SERVICE
5666/tcp open nrpe

Nmap done: 1 IP address (1 host up) scanned in 1.03 seconds

3) root@ip-172-31-28-18:~# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v2.15
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by tgriep »

That test looks like it worked.

Edit the nrpe.cfg file on that remote host and add the following line at the bottom

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$ $ARG2$ $ARG3$
Then restart the NRPE Agent by running

Code: Select all

[code]service nrpe restart
[/code]

Then login to the Nagios server, run the following commands, replacing xxx.xxx.xxx.xxx with the IP address of the remote server.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx
/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_disk -a '-w 70% -c 80% -p /
'

If they fail, make sure to login to the AWS management interface and allow port 5666 inbound in the security settings for that host.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ivp2015
Posts: 142
Joined: Fri Feb 20, 2015 12:32 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by ivp2015 »

Hi Team,

I have done all these things and port 5666 are already allowed for our environment,

In monitoring Wizard NRPE is working on this and Linux server monitoring is still not working we needs to monitoring disk utilization and CPU

Please also check the screen shots,
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error in AWS EC2 Uubuntu Monitoring

Post by dwhitfield »

You need to add the commands for the others like he had you do for check_disk. Both of those wizards use nrpe so you only need to do it once.
ivp2015
Posts: 142
Joined: Fri Feb 20, 2015 12:32 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by ivp2015 »

Can you please share document how can i add ?
Thanks
ivp2015
Posts: 142
Joined: Fri Feb 20, 2015 12:32 am

Re: Error in AWS EC2 Uubuntu Monitoring

Post by ivp2015 »

also its show error on remote server

root@ip-172-31-28-18:~# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_disk -a '-w 70% -c 80% -p /'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
root@ip-172-31-28-18:~#
You do not have the required permissions to view the files attached to this post.
Locked