Page 5 of 9
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Wed Apr 05, 2017 8:44 am
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
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Wed Apr 05, 2017 4:09 pm
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
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Thu Apr 06, 2017 2:51 am
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
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Thu Apr 06, 2017 8:52 am
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
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Thu Apr 06, 2017 9:02 am
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
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Thu Apr 06, 2017 2:11 pm
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]
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.
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Thu Apr 13, 2017 5:11 pm
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,
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Thu Apr 13, 2017 5:48 pm
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.
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Sat Apr 15, 2017 5:04 am
by ivp2015
Can you please share document how can i add ?
Thanks
Re: Error in AWS EC2 Uubuntu Monitoring
Posted: Sat Apr 15, 2017 5:10 am
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:~#