Windows missing disk

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.
mdomanski
Posts: 23
Joined: Thu Dec 15, 2016 11:17 am

Windows missing disk

Post 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 ?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Windows missing disk

Post by avandemore »

1. Can you explain explicitly what failed?
2. Can you show your service definition?
Previous Nagios employee
dappa_don
Posts: 8
Joined: Tue May 30, 2017 9:57 am

Re: Windows missing disk

Post 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/
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Windows missing disk

Post 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.
Previous Nagios employee
mdomanski
Posts: 23
Joined: Thu Dec 15, 2016 11:17 am

Re: Windows missing disk

Post 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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Windows missing disk

Post 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.
Previous Nagios employee
mdomanski
Posts: 23
Joined: Thu Dec 15, 2016 11:17 am

Re: Windows missing disk

Post 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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Windows missing disk

Post 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.
Previous Nagios employee
mdomanski
Posts: 23
Joined: Thu Dec 15, 2016 11:17 am

Re: Windows missing disk

Post by mdomanski »

for that moment I need to do something with it on my own :)
thanks for being helpful
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Windows missing disk

Post by avandemore »

Good luck thanks for using Nagios!
Previous Nagios employee
Locked