Re: problem with nrpe and ubuntu [solved]
Posted: Fri Aug 04, 2017 2:12 am
Well 2 machines magically worked on their own. 1 remains.
here is its configuration:
pwd
/etc/nagios
ls -l
total 20
-rwxr-xr-x 1 nagios nagios 8200 авг 4 09:38 nrpe.cfg
drwxr-xr-x 2 nagios nagios 4096 май 8 19:01 nrpe.d
-rwxr-xr-x 1 nagios nagios 117 май 8 19:00 nrpe_local.cfg
/etc/nabios/nrpe.cfg
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda5
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 20 -c 10
command[check_mem]=/usr/lib/nagios/plugins/check_mem.pl -u -w 80 -c 90
command[check_cpu]=/usr/lib/nagios/plugins/check_cpu.sh -i 5 -w 80 -c 90
cd /usr/lib/nagios/plugins/
sysadmin@ntp2:/usr/lib/nagios/plugins$
ls -l
total 2484
-rwxr-xr-x 1 nagios nagios 55856 апр 5 2016 check_apt
-rwxr-xr-x 1 nagios nagios 2344 апр 5 2016 check_breeze
.....
sudo passwd --delete nagios
passwd: password expiry information changed.
sudo chage -I -1 -m 0 -M 99999 -E -1 nagios
$ sudo -s -u nagios ./check_nrpe -H 127.0.0.1
NRPE v2.15
sudo ps cax | grep nrpe
1177 ? Ss 0:00 nrpe
and the problem remained.
then as i was writing, i remember that the other 2 machines have been rebooted while this was not. So I rebooted and voila, the magic occurred.
sudo -s -u nagios ./check_nrpe -H 127.0.0.1 -c check_disk
DISK OK - free space: / 6776 MB (70% inode=82%);| /=2879MB;8156;9176;0;10196
important to notice that i didn't reset the nagios account. can you make logic out of this?
here is its configuration:
pwd
/etc/nagios
ls -l
total 20
-rwxr-xr-x 1 nagios nagios 8200 авг 4 09:38 nrpe.cfg
drwxr-xr-x 2 nagios nagios 4096 май 8 19:01 nrpe.d
-rwxr-xr-x 1 nagios nagios 117 май 8 19:00 nrpe_local.cfg
/etc/nabios/nrpe.cfg
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda5
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 20 -c 10
command[check_mem]=/usr/lib/nagios/plugins/check_mem.pl -u -w 80 -c 90
command[check_cpu]=/usr/lib/nagios/plugins/check_cpu.sh -i 5 -w 80 -c 90
cd /usr/lib/nagios/plugins/
sysadmin@ntp2:/usr/lib/nagios/plugins$
ls -l
total 2484
-rwxr-xr-x 1 nagios nagios 55856 апр 5 2016 check_apt
-rwxr-xr-x 1 nagios nagios 2344 апр 5 2016 check_breeze
.....
sudo passwd --delete nagios
passwd: password expiry information changed.
sudo chage -I -1 -m 0 -M 99999 -E -1 nagios
$ sudo -s -u nagios ./check_nrpe -H 127.0.0.1
NRPE v2.15
sudo ps cax | grep nrpe
1177 ? Ss 0:00 nrpe
and the problem remained.
then as i was writing, i remember that the other 2 machines have been rebooted while this was not. So I rebooted and voila, the magic occurred.
sudo -s -u nagios ./check_nrpe -H 127.0.0.1 -c check_disk
DISK OK - free space: / 6776 MB (70% inode=82%);| /=2879MB;8156;9176;0;10196
important to notice that i didn't reset the nagios account. can you make logic out of this?