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_flexlm

Rating
3 votes
Favoured:
1
Hits
108450
Files:
FileDescription
check_flexlm.plxcheck_flexlm.plx
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!
Checks Macrovision FLEXlm license servers. (Requires the lmutil utility for your OS running Nagios - see www.macrovision.com to obtain this).
Yeah, I know the standard Nagios plugins package contains a check_flexlm plugin. But it has not been updated in quite a while, didn't work properly for me, and most of its functionality seems concerned with license server triads. That's great if you actually use triads, but I've been working with various FLEXlm-licensed software packages for over 10 years and have never seen anyone use a triad. There are usually so many other points of failure to worry about, it's just not that critical considering the additional management complexity.

If you use triads, my script may not even work for you.

If you don't use a triad, however, this script probably gives you more and better information than the standard check_flexlm plugin.

It will output an OK state if the license server process is running and all licensed modules are available for checkout.

It will output a CRITICAL state if the server is down or unreachable.

It will output a WARNING state if any of the modules on your license server are maxxed out. (for example, you have 3 licenses of module foo, and all 3 are currently in use.)

The idea or intent behind this WARNING behavior is that it could be useful if you want to know how often you are running close to the limit of a particular software feature. This may help you decide whether you should consider purchasing more seats.
Reviews (3)
byGidy, October 11, 2016
I changed the function to generates also performance data. Also i changed the lmstat perameter -A to -a

sub owc_stat {
my $lmstat_output = shift;
my $output;
# Split the lines of $lmstat_output at the newlines.
my @lmstat_lines = split /
/, $lmstat_output;
my $red_flag = 0;
my $yellow_flag = 0;
my $yellow_feats = [];
my $features = 0;

my $performanceData = "|";
for (@lmstat_lines)
{
if ($features eq 0)
{
$red_flag ++ if ((/[Cc]annot/)||(/[Uu]nable/)||(/refused/)||(/down/)||(/[Ww]in[sS]ock/));
}
else
{
if (/Users of (.*): .* of ([0-9]+) .* issued; .* of ([0-9]+) .* use/)
{
my $available_licenses = $2 - $3;
if ($available_licenses eq 0)
{
$yellow_flag ++;
push @$yellow_feats, $1;
}
}
}
#Create Perfromance Data
if (/Users of (.*): .* of ([0-9]+) .* issued; .* of ([0-9]+) .* use/)
{
my $tempPerfDat={};
$performanceData.="$1=$3;;;0;$2 ";
}

#if ($curfile =~ /.+_[0-9]{4}.([a-zA-Z]{3,4}).Z$/)
$features ++ if (/Feature usage info:/)||(/Users of features served by $vendor:/);
}

if ($red_flag > 0)
{
$output = "FLEXlm CRITICAL: License Server Down or Unreachable.";
}
elsif ($yellow_flag > 0)
{
$output = "FLEXlm WARNING: Maximum Usage Warning for Features: ";
for my $feat (@$yellow_feats)
{
$output .= $feat . " ";
}
}
else
{
$output = "FLEXlm OK: Server is up. All Modules/Features Available.";
}

$output.=$performanceData;
$output .= "
";
return ($output);
}
bymeilon, August 27, 2012
Thank you for this, it works really nice. Could you add some performance counters to it? For every module a current plus maximum value? This would help tracking the license usage much better!
bypablo.garciaa, December 1, 2011
Only one thing: i had to modify port number in the plugin. By default is 27000, but nagios client (NSClient++) has port 1248. It isn't a problem with the parameter -p, where you can specify other port.

Great job guy :)