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

check_flexlm

Rating
3 votes
Favoured:
1
Hits
102104
Files:
FileDescription
check_flexlm.plxcheck_flexlm.plx
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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 :)