Nagios Exchange
  • Home
  • Directory
  • 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

Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now

Plugins4379Themes and Skins11Addons732Documentation283Graphics 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
Other Tutorials And HOWTOs Nagios: SAP CCMS Monitoring (Part 2)
RSS Feed
Newest Listings Updated Listings
Top Contributors
Julien DESMAREST (4)Davide Lemma (4)deskwork_itunes142 (4)Joerg Hoerter (3)TcoUpLoad (1)
See More
Newest Contributors
Community Member (51)Davide Lemma (4)Alarig Le Lay (1)Penn Rabb (1)Sean Falzon (1)
See More
Home > John Lines
JL

John Lines

@john_lines

User Stats

Favorites0

Views

Projects0

No Projects Found
check_netscreen_session

works well - I have a patch to include Session Fails and perf data

--- check_netscreen_session.orig 2014-07-10 11:30:07.546043211 +0100 +++ check_netscreen_session 2014-07-10 11:48:46.120006720 +0100 @@ -25,6 +25,7 @@ # # This plugin is based on existing work from warrious users. # No liability +# John Lines modifications to report number of session errors and return performance information use POSIX; use strict; @@ -42,12 +43,14 @@ my $state = "UNKNOWN"; my $answer = ""; +my $perfdata = ""; my $snmpkey = 0; my $community = "public"; my $port = 161; my @snmpoids; my $snmpnsResSessActive = '.1.3.6.1.4.1.3224.16.3.2.0'; my $snmpnsResSessMaximum = '.1.3.6.1.4.1.3224.16.3.3.0'; +my $snmpnsResSessFailed = '.1.3.6.1.4.1.3224.16.3.4.0'; my $hostname; my $session; my $error; @@ -87,7 +90,7 @@ } if ($opt_V) { - print_revision($PROGNAME,'$Revision: 1.1 $ '); + print_revision($PROGNAME,'$Revision: 1.2 $ '); exit $ERRORS{'OK'}; } @@ -130,6 +133,7 @@ push(@snmpoids,$snmpnsResSessActive); push(@snmpoids,$snmpnsResSessMaximum); +push(@snmpoids,$snmpnsResSessFailed); if (!defined($response = $session->get_request(@snmpoids))) { $answer=$session->error; @@ -140,12 +144,18 @@ } if($snmpnsResSessMaximum ne 0) {$session_used = 100*($response->{$snmpnsResSessActive}/$response->{$snmpnsResSessMaximum});} - $answer = sprintf("host '%s', sessions : %s/%s (%2.2f%%)n", + $answer = sprintf("host '%s', sessions : %s/%s (%2.2f%%)", $hostname, $response->{$snmpnsResSessActive}, $response->{$snmpnsResSessMaximum}, $session_used ); + $perfdata = sprintf("| SessActive=%s,SessMax=%s,SessFail=%sn", + $response->{$snmpnsResSessActive}, + $response->{$snmpnsResSessMaximum}, + $response->{$snmpnsResSessFailed} + ); + $session->close; @@ -160,7 +170,7 @@ } } -print ("$state: $answer"); +print ("$state: $answer $perfdatan"); exit $ERRORS{$state};

Reviewed 11 years ago

Nagios Alert Emailer

modern versions of Net::SMTP need removed

In my systems which run Debian Wheezy I needed to remove the at the end of the datasend lines i.e. $smtp->datasend("To: $mailto"); $smtp->datasend("From: $mailfrom"); $smtp->datasend("Subject: $mailsubject"); $smtp->datasend(" "); so that the headers acually are taken as headers. I also set the subject as: # $mailsubject = "Nagios Monitoring Alert: $opt_h is $opt_s"; $mailsubject = "$opt_n: $opt_h $opt_D is $opt_s"; which maximises the information in a view of mail messages with just headers, to prioritise dealing with alerts

Reviewed 12 years ago

No Favorites Found

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

Privacy PolicyTerms of UseTrademarks