Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_xenvm.sh
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
-w = Minimum Number of Xen VMs to activate a warning message.
-c = Number of Xen VMs to activate a critical message.
-c = Number of Xen VMs to activate a critical message.
Reviews (1)
byfireto, April 27, 2011
the plugin works perfectly when used on local machine. In order to use it with check_by_ssh you need to do following modifications:
On the monitored host:
in /etc/sudoers add:
Defaults:nagios !requirettl
nagios ALL=(ALL) NOPASSWD: /check_xen *
edit the script:
in the line RUNNING=$(sudo /usr/sbin/xm list | awk '!/[DN]/ {print $1 }' | awk '$1=$1' OFS=", " RS= )
remove sudo:
RUNNING=$( /usr/sbin/xm list | awk '!/[DN]/ {print $1 }' | awk '$1=$1' OFS=", " RS= )
On the Nagios host:
add command:
define command{
command_name ssh_xen
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C 'sudo /check_xen -w $ARG1$ -c $ARG2$'
}
On the monitored host:
in /etc/sudoers add:
Defaults:nagios !requirettl
nagios ALL=(ALL) NOPASSWD: /check_xen *
edit the script:
in the line RUNNING=$(sudo /usr/sbin/xm list | awk '!/[DN]/ {print $1 }' | awk '$1=$1' OFS=", " RS= )
remove sudo:
RUNNING=$( /usr/sbin/xm list | awk '!/[DN]/ {print $1 }' | awk '$1=$1' OFS=", " RS= )
On the Nagios host:
add command:
define command{
command_name ssh_xen
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C 'sudo /check_xen -w $ARG1$ -c $ARG2$'
}