Page 1 of 1

Nagios NRPE configuration

Posted: Tue Apr 08, 2014 11:55 am
by sheetzdw
nrpe.cfg
(8.17 KiB) Downloaded 488 times
I am trying to figure out alerts on a server.

It was not being monitored so I turned monitoring on thinking it had been configured already.
Then I got alerts

Code: Select all

Host	Status Info	Service
devl-vmwnexus1	Connection refused by host	NRPE CPU Load
devl-vmwnexus1	Connection refused by host	NRPE Check Apache
devl-vmwnexus1	Connection refused by host	NRPE Check HDA1
devl-vmwnexus1	Connection refused by host	NRPE Check Java
devl-vmwnexus1	Connection refused by host	NRPE Check NetBios
devl-vmwnexus1	Connection refused by host	NRPE Check Postgres
devl-vmwnexus1	Connection refused by host	NRPE Check SSH
devl-vmwnexus1	Connection refused by host	NRPE Check Samba
devl-vmwnexus1	Connection refused by host	NRPE Check Users
devl-vmwnexus1	Connection refused by host	NRPE Check Zombie Processes
devl-vmwnexus1	Connection refused by host	NRPE Check winbind
devl-vmwnexus1	Connection refused by host	NRPE Check_mem
so I installed NRPE plugin 2.13
checked the nrpe file, /usr/local/nagios/etc/nrpe.cfg and the /etc/services file

what else am I missing?

Re: Nagios NRPE configuration

Posted: Tue Apr 08, 2014 1:17 pm
by slansing
Are you running NRPE in daemon mode, or under xinetd? Be sure to allow your nagios server in the allowed hosts section, and set 'dont blame nrpe = 1' Depending on if you are running daemon mode, or xinetd you would need to restart it, such as:

Code: Select all

service xinetd restart
Also. make sure port 5666 is open.

Re: Nagios NRPE configuration

Posted: Tue Apr 08, 2014 3:12 pm
by sheetzdw
running under xinetd mode
host is allowed
restarted service

better but now I get

devl-vmwnexus1 DISK CRITICAL - /dev/hda1 is not accessible: No such file or directory NRPE Check HDA1

Re: Nagios NRPE configuration

Posted: Tue Apr 08, 2014 3:16 pm
by tmcdonald
sheetzdw wrote:/dev/hda1 is not accessible: No such file or directory
Is there a /dev/hda1 device on that server?

Code: Select all

df -h

Re: Nagios NRPE configuration

Posted: Tue Apr 08, 2014 4:57 pm
by sheetzdw
@DEVL-VMWNexus1:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/DEVL--VMWNexus1-root 62G 58G 1.3G 98% /
udev 3.9G 4.0K 3.9G 1% /dev
tmpfs 1.6G 9.3M 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 0 3.9G 0% /run/shm
/dev/sda1 228M 89M 127M 42% /boot


so can I just edit the nrpe.cfg? or do I need to change this in other places also?

seems like I need ot change it in services or somewhere else

Re: Nagios NRPE configuration

Posted: Wed Apr 09, 2014 9:40 am
by slansing
Well, we would need to know what check that was specifically, it is likely that you are passing that in an argument to check_disk from the nagios server, so you would need to change that in the service config.

Re: Nagios NRPE configuration

Posted: Thu Apr 10, 2014 9:32 am
by sheetzdw
Tell me if this sounds crazy but I believe we have a Linux Servers host group and this is part of default checks on Linux servers.
SO how can I disable for one host when it is part of a group?

Re: Nagios NRPE configuration

Posted: Thu Apr 10, 2014 11:53 am
by slansing
You can do this by opening the definition and finding that host's name, then add a bang in front of it like so:

Code: Select all

!hostname
This essentially excludes an object from a definition.

Re: Nagios NRPE configuration

Posted: Thu Apr 10, 2014 1:39 pm
by sheetzdw
that removes it from all checks correct?

I want all Linux server group services checked on this host but one

not sure I understand how host groups and service groups work with Nagios

Re: Nagios NRPE configuration

Posted: Fri Apr 11, 2014 10:19 am
by sreinhardt
Yes that would remove the host from all checks applied to the hostgroup, if that is where you apply it. You might try adding !hostname to the hostname field on the services that you do not wish to check and see if this applies correctly for you.