NCPA to monitor all disks on windows server
-
Bala.Mutyam
- Posts: 97
- Joined: Wed Apr 29, 2020 12:18 pm
NCPA to monitor all disks on windows server
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
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
Re: NCPA to monitor all disks on windows server
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.
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.
Re: NCPA to monitor all disks on windows server
@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
@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
@cdienger: Thank you.
Re: NCPA to monitor all disks on windows server
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.
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
@lmiltchev - Thanks for the update. Actually i'm looking for a plugin to monitor windows server disks/drives with one check.
Re: NCPA to monitor all disks on windows server
This is what check_multi does - combines multiple checks into one.
Example service:
Example command:
Example config (with a couple of checks):
Example of the plugin, run from the CLI:
Example of the service in the GUI:
Is this something that you are looking for?
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
}Code: Select all
define command {
command_name check_multi
command_line $USER1$/check_multi -f $USER1$/multi
}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 90Code: 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.266985You 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
@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.
Re: NCPA to monitor all disks on windows server
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:
Currently, this is the only option that I could offer.
Example:
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H <client ip> -t <token> -M 'plugins/<your script>Be sure to check out our Knowledgebase for helpful articles and solutions!