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
Plugins4387Themes and Skins11Add-ons732Documentation283Graphics 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
Others Check last HyperBackup for Synology (Synagios)
0.0 (0)
8.2K
RSS Feed
Newest Listings Updated Listings
Top Contributors
LAMY (7)Julien DESMAREST (6)deskwork_itunes142 (4)Davide Lemma (4)Joerg Hoerter (3)
See More
Newest Contributors
Guillaume8723 (1)Salvo (1)SOHA-IT (1)Tsvetomir Tsvetanov (1)Igor Ru (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