Page 1 of 1

monitor virtual appliance on nagios

Posted: Thu Mar 05, 2020 3:46 pm
by rnjie
i am currently having issues monitoring my virtual appliance (Sphere Client version 6.7), i have found a plugin on the nagios exchange webpage called vcsa_monitor.sh and installed it on the nagios server, when i try to test the script with my virtual appliance which is running on linux i get the following error

/usr/local/nagios/libexec/vcsa_monitor.sh dwvcsvp1.transplace.com

Unable to find config file: ./cfg/vcsa_monitor_config_dwvcsvp1.transplace.com.ini

am thinking there is some configuration to be done on the client side but am not sure what, your help will be appreciated.

Re: monitor virtual appliance on nagios

Posted: Thu Mar 05, 2020 4:16 pm
by jdunitz
This particular plugin does require a couple additional steps on the XI server in order to work correctly.

After uploading the plugin, you need to create the cfg directory, and also the config file that goes in there, tailored to your environment.

Code: Select all

[root@localhost ~]# cd /usr/local/nagios/libexec/
[root@localhost libexec]#
[root@localhost libexec]# mkdir cfg
[root@localhost libexec]# /usr/local/nagios/libexec/vcsa_monitor.sh
A parameter is required : 'vcenter fqdn or IP'
[root@localhost libexec]# /usr/local/nagios/libexec/vcsa_monitor.sh 192.168.0.22
Unable to find config file: ./cfg/vcsa_monitor_config_192.168.0.22.ini
[root@localhost libexec]# touch  ./cfg/vcsa_monitor_config_192.168.0.22.ini
[root@localhost libexec]# /usr/local/nagios/libexec/vcsa_monitor.sh 192.168.0.22
Unable to find variable VCENTER from config file

So, you'll see that I created the "cfg" directory, ran the vcsa_monitor.sh script, got the error that I need to tell it a VCenter host to point it to, ran it again against an IP address, and got the same error you did. Then, I created a blank config file, just so it would have something to find. That gave me a different error, because all the config data it's expecting to find isn't actually there.

The page the plugin comes from also has a sample config file that you can download. It just needs three things in it:
1) The fully-qualified hostname or IP address of your VCenter server
2) The username to log into the VCenter server with
3) ...and the password.

Code: Select all

#------------------#
#    properties    #
#------------------#
VCENTER=https://192.168.1.xx
USERNAME="[email protected]" #create a specific monitoring user instead
PASSWORD="my-password"
Once you create this config file in /usr/local/nagios/libexec/cfg/vcsa_monitor_config_dwvcsvp1.transplace.com.ini, you should have better results.

Let us know how it goes!

--Jeffrey

Re: monitor virtual appliance on nagios

Posted: Wed Mar 11, 2020 2:26 pm
by rnjie
thanks, creating that config file worked, but how do i get it to display on the GUI side

Re: monitor virtual appliance on nagios

Posted: Wed Mar 11, 2020 2:44 pm
by jdunitz
I'm not sure if I'm interpreting your question correctly, but I think you're asking "how do I associate a command and service with this plugin so it shows up in the service status page and whatnot".

If that is indeed the case, this document will help:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

If you meant something else, let me know and I'll try to help.

Thanks!

--Jeffrey