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
  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4387Themes and Skins11Add-ons734Documentation283Graphics 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
Special Topics Nagios implementation in energy industry
0.0 (0)
90.1K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Julien DESMAREST (6)LAMY (6)Davide Lemma (4)deskwork_itunes142 (4)Joerg Hoerter (3)
See More
Newest Contributors
Guillaume8723 (1)Salvo (1)SOHA-IT (1)Tsvetomir Tsvetanov (1)Igor Ru (1)
See More

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

Privacy PolicyTerms of UseTrademarks
Home > Ryan Housand
RH

Ryan Housand

@rhousand

User Stats

Member Since: July 19, 2013

Favorites0

Views

Projects0

No Projects Found
check_mssql_health

I had to make a few small changes to get jobs_failed working.

Script errored due to empty $minutessincestart: sub nagios { my $self = shift; my %params = @_; if (! $self->{nagios_level}) { if ($params{mode} =~ /server::jobs::failed/) { if ($self->{lastrunstatus} ne "succeeded") { if ($self->{lastrunstatus} eq "failed") { $self->add_nagios_critical( sprintf "%s failed: %s", $self->{name}, $self->{lastrunstatusmessage}); } elsif ($self->{lastrunstatus} eq "retry" || $self->{lastrunstatus} eq "canceled") { $self->add_nagios_warning( sprintf "%s %s: %s", $self->{name}, $self->{lastrunstatus}, $self->{lastrunstatusmessage}); } else { if ($self->{lastrunstatus}) { print "else: $params{mode} $self->{name} $self->{lastrunstatus} "; $self->add_nagios( $self->check_thresholds($self->{lastrundurationseconds}, 60, 300), #sprintf("job %s ran for %d seconds (started %s) ", $self->{name}, sprintf("job %s ran for %d seconds (started %s)", $self->{name}, $self->{lastrundurationseconds}, $self->{lastrundatetime})); } } } else { print "OK - $self->{name}, $self->{lastrundurationseconds}, $self->{lastrundatetime} "; } } } } Script alerted if lastrunstatus was not set: sub nagios { my $self = shift; my %params = @_; if (! $self->{nagios_level}) { if ($params{mode} =~ /server::jobs::failed/) { if ($self->{lastrunstatus} ne "succeeded") { if ($self->{lastrunstatus} eq "failed") { $self->add_nagios_critical( sprintf "%s failed: %s", $self->{name}, $self->{lastrunstatusmessage}); } elsif ($self->{lastrunstatus} eq "retry" || $self->{lastrunstatus} eq "canceled") { $self->add_nagios_warning( sprintf "%s %s: %s", $self->{name}, $self->{lastrunstatus}, $self->{lastrunstatusmessage}); } else { if ($self->{lastrunstatus}) { print "else: $params{mode} $self->{name} $self->{lastrunstatus} "; $self->add_nagios( $self->check_thresholds($self->{lastrundurationseconds}, 60, 300), #sprintf("job %s ran for %d seconds (started %s) ", $self->{name}, sprintf("job %s ran for %d seconds (started %s)", $self->{name}, $self->{lastrundurationseconds}, $self->{lastrundatetime})); } } } else { print "OK - $self->{name}, $self->{lastrundurationseconds}, $self->{lastrundatetime} "; } } } }

Reviewed 12 years ago

check_iptables

Changes required

Added $TABLE CHKIPTBLS=`/sbin/iptables -n -t $TABLE -L |wc -l` Added nrpe user to sudoers Defaults!/usr/local/nagios/libexec/check_iptables.sh !requiretty nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_iptables.sh I would not recommend adding to following to sudoers. nagios ALL= NOPASSWD: /sbin/iptables I also imported utils.sh and used it's exit codes but this may not be required. . /usr/local/nagios/libexec/utils.sh exit $STATE_OK exit $STATE_CRITICAL

Reviewed 12 years ago

No Favorites Found

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

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile