Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4401Themes and Skins12Add-ons754Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
File System check_files.pl – Check files age and number of files in a directory
3.0 (3)
91.7K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)Julien DESMAREST (6)Davide Lemma (4)deskwork_itunes142 (4)Sam N (3)
See More
Newest Contributors
Sanna Glue (2)fisherrs (1)juanfertor (1)zsoltaire (1)RavuAlHemio (1)
See More

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > Philipp Posovszky
PP

Philipp Posovszky

@Gidy

User Stats

Member Since: October 12, 2016

Favorites0

Views

Projects0

No Projects Found
check_flexlm

Add Performance Data

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); }

Reviewed 9 years ago

No Favorites Found

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile