Individual Monitoring for storage volume

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Individual Monitoring for storage volume

Post by lgaddam »

Team,

In our environment Hyper-V Server's are already in monitoring.
The new requirement is that we have to monitor all storage volumes available in all Hyper-V servers.
Most of the servers have 31 storage volumes connected to them.

On all servers WMI is working fine.....its performance monitoring is also doing good.

For this requirement , I used "checkvolsize" metric via wmi plugin.
This working fine for each individual volume except volme1, volume2, volume3 because while i use "volume1" in arguments , its considering "volume1, volmu10,11-19" and the same with "volume2" and "volume3".

Is there any way to make some chnages and monitor individual volume monitoring..


Output:

[root@nagiosp01 etc]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.89 -u 'xxxxxx' -p 'xxxxxx' -m checkvolsize -a "volume1" -w '85' -c '90' -t 500

'C:\ClusterStorage\Volume18\ Space'=942.37GB; 'C:\ClusterStorage\Volume18\ Utilisation'=46.0%;85;90;
'C:\ClusterStorage\Volume19\ Space'=778.12GB; 'C:\ClusterStorage\Volume19\ Utilisation'=76.0%;85;90;
'C:\ClusterStorage\Volume10\ Space'=900.93GB; 'C:\ClusterStorage\Volume10\ Utilisation'=44.0%;85;90;
'C:\ClusterStorage\Volume11\ Space'=884.79GB; 'C:\ClusterStorage\Volume11\ Utilisation'=43.2%;85;90;
'C:\ClusterStorage\Volume1\ Space'=1965.43GB; 'C:\ClusterStorage\Volume1\ Utilisation'=96.0%;85;90;
'C:\ClusterStorage\Volume12\ Space'=2804.31GB; 'C:\ClusterStorage\Volume12\ Utilisation'=91.3%;85;90;
'C:\ClusterStorage\Volume13\ Space'=794.24GB; 'C:\ClusterStorage\Volume13\ Utilisation'=77.6%;85;90;
'C:\ClusterStorage\Volume14\ Space'=572.93GB; 'C:\ClusterStorage\Volume14\ Utilisation'=56.0%;85;90;
'C:\ClusterStorage\Volume15\ Space'=844.83GB; 'C:\ClusterStorage\Volume15\ Utilisation'=82.5%;85;90;
'C:\ClusterStorage\Volume16\ Space'=692.52GB; 'C:\ClusterStorage\Volume16\ Utilisation'=67.6%;85;90;
'C:\ClusterStorage\Volume17\ Space'=2343.32GB; 'C:\ClusterStorage\Volume17\ Utilisation'=76.3%;85;90;
[root@nagiosp01 etc]#


How i wanted is like below for each volume:

[nagios@nagiosp01 ~]$ /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.89 -u 'xxxxx' -p 'xxxxx' -m checkvolsize -a "volume23" -w '85' -c '90' -t 500

OK - C:\ClusterStorage\Volume23\ Total=1024.00GB, Used=835.22GB (81.6%), Free=188.78GB (18.4%) |'C:\ClusterStorage\Volume23\ Space'=835.22GB; 'C:\ClusterStorage\Volume23\ Utilisation'=81.6%;85;90;

[root@nagiosp01 etc]#
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Individual Monitoring for storage volume

Post by benjaminsmith »

Hello @lgaddam,

The plugin argument will take a regular expression to find the correct volume to check.
checkvolsize
This can be used to monitor volumes mounted as junction points (ie no drive letters) as well as normal logical volumes.
By default, drives in a non-OK state will be shown first.
Also see checkdrivesize
ARG1 drive letter or volume name or volume label of the volume to check. If omitted a list of valid drives will be shown. If set to . all drives will be included.
To include multiple volumes separate them with a |. This uses a regular expression so take care to
specify exactly what you want. eg "C" or "C:" or "C|E" or "." or "Data"
Try changing the drive match, to the following and let me know if it works.

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.89 -u 'xxxxx' -p 'xxxxx' -m checkvolsize -a 'C:\\ClusterStorage\\Volume1\\' -w '85' -c '90' -t 500
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Individual Monitoring for storage volume

Post by lgaddam »

HI,

Its working fine now.

[root@nagiosp01 ~]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.173.89 -u 'xxxx' -p 'xxxx' -m checkvolsize -a 'C:\\ClusterStorage\\Volume1\\' -w '85' -c '90'
CRITICAL - [Triggered by _Used%>90] - C:\ClusterStorage\Volume1\ Total=2048.00GB, Used=1965.43GB (96.0%), Free=82.57GB (4.0%) |'C:\ClusterStorage\Volume1\ Space'=1965.43GB; 'C:\ClusterStorage\Volume1\ Utilisation'=96.0%;85;90;
You have new mail in /var/spool/mail/root
[root@nagiosp01 ~]#

But got one more issue, while performing this on another server. This IP 192.168.72.179 has 10 volumes but getting GUID of the volume I guess, how to fix this.


[root@nagiosp01 ~]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.179 -u 'xxxx' -p 'xxxx' -m checkvolsize -a 'C:\\ClusterStorage\\Volume1\\' -w '85' -c '90' but

UNKNOWN - Could not find a volume matching 'C:\\ClusterStorage\\Volume1\\'. Available Volumes are C:\, \\?\Volume{60450d7a-8fd4-11e3-8410-c770933fcf0a}\, \\?\Volume{34756dc2-a587-11e1-8f2b-f4ce46a5938d}\, F:\, \\?\Volume{3c7d8540-c4c4-11e1-9d4d-f4ce46a5938d}\, \\?\Volume{2ea0f1ee-d61c-11e2-b620-f4ce46a5938d}\[root@glnagiosp01 ~]#
[root@nagiosp01 ~]#

[root@nagiosp01 ~]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.179 -u 'xxxx' -p 'xxxx' -m checkvolsize -a 'volume1' -w '85' -c '90'
OK - \\?\Volume{2ea0f1ee-d61c-11e2-b620-f4ce46a5938d}\ Total=1024.00GB, Used=730.16GB (71.3%), Free=293.84GB (28.7%) |'\\?\Volume{2ea0f1ee-d61c-11e2-b620-f4ce46a5938d}\ Space'=730.16GB; '\\?\Volume{2ea0f1ee-d61c-11e2-b620-f4ce46a5938d}\ Utilisation'=71.3%;85;90;
[root@nagiosp01 ~]#
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Individual Monitoring for storage volume

Post by benjaminsmith »

Hello @llgaddam,

Interestingly, this server may have different settings for displaying volumes. Have you tried just matching the GUID, for example:

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.79 -u 'xxxxx' -p 'xxxxx' -m checkvolsize -a '60450d7a-8fd4-11e3-8410-c770933fcf0a' -w '85' -c '90' -t 500
You can also try matching with full regular expression match, you'll need to escape the special characters.

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.79 -u 'xxxxx' -p 'xxxxx' -m checkvolsize -a '\\\\\?\\Volume{60450d7a-8fd4-11e3-8410-c770933fcf0a}\\' -w '85' -c '90' -t 500
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Individual Monitoring for storage volume

Post by lgaddam »

HI,

Its working fine with GUID.

[root@nagiosp01 ~]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.179 -u 'xxxxx' -p 'xxxxx' -m checkvolsize -a '60450d7a-8fd4-11e3-8410-c770933fcf0a' -w '85' -c '90'
OK - \\?\Volume{60450d7a-8fd4-11e3-8410-c770933fcf0a}\ Total=2048.00GB, Used=519.57GB (25.4%), Free=1528.42GB (74.6%) |'\\?\Volume{60450d7a-8fd4-11e3-8410-c770933fcf0a}\ Space'=519.57GB; '\\?\Volume{60450d7a-8fd4-11e3-8410-c770933fcf0a}\ Utilisation'=25.4%;85;90;
[root@nagiosp01 ~]#

But this server has 9 volumes, only 4 are working, other five are not working....
out of 15 servers like this, only this server having issues with individual volumes.

[root@nagiosp01 ~]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.179 -u 'xxxxx' -p 'xxxxx' -m checkvolsize -a '69f8b916-a439-11e1-af0d-f4ce46a596a4' -w '85' -c '90'
UNKNOWN - Could not find a volume matching '69f8b916-a439-11e1-af0d-f4ce46a596a4'. Available Volumes are C:\, \\?\Volume{60450d7a-8fd4-11e3-8410-c770933fcf0a}\, \\?\Volume{34756dc2-a587-11e1-8f2b-f4ce46a5938d}\, F:\, \\?\Volume{3c7d8540-c4c4-11e1-9d4d-f4ce46a5938d}\, \\?\Volume{2ea0f1ee-d61c-11e2-b620-f4ce46a5938d}\
[root@nagiosp01 ~]#
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Individual Monitoring for storage volume

Post by lgaddam »

I would like to know what exactly WMI script "check_wmi_plus.pl" is running at remote server and collecting the data.
If you let me know the exact wmi command this script issuing at remote server, we can run manually on the remote server and see whether its working fine or not.


I have enquired with repective team lead, they are saying all good from their end and asking to monitoring team the exact scenerio the WMI script doing in collecting teh data. Please help me in this, we can figure it out the issue.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Individual Monitoring for storage volume

Post by benjaminsmith »

Hello @lgaddam,

Try running the check command again from the shell using the debug option -d.
-d Enable debug. Use this to see a lot more of what is going on including the exact WMI Query and results. User/passwords should be masked in the resulting output unless -z is specified.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Individual Monitoring for storage volume

Post by lgaddam »

HI,

Thanks for your help.
Checked with respective team they said that the volumes are in same cluster but few mounts are tagged to another server.
Got that server and corrected the monitoring.

Please close this.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Individual Monitoring for storage volume

Post by scottwilkerson »

lgaddam wrote:HI,

Thanks for your help.
Checked with respective team they said that the volumes are in same cluster but few mounts are tagged to another server.
Got that server and corrected the monitoring.

Please close this.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked