Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
viet.nguyen
byviet.nguyen, August 23, 2013
I ran into an issue where if one vendor was down, any feature even with a different vendor would fail. So I added an argument to take in the vendor name as well:
86c86
Luca.sassone\@omega-sistemi.it
93c93
Usage: perl check_flexlm_perf_data.plx -H hostname [-p port] [-f feature] [-S vendor] [-w %warning]
99c99
6)||(@ARGV eq "0"))
---
> if ((@ARGV > 10)||(@ARGV eq "0"))
113a114
> my $feature = 0;
120c121
if (($_ ne "-p")&&($_ ne "-H")&&($_ ne "-f")&&($_ ne "-w")&&($_ ne "-S"))
127c128,129
$feature = $arg_hash{"-f"} if ($_ eq "-f");
> $vendor = $arg_hash{"-S"} if ($_ eq "-S");
140,141c142,143
$lmstat_output = `$path_to_lmutil lmstat -f $feature -S $vendor -c $port\@$server`; # Get output of lmstat for $vendor_daemon only
180a183
> my $seen_feature = 0;
191a195
> $seen_feature++;
207a212,214
> } elsif ($vendor && ($seen_feature == 0)) {
> # We're looking for a feature and it's not there
> $output = "FLEXlm CRITICAL: License Server for $vendor not available.\n";
86c86
Luca.sassone\@omega-sistemi.it
93c93
Usage: perl check_flexlm_perf_data.plx -H hostname [-p port] [-f feature] [-S vendor] [-w %warning]
99c99
6)||(@ARGV eq "0"))
---
> if ((@ARGV > 10)||(@ARGV eq "0"))
113a114
> my $feature = 0;
120c121
if (($_ ne "-p")&&($_ ne "-H")&&($_ ne "-f")&&($_ ne "-w")&&($_ ne "-S"))
127c128,129
$feature = $arg_hash{"-f"} if ($_ eq "-f");
> $vendor = $arg_hash{"-S"} if ($_ eq "-S");
140,141c142,143
$lmstat_output = `$path_to_lmutil lmstat -f $feature -S $vendor -c $port\@$server`; # Get output of lmstat for $vendor_daemon only
180a183
> my $seen_feature = 0;
191a195
> $seen_feature++;
207a212,214
> } elsif ($vendor && ($seen_feature == 0)) {
> # We're looking for a feature and it's not there
> $output = "FLEXlm CRITICAL: License Server for $vendor not available.\n";