monitor clustered shared volumes in 2012 R2 using Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

monitor clustered shared volumes in 2012 R2 using Nagios

Post by jyoti22 »

I have the requirement of monitoring CSVs (clustered shared volumes) in Server 2012 R2 using Nagios. Can anyone help me on how we can work on this?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by hsmith »

Can you take a look at this plugin? May be slightly outdated, but it could work. https://exchange.nagios.org/directory/P ... rV/details
Former Nagios Employee.
me.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by rkennedy »

With a quick search I was able to find this plugin -
https://exchange.nagios.org/directory/P ... rV/details

Also, looks like a power shell script was made in a previous post that worked over NSClient++. Detailed instructions can be found below -
https://support.nagios.com/forum/viewto ... 088#p51332
Former Nagios Employee
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by jyoti22 »

I have copied the script on C:/program files/nsclient++/scripts/check_csv and made the changes in nsclient.ini as per the post. Below is the copy of nsclient file

Code: Select all

# If you want to fill this file with all avalible options run the following command:
#   nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
#   nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help


; Undocumented section
[/settings/default]

; Undocumented key
allowed hosts = 10.161.xx.xx

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

[/settings/external scripts/wrapped scripts]
check_csv = check_csv.ps1

[/settings/external scripts/alias]
alias_updates = check_csv -warning 0 -critical 0

[/settings/NRPE/server]
allowed hosts = (your monitoring host here)
allow arguments = true
allow nasty characters = true
port = 5666
timeout = 60

[/settings/external scripts]
allow arguments = 1
allow nasty characters = 1
timeout = 60

; Undocumented section
[/settings/NRPE/server]

; Undocumented key
ssl options = no-sslv2,no-sslv3

; Undocumented key
verify mode = peer-cert

; Undocumented key
insecure = false


; Undocumented section
[/modules]

; Undocumented key
CheckExternalScripts = 1

; Undocumented key
CheckHelpers = 1

; Undocumented key
CheckEventLog = 1

; Undocumented key
CheckNSCP = 1

; Undocumented key
CheckDisk = 1

; Undocumented key
CheckSystem = 1

; Undocumented key
NSClientServer = 1

; Undocumented key
NRPEServer = 1

After this I created the command "$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c check_csv"

When I run he command I get below error

COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.163.224.67 -p 5666 -t 30 -c check_csv
OUTPUT: CHECK_NRPE: Error - Could not complete SSL handshake.

Please help
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by Box293 »

Can you update these settings please:

NOTE: I've removed
; Undocumented key
ssl options = no-sslv2,no-sslv3

Code: Select all

; Undocumented section
[/settings/NRPE/server]

; Undocumented key
verify mode = none

; Undocumented key
insecure = true

allow arguments = true

allow nasty characters = true
Then restart your NSClient++ service.

Does this work now?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by jyoti22 »

After making changes I got below output

COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.163.xx.xx -p 5666 -t 30 -c check_csv
OUTPUT: CRITICAL -CSV Status is above threshold capacity

How can I get the threshold details in the output?
Also can we monitor latency fo these CSV's?
Last edited by jyoti22 on Tue Dec 15, 2015 8:06 pm, edited 1 time in total.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by Box293 »

Change the $ToSend lines:

Code: Select all

if($critical -eq 2)
{
$ToSend = "CRITICAL -CSV Status of $csvinfo.Partition.PercentFree is above threshold capacity of $warninglevel |'Free Space'=$csvinfo.Partition.FreeSpace 'Used Space'=$csvinfo.Partition.UsedSpace 'Percent Free'=$csvinfo.Partition.PercentFree;;$warninglevel"
Write-Host $ToSend
exit 2
}
elseif ($warning -eq 1)
{
$ToSend = "WARNING - CSV Status of $csvinfo.Partition.PercentFree is at threshold capacity of $warninglevel |'Free Space'=$csvinfo.Partition.FreeSpace 'Used Space'=$csvinfo.Partition.UsedSpace 'Percent Free'=$csvinfo.Partition.PercentFree;$warninglevel"
Write-Host $ToSend
exit 1
}
else
{
Write-Host "OK - CSV status is good"
exit 0
}
This code also adds performance data, so within 15 minutes you should get graphs.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by jyoti22 »

Thanks. Working fine now.
Here in the script, warning threshold only set. If free space is at that level then warning alerts get generated and if the free space value is below that warning level then Critical alert get created.
Can it be possible to set warning and critical range for space utilization.
Also is it possible to monitor latency of CSV's?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by rkennedy »

To clarify, which plugin did you decide to use?

What do you mean by monitor latency of the CSV?
Former Nagios Employee
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: monitor clustered shared volumes in 2012 R2 using Nagios

Post by jyoti22 »

I would like to monitor disk latency of CSV. I do not know the plugin for it. Need a help on it.

For disk space utilization, I have used power shell script and would like to know if we can set warning and critical range for space utilization using this power shell script.
Locked