Page 1 of 1

Status UNKNOWN for Services that don't exist

Posted: Mon Jun 08, 2015 4:00 pm
by skahlam
Our current monitoring solution is such that everything we want to monitor exists in a template that is then applied to our servers.
For Example> Disk checking is configured Drive c through k. If the server has any of those drives they will be checked. If the server does not have some of those drives then the check is ignored.
In Nagios it appears that if the server does not have a drive or a service that is identified as a check then an UNKNOWN status appears vs. to simply not check or report.
I would like to know either A) Can nagios be configured to do smart checking whereby if a drive or service does not exist then don't check or report on it. And having said that I don't want to have to go into each server and manually set this.
B) Can I at least change the color of the UNKNOWN status to something other than alarming Orange.... and how is this done (easily accomplished)

Thanks in advance :D

Re: Status UNKNOWN for Services that don't exist

Posted: Mon Jun 08, 2015 4:16 pm
by jdalrymple
I do this on Windows using nscp no problem. Here is the syntax:

Code: Select all

define command{
        command_name    check_nrpe_nscp
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ $ARG1$
        }


define service{
        use                                     generic-service
        hostgroup_name                          windows-hg
        service_description                     fixed_disks
        display_name                            Windows Disks
        check_command                           check_nrpe_nscp!-c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warning=used > 90%" "critical=used > 94%"
        check_interval                          30
        max_check_attempts                      1
        notification_interval                   720
        }
It results in 1 service representing all fixed disks from C to Z, but it works. If you need to have a service for each drive things might get a little more muddy.

B) Probably can be done fairly easily in the CSS, I'd shoot for solving the problem the other way though.

Re: Status UNKNOWN for Services that don't exist

Posted: Mon Jun 08, 2015 5:24 pm
by skahlam
Thanks for the reply. I am new to nagios and opted to use nsclient++ do I now need to use nscp?
Also how would this work for service checks on IIS, SMTP etc.

Re: Status UNKNOWN for Services that don't exist

Posted: Tue Jun 09, 2015 1:17 am
by Box293
nscp is what the developer now calls NSClient++, they are the same.

Have a look at the examples under my "Common Checks" section which will may help understand some of the things that can be checked.

http://sites.box293.com/nagios/guides/common-checks