VMware Date store monitoring using multipile condition
VMware Date store monitoring using multipile condition
Hi Team,
We got a request from a customer to monitor the VMware Datastore and alert based on below condition.
Can you please help on this.
Multiple conditions should be met to trigger the alert.
Warning: If Free Space < 5% and Free space is < 100GB
Critical: If Free Space <2% and Free space is < 20GB
We got a request from a customer to monitor the VMware Datastore and alert based on below condition.
Can you please help on this.
Multiple conditions should be met to trigger the alert.
Warning: If Free Space < 5% and Free space is < 100GB
Critical: If Free Space <2% and Free space is < 20GB
You do not have the required permissions to view the files attached to this post.
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: VMware Date store monitoring using multipile condition
If you define the warning threshold like this ($ARG6$) to
and the critical threshold like this ($ARG8$) to
Try that and see if it works like you want.
Code: Select all
datastore_free:100,datastore_free%:5Code: Select all
datastore_free:20,datastore_free%:2Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: VMware Date store monitoring using multipile condition
Thanks for the input by giving the value as suggested we are getting below value.
COMMAND: /usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.XX.XX.X -C "~/box293_check_vmware.pl --timeout 90 --server 172.XX.X.X --check Datastore_Usage --name \"DAL-VDI-NFS-APPVOL\" --reporting_si \"Disk_Size:GB\" \"--warning\" \"datastore_free:100,datastore_free%:5\" \"--critical\" \"datastore_free:20,datastore_free%:2\""
OUTPUT: OK: Datastore 'DAL-VDI-NFS-APPVOL' {Free Space: 1,012.8 GB} {Used Space: 58.2 GB} {Capacity: 1,071 GB}|'Free Space'=1012.8GB;100;20 'Used Space'=58.2GB 'Capacity'=1071GB [Datastore_Usage]
But Is it calculating the % ??
Also on $ARG4$ is the value will be like: Disk_Size:GB as it is. Or needs to update something here also.
COMMAND: /usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.XX.XX.X -C "~/box293_check_vmware.pl --timeout 90 --server 172.XX.X.X --check Datastore_Usage --name \"DAL-VDI-NFS-APPVOL\" --reporting_si \"Disk_Size:GB\" \"--warning\" \"datastore_free:100,datastore_free%:5\" \"--critical\" \"datastore_free:20,datastore_free%:2\""
OUTPUT: OK: Datastore 'DAL-VDI-NFS-APPVOL' {Free Space: 1,012.8 GB} {Used Space: 58.2 GB} {Capacity: 1,071 GB}|'Free Space'=1012.8GB;100;20 'Used Space'=58.2GB 'Capacity'=1071GB [Datastore_Usage]
But Is it calculating the % ??
Also on $ARG4$ is the value will be like: Disk_Size:GB as it is. Or needs to update something here also.
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: VMware Date store monitoring using multipile condition
You should go to the link below and take a look at page 28 of the manual, to get the percentage thresholds to function, the command will have to be edited by adding the --perfdata_option option.
https://exchange.nagios.org/directory/P ... re/details
The settings I posted earlier will have to be edited to make the percentage thresholds function the way you want.
https://exchange.nagios.org/directory/P ... re/details
The settings I posted earlier will have to be edited to make the percentage thresholds function the way you want.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: VMware Date store monitoring using multipile condition
Thanks a lot for inputs. Now it's working for warning. For critical I needs to add two more Argument.
As attached image , I needs to add 10 Argument currently it's 8 Argument.
Can you please help me on this.
As attached image , I needs to add 10 Argument currently it's 8 Argument.
Can you please help me on this.
You do not have the required permissions to view the files attached to this post.
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: VMware Date store monitoring using multipile condition
What you can do is to put all of the separate arguments into one argument and that will free up the $ARGx$ slots so you can add more options to the command.
Arguments do not have to be separated, they can be one long line.
So, what you could do is copy $ARG6$ and paste it on the end of $ARG5$ with a space between it and then copy $ARG7$ and paste it on the end of $ARG5$ with a space between it and so on.
Then you will be able to add more arguments to that check.
Arguments do not have to be separated, they can be one long line.
So, what you could do is copy $ARG6$ and paste it on the end of $ARG5$ with a space between it and then copy $ARG7$ and paste it on the end of $ARG5$ with a space between it and so on.
Then you will be able to add more arguments to that check.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: VMware Date store monitoring using multipile condition
The suggested option is not working we are getting below error.
COMMAND: /usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name \"DAL-VDI-NFS-APPVOL\" --reporting_si \"Disk_Size:GB\" \"--perfdata_option\" \"Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1\" \"--warning datastore_free:100,datastore_free%:5\" \"--critical datastore_free:20,datastore_free%:2\""
OUTPUT: UNKNOWN - check_by_ssh: Remote command '~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option" "Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1" "--warning datastore_free:100,datastore_free%:5" "--critical datastore_free:20,datastore_free%:2"' returned status 255
COMMAND: /usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name \"DAL-VDI-NFS-APPVOL\" --reporting_si \"Disk_Size:GB\" \"--perfdata_option\" \"Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1\" \"--warning datastore_free:100,datastore_free%:5\" \"--critical datastore_free:20,datastore_free%:2\""
OUTPUT: UNKNOWN - check_by_ssh: Remote command '~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option" "Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1" "--warning datastore_free:100,datastore_free%:5" "--critical datastore_free:20,datastore_free%:2"' returned status 255
You do not have the required permissions to view the files attached to this post.
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: VMware Date store monitoring using multipile condition
Change the $ARG5$ field from
to
Then delete everything in the $ARG6$ field and see if that works for you.
If you are using the Test Check Command button, that sometimes causes problems, you should save the settings and go to the Home > Service details screen and see if the command works.
If you want to test the command, you can run this from the command line on the XI server so you can edit the options to get the output you want and then change it in the XI Core Config Manager.
Code: Select all
--perfdata_optionCode: Select all
--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1
If you are using the Test Check Command button, that sometimes causes problems, you should save the settings and go to the Home > Service details screen and see if the command works.
If you want to test the command, you can run this from the command line on the XI server so you can edit the options to get the output you want and then change it in the XI Core Config Manager.
Code: Select all
/usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1" "--warning datastore_free:100,datastore_free%:5" "--critical datastore_free:20,datastore_free%:2""Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: VMware Date store monitoring using multipile condition
We are getting same error.
Test Check from Nagios server:
/usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1" "--warning datastore_free:100,datastore_free%:5" "--critical datastore_free:20,datastore_free%:2""
UNKNOWN - check_by_ssh: Remote command '~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name DAL-VDI-NFS-APPVOL --reporting_si Disk_Size:GB --perfdata_option' returned status 255
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name \"DAL-VDI-NFS-APPVOL\" --reporting_si \"Disk_Size:GB\" \"--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1\" \"\" \"\" \"\""
OUTPUT: UNKNOWN - check_by_ssh: Remote command '~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1" "" "" ""' returned status 255
Test Check from Nagios server:
/usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1" "--warning datastore_free:100,datastore_free%:5" "--critical datastore_free:20,datastore_free%:2""
UNKNOWN - check_by_ssh: Remote command '~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name DAL-VDI-NFS-APPVOL --reporting_si Disk_Size:GB --perfdata_option' returned status 255
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name \"DAL-VDI-NFS-APPVOL\" --reporting_si \"Disk_Size:GB\" \"--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1\" \"\" \"\" \"\""
OUTPUT: UNKNOWN - check_by_ssh: Remote command '~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option Datastore_Free:1,Datastore_Free%:1,Datastore_Capacity:1,Datastore_Used:1,Datastore_Used%:1" "" "" ""' returned status 255
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: VMware Date store monitoring using multipile condition
I simplified the command a little to see if it works. Try running this in a root shell on the Nagios server.
It it still fails, add the verbose option to the command and post the output here.
To add the verbose output, you would add a -v to the end of the command.
Code: Select all
/usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 172.26.171.249 -C "~/box293_check_vmware.pl --timeout 90 --server 172.26.171.40 --check Datastore_Usage --name "DAL-VDI-NFS-APPVOL" --reporting_si "Disk_Size:GB" "--perfdata_option Datastore_Free:1,Datastore_Free%:1" "--warning datastore_free:100,datastore_free%:5" "--critical datastore_free:20,datastore_free%:2""To add the verbose output, you would add a -v to the end of the command.
Be sure to check out our Knowledgebase for helpful articles and solutions!