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_lmstat.pl

Rating
0 votes
Favoured:
0
Current Version
0.0.1
Last Release Date
2010-03-15
Compatible With
  • Nagios 2.x
  • Nagios 3.x
Owner
Hits
95701
Files:
FileDescription
check_lmstat.plcheck_lmstat.pl
Nagios CSP

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!
Check Citrix licenses using the external lmstat tool, rather than WMI (which didn't work for me).
I tried the check_licenseserver.pl supplied here, but for some reason I couldn't get anything other than zeros out of it, so I did this one which uses Citrix's lmstat tool to get the license data.

In the NSC.ini file:

check_lmstat_cag=perl scriptscheck_lmstat.pl -c $ARG1$ -w $ARG2$
check_lmstat_mps=perl scriptscheck_lmstat.pl -c $ARG1$ -w $ARG2$ -l mps


And make sure you have allow_arguments=1 in the NRPE section. In nagios services.cfg something like:

define service{
host_name
service_description CAG Licenses
use remote-service
check_command check_lmstat_cag!20!10
notification_options w,u,c,r
}

In checkcommands.cfg:

define command{
command_name check_lmstat_cag
command_line $USER1$/check_nrpe -t 40 -H $HOSTADDRESS$ -c check_lmstat_cag -a $ARG1$ $ARG2$
}

define command{
command_name check_lmstat_mps
command_line $USER1$/check_nrpe -t 40 -H $HOSTADDRESS$ -c check_lmstat_mps -a $ARG1$ $ARG2$
}


And you are away. The above will warn at 20% unused and go critical at 10% unused.

I'm not a perl coder, so it's not perfect, but it works.