Page 1 of 2

Windows missing disk

Posted: Fri Jun 02, 2017 6:20 am
by mdomanski
Hello,
I have two ways of disks monitoring on Windows via nrpe ... and none of them are perfect.

1. Single service for every disk, ex. Disk usage C:, Disk usage D: etc - fails when new disk appears (E: plugged in today :) ).
2. All disk at one service but I receive only one critical notification when C: reached the critical state, when D: also came to critical there is no alert ...

Do You know how to resolve that ?

Re: Windows missing disk

Posted: Fri Jun 02, 2017 10:10 am
by avandemore
1. Can you explain explicitly what failed?
2. Can you show your service definition?

Re: Windows missing disk

Posted: Fri Jun 02, 2017 10:22 am
by dappa_don
i se this client installed on windoze machines, i think use the check_nt in nagios and works perfectly

https://www.nsclient.org/download/

Re: Windows missing disk

Posted: Fri Jun 02, 2017 10:33 am
by avandemore
That didn't answer either of my questions and seems to be a statement about something else, but have you seen our own agent NCPA?

https://www.nagios.org/ncpa/help.php

It has more comprehensive disk monitoring in some ways.

Re: Windows missing disk

Posted: Sat Jun 03, 2017 11:14 am
by mdomanski
avandemore wrote:1. Can you explain explicitly what failed?
1. I mean that this way of monitoring fail when we add manually each disk and the new one will appear (Disk E:). It will not be automaticly monitored

Ex.

Code: Select all

define service {
service_desc          Disk C: Usage
host_name            Windows_1
check_command                   check_nrpe_disk!C:!80!90
.
.
.
}
Ex.

Code: Select all

define service {
service_desc          Disk D: Usage
host_name            Windows_1
check_command                   check_nrpe_disk!D:!80!90
.
.
.
}
avandemore wrote:2. Can you show your service definition?
and the second way

Code: Select all

define service {
        service_description             check_all_disks
        host_name                       windows_1
        check_command                   check_nrpe!drivesize
        max_check_attempts              3
        check_interval                  5
        retry_interval                  1
        check_period                    all_day
        notification_interval           30
        notification_period             all_day
        contacts                        md
}

Code: Select all

define_command{
command_name        check_nrpe
command_line           $USER4$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
and nsclinent.ini command

Code: Select all

drivesize = check_drivesize "crit=free<1g" drive=* "filter=type in ('fixed', 'remote')"

And the problem is when one of three disks reach the critical level, service will generate alert, but few minutes later second drive reach the critical level too, I will not receive alert with 2nd disk because service already was in the critical state

Re: Windows missing disk

Posted: Mon Jun 05, 2017 10:50 am
by avandemore
1. Correct in scenario 1 you'd need separate checks.
2. Correct, an single notification event is tied directly to a service.

It sounds like you want some type of infrastructure to dynamically monitor all disks independently. There is nothing which does this to my knowledge. Such a setup would be possible but it would take something that is aware of the remote configuration as it should be and then have the appropriate configuration applied to Nagios. You might want to look a real configuration tool like Ansible or something. Nagios XI also has an API that could be leveraged for some of this.

Re: Windows missing disk

Posted: Mon Jun 05, 2017 3:19 pm
by mdomanski
avandemore wrote:2. Correct, an single notification event is tied directly to a service.
exactly :(
I combined with the stalking option ... but it starts spam me with every change of disk usage ... even 1MB

So there is no simple way to prevent for non monitored disks

Re: Windows missing disk

Posted: Mon Jun 05, 2017 3:31 pm
by avandemore
I combined with the stalking option ... but it starts spam me with every change of disk usage ... even 1MB
That is why I didn't recommend it.

No as I already stated there is nothing that will dynamically alter services in Nagios as things come in and out of existence. You'd need something more to accomplish that. If you want to pursue it you may find this document helpful:
https://assets.nagios.com/downloads/nag ... gement.pdf

We do offer custom development for a fee. If you are interested let me know and I'll get you in touch with the correct people.

Re: Windows missing disk

Posted: Mon Jun 05, 2017 3:41 pm
by mdomanski
for that moment I need to do something with it on my own :)
thanks for being helpful

Re: Windows missing disk

Posted: Mon Jun 05, 2017 3:45 pm
by avandemore
Good luck thanks for using Nagios!