Configuring Notifications in Nagios Core

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.
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Configuring Notifications in Nagios Core

Post by mkot »

Hi all,
I have installed and configured almost all in Nagios ( monitoring many hosts at our company - 4 different subnets). Now I need to configure notifications, but I do not know how to do it.
I want configure it thai I only get notifications when host has to much CPU/RAM/HDD usage. I do not want get notification if host is turned off* (employe finished work) because my notification@mail will get spammed. How can I configure it?

I had my own cfg files (I do not use windows.cfg, printers.cfg, switch.cfg and localhost.cfg):
/usr/local/nagios/etc/object/
taiwa/TAIWA.cfg (windows PC/NB/SRV hosts), sw-wa.cfg (switches, AP, VoIP tel), druk-wa.cfg (network printers), linux-wa.cfg (linux servers, localhost)
taild/TAILD.cfg (windows PC/NB/SRV hosts), sw-ld.cfg (switches, AP, VoIP tel), druk-ld.cfg (network printers), linux-ld.cfg (linux servers)
taikr/TAIKR.cfg (windows PC/NB/SRV hosts), sw-kr.cfg (switches, AP, VoIP tel), druk-kr.cfg (network printers), linux-kr.cfg (linux servers)
taipn/TAILD.cfg (windows PC/NB/SRV hosts), sw-pn.cfg (switches, AP, VoIP tel), druk-pn.cfg (network printers), linuxpn.cfg (linux servers)
* Only Serwers need to be monitored 24x7
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Notifications in Nagios Core

Post by tmcdonald »

In order to monitor internal metrics like CPU and HD space, you will need to install an agent on the remote machine or (for Windows) use WMI. I would recommend using our NCPA software since it is cross-platform and simple to install and configure. http://assets.nagios.com/downloads/ncpa ... index.html

Once you had that working we can get started on configuring the check commands.
Former Nagios employee
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Configuring Notifications in Nagios Core

Post by mkot »

Hi tmcdonald, I've have already installed NSClient++ 0.3.9 (at Win 2k/XP) and NSCP 0.4.1.90 (at Vista/7). It's all working, I get informations about CPU/RAM/HDD usage, PING and Uptime. But I'm interested to get only notifications if CPU/RAM/HDD usage will be to high. I don't need to know if PING for PC with IP (V.X.Y.Z) don't get respond because employe could finish his work (timeperiod_name nonworkhours isn't good for me, because some workers working from 6AM-2PM, some from 7AM-3PM, etc - we have shift work here).
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Notifications in Nagios Core

Post by tmcdonald »

Are you unable to delete/disable the PING checks for some reason? Or disable the alerts for them?
Former Nagios employee
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Configuring Notifications in Nagios Core

Post by mkot »

Hmm, maybe I wrote it wrong:
I can disable/delete PING check option, acctually I do not need that feature. But when PC goes shoot down than I get errors like:
Additional Info:

No route to host
or
Additional Info:

Połączenie odrzucone /connection rejected/
etc. I want get alert only when CPU/MEMORY/HDD usage is to high, eg. Error/Warning: CPU usage is 80% or RAM usage is 80% or HDD free space is 10 GB, etc. I do not need information about network issues between Nagios -> monitored PC because they are not always true. I hope I wrote it clear :)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Notifications in Nagios Core

Post by tmcdonald »

Well if your host goes down you are going to get alerts because you can't monitor the CPU of a powered-off machine. I mean you can, but the load is always 0 ;).

What you probably want to do is use Passive Checks. This is where instead of Nagios checking the host, the host sends results to Nagios. This way if the host goes down Nagios doesn't know (or care). Nagios is perfectly fine if the machine does not send results for 3 days. It will just maintain the last status it was in.

http://assets.nagios.com/downloads/nagi ... Checks.pdf
Former Nagios employee
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Configuring Notifications in Nagios Core

Post by mkot »

Thanks.
The monitoring server must be running Nagios XI version 2011R1 or higher
, does that mean that Nagios Core won't be good? I'm using Nagios Core ;)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Configuring Notifications in Nagios Core

Post by slansing »

No, Nagios Core would be fine, it's just there because at that time we were not shipping a pre-baked NSCA server with XI installations, that is something that would need to be set up on the Core Server and is standard with Nagios XI. The NSCA server essentially receives and parses forwarded check information from your remote NSCA monitored servers.
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Configuring Notifications in Nagios Core

Post by mkot »

Ok, i'll try enable this feature :) Thanks.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Notifications in Nagios Core

Post by tmcdonald »

We'll keep this thread open for a bit in case you have problems with anything.
Former Nagios employee
Locked