Nagios NRPE configuration

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Nagios NRPE configuration

Post by sheetzdw »

nrpe.cfg
(8.17 KiB) Downloaded 393 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NRPE configuration

Post 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.
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Nagios NRPE configuration

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios NRPE configuration

Post 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
Former Nagios employee
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Nagios NRPE configuration

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NRPE configuration

Post 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.
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Nagios NRPE configuration

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NRPE configuration

Post 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.
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Nagios NRPE configuration

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios NRPE configuration

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked