NCPA to monitor all disks on windows server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

NCPA to monitor all disks on windows server

Post by Bala.Mutyam »

Hi there,

Is it possible to configure NCPA to monitor all disks/drives on a windows server? I've seen some old posts related to this back in 2018 not recently.

Thanks
Bala
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NCPA to monitor all disks on windows server

Post by ssax »

There is no built-in NCPA API endpoint that allows you to check all disks in a single check at this time.

Your only option would be to find a plugin that does it and use the plugins API endpoint to call the plugin, see here for more info:

https://www.nagios.org/ncpa/help.php#ap ... es-plugins

If you would like that added to NCPA, please open a feature request here as there doesn't look like there's an open one for this:

https://github.com/NagiosEnterprises/ncpa/issues


Thank you.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NCPA to monitor all disks on windows server

Post by cdienger »

@Bala.Mutyam I pinged dev and we'll be reopening https://github.com/NagiosEnterprises/ncpa/issues/178 so there is no need to open a new feature request.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NCPA to monitor all disks on windows server

Post by Bala.Mutyam »

@ssax Thank you. Would you suggest a plugin which works with NCPA please?
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NCPA to monitor all disks on windows server

Post by Bala.Mutyam »

@cdienger: Thank you.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA to monitor all disks on windows server

Post by lmiltchev »

You could try using a 3rd party plugin, called check_multi, which can combine multiple checks into one. I haven't used it lately, and I am not sure if it's going to work well with the latest version of XI, but you could give it a try. It is listed on the Nagios Exchange here:

https://exchange.nagios.org/directory/P ... ti/details

The one, listed on GitHub could a a newer version - you can check this one as well:

https://github.com/flackem/check_multi

Once you have your check in place, tested from the command line, you could add a command and a service to Nagios XI by following the document below:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NCPA to monitor all disks on windows server

Post by Bala.Mutyam »

@lmiltchev - Thanks for the update. Actually i'm looking for a plugin to monitor windows server disks/drives with one check.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA to monitor all disks on windows server

Post by lmiltchev »

This is what check_multi does - combines multiple checks into one.

Example service:

Code: Select all

define service {
    host_name                OldWorkstation-NCPA
    service_description      Check Drives
    use                      xiwizard_generic_service
    check_command            check_multi!!!!!!!!
    contacts                 nagiosadmin
    register                 1
}
Example command:

Code: Select all

define command {
    command_name    check_multi
    command_line     $USER1$/check_multi -f $USER1$/multi
}
Example config (with a couple of checks):

Code: Select all

command[Disk_C]=/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -P 5693 -M 'disk/logical/C:|' -w 70 -c 90
command[Disk_D]=/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -P 5693 -M 'disk/logical/D:|' -w 70 -c 90
Example of the plugin, run from the CLI:

Code: Select all

[nagios@main-nagios-xi libexec]$/usr/local/nagios/libexec/check_multi -f multi
OK - 2 plugins checked, 2 ok
[ 1] Disk_C OK: Used disk space was 58.20 % (Used: 62.58 GiB, Free: 44.86 GiB, Total: 107.44 GiB)  [Disk_C perfdata discarded for 'used': bad UOM 'GiB' in data '62.58GiB;75;97;' ]
[ 2] Disk_D OK: Used disk space was 7.90 % (Used: 74.01 GiB, Free: 857.27 GiB, Total: 931.29 GiB)  [Disk_D perfdata discarded for 'used': bad UOM 'GiB' in data '74.01GiB;652;838;' ]|check_multi::check_multi::plugins=2 time=0.266985
Example of the service in the GUI:
example-01.jpg
Is this something that you are looking for?
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NCPA to monitor all disks on windows server

Post by Bala.Mutyam »

@lmiltchev: Hi, thanks for that but that's not i'm after. I don't to combine multiple check, just a check monitor all disk on windows server.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA to monitor all disks on windows server

Post by lmiltchev »

Unfortunately, there is no such option in NCPA. If you could find a script, e.g. PowerShell script, that can monitor all drives on Windows (locally) via one check, you could call it via NCPA from the Nagios XI server.

Example:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <client ip> -t <token> -M 'plugins/<your script>
Currently, this is the only option that I could offer.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked