Error in AWS EC2 Uubuntu Monitoring
Re: Error in AWS EC2 Uubuntu Monitoring
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
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
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
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.
/etc/xinetd.d/nrpe
Code: Select all
only_from = 127.0.0.1 115.114.12.4 182.74.168.35Code: Select all
allowed_hosts=127.0.0.1, 115.114.12.4,182.74.168.35Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error in AWS EC2 Uubuntu Monitoring
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
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
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.1Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error in AWS EC2 Uubuntu Monitoring
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
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
That test looks like it worked.
Edit the nrpe.cfg file on that remote host and add the following line at the bottom
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.'
If they fail, make sure to login to the AWS management interface and allow port 5666 inbound in the security settings for that host.
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$Code: Select all
[code]service nrpe restartThen 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!
Re: Error in AWS EC2 Uubuntu Monitoring
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,
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
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
Can you please share document how can i add ?
Thanks
Thanks
Re: Error in AWS EC2 Uubuntu Monitoring
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:~#
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.