Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_xenvm.sh

Rating
1 vote
Favoured:
0
Current Version
1
Last Release Date
2006-11-01
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
License
GPL
Hits
97523
Files:
FileDescription
check_xenvm.shcheck_xenvm.sh
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
-w = Minimum Number of Xen VMs to activate a warning message.
-c = Number of Xen VMs to activate a critical message.
Reviews (1)
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$'
}