Cluster Storage on Windows.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
antorres
Posts: 20
Joined: Thu Aug 22, 2013 12:11 pm

Cluster Storage on Windows.

Post by antorres »

Hi there.

I've been searching for a way to monitor a Cluster Storage mounted on windows, and I cannot make it work. I've tried all plugins available but with no results.

My client said to me, that back in time, when they used tivoli, it only required the IP and some sort of authentication (his words) and he used to see all the hosts connected to the cluster, as well as the virtual machines running on those hosts.

First, I've searched for a Nagios configuration wizard, then at the Nagios exchange for plugins but still cannot make it work.

Does Nagios have an official plugin for this? How did you guys workaround this problem in the past? What should I do in order to make it well?

Any help will be very helpful.

Thank you all in advance.

Best Regards.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Cluster Storage on Windows.

Post by mcapra »

This plugin checks remaining space of a Cluster Shared Volume (in HyperV):
https://exchange.nagios.org/directory/P ... rV/details

My understanding is that you'd like to keep track of when members of a Cluster Storage drop out of the cluster? That should be doable via Powershell and the Get-ClusterResource cmdlet:
https://technet.microsoft.com/en-us/lib ... 61004.aspx

Though some Powershell know-how would be required.
Former Nagios employee
https://www.mcapra.com/
dwasswa

Re: Cluster Storage on Windows.

Post by dwasswa »

Thanks @mcapra
antorres
Posts: 20
Joined: Thu Aug 22, 2013 12:11 pm

Re: Cluster Storage on Windows.

Post by antorres »

I have already try that , but that's just free space remaining, and it doesn't work for me
This plugin checks remaining space of a Cluster Shared Volume (in HyperV):
https://exchange.nagios.org/directory/P ... rV/details
I got "error cannot divide by 0".
Tomorrow I will be trying one more time and I going to paste here my results.

Thank you very much for your kind help.

Best Regards
kyang

Re: Cluster Storage on Windows.

Post by kyang »

@antorres,

Sounds good, let us know about your results.
If it works great! If not, gives us the details.
antorres
Posts: 20
Joined: Thu Aug 22, 2013 12:11 pm

Re: Cluster Storage on Windows.

Post by antorres »

Hi there.

Following with the thread, the command on power shell follow like these.

Code: Select all

PS C:\Program Files\NSClient++\scripts> .\check_csv_freespace.ps1 -n Datos -w 80 -c 90
OK - Datos total: 836GB, used: 48GB (5%), free: 788GB (94%) | 'Datos used_space'=48Gb;668;752;0;836
but I've had encounter a lot of troubles in order to send the answer to nagios.

my NSC.ini file is like these.

is there anything wrong below?

Code: Select all

[External Script]
;# COMMAND TIMEOUT
;  This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=1
;
;# COMMAND ALLOW NASTY META CHARS
;  This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
;allow_nasty_meta_chars=0
;
;# SCRIPT DIRECTORY
;  All files in this directory will become check commands.
;  *WARNING* This is undoubtedly dangerous so use with care!
;script_dir=c:\my\script\dir

check_csv_freespace=scripts\check_csv_freespace.ps1 -n Datos -w 70 -c 85
check_csv_freespace = cmd /c echo scripts\check_csv_freespace.ps1 "--argument" "$ARG1$" "$ARG2$" --foo --bar; exit($lastexitcode) | powershell.exe -command -

[Script Wrappings]
vbs=cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
ps1=cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
bat=scripts\%SCRIPT% %ARGS%

[External Scripts]
;check_es_long=scripts\long.bat
;check_es_ok=scripts\ok.bat
;check_es_nok=scripts\nok.bat
;check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs
;check_powershell_warn=cmd /c echo scripts\powershell.ps1 | powershell.exe -command -
;command[check_csv_freespace]=cmd /c echo .check_csv_freespace.ps1 -n $ARG1$ -w $ARG2$ -c $ARG3$ | powershell.exe -command -
check_csv_freespace = cmd /c echo scripts\check_csv_freespace.ps1 "--argument" "$ARG1$" "$ARG2$" --foo --bar; exit($lastexitcode) | powershell.exe -command -
check_csv_freespace=scripts\check_csv_freespace.ps1 -n Datos -w 70 -c 85

[root@server libexec]# ./check_nrpe -H 10.10.10.73 -c check_csv_freespace.ps1
UNKNOWN: No handler for that command


Thank you very much in advance.
kyang

Re: Cluster Storage on Windows.

Post by kyang »

Try this maybe? Then run it from check_nrpe again and let us know.

Code: Select all

[/settings/external scripts/wrapped scripts]
check_csv_freespace=scripts\check_csv_freespace.ps1 -n Datos -w 70 -c 85

[/settings/external scripts/scripts]
check_csv_freespace=cmd /c echo scripts\\check_csv_freespace.ps1 -n $ARG1$ -w $ARG2$ -c $ARG3$ | powershell.exe -command -
Here are a few articles that may help you set it up.

https://support.nagios.com/kb/article.php?id=528

https://support.nagios.com/kb/article/n ... mmand.html
Locked