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
Nagios XI Documentation Installing Nagios Mobile
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 > Cameron Robitaille
CR

Cameron Robitaille

@CameronMR

User Stats

Favorites0

Views

Projects0

No Projects Found
Check WMI Plus

More Exclusions

Hello: I made a change along the same lines as the comment above to allow for more exclusions to be specified. My change to the code is here: # process any exclusions, if they have been defined if ($the_arguments{'_arg2'}) { # exclusion regex defined, decide if we want this row my @excl = split(/,/,$the_arguments{'_arg2'}); foreach my $service_exclusion (@excl) { if ($$row{'DisplayName'}=~/$service_exclusion/ || $$row{'Name'}=~/$service_exclusion/) { # regex matches so exclude this row $num_excluded++; $debug && print "---> Excluding "$$row{'DisplayName'}" ($$row{'Name'})n"; $process_this_row=0; } } } Thanks for this plugin, it is great!

Reviewed 10 years ago

SNMP Printer Check

Great, I added some code to the Status function

Hi: We have Xerox, Ricoh and HP printers at our facility and I found that the status function wasn't returning enough info for me. I needed the following: 1) If an HP printer is asleep, it should recognize that not go critical. 2) Xerox machines always complain about the bypass tray, ignore them. In fact never return a warning or critical with Xerox printers (specific to our environment) 3) If the printer does go into an error state, parse the return code and tell me what the actual problem is. Some issues in our environment should be fixed by our techs while others are handled by administrative staff so that is important to know. I haven't programmed in BASH since the mid-90's and even then only sparingly so I apologize to the actual pro's out there if this isn't the cleanest but it works so, um, yay! Here is the entire Status function that has been tested against Ricoh, Xerox and HP printers: STATUS_EXIT_CODE=0 PRINTER_STATUS=$(snmpget -v1 -Ovq -c $COMMUNITY $HOST_NAME 1.3.6.1.2.1.25.3.5.1.1.1 2>/dev/null) PRINTER_MODEL=$(snmpget -v1 -Ovq -c $COMMUNITY $HOST_NAME 1.3.6.1.2.1.25.3.2.1.3.1 2>/dev/null) PRINTER_DETECTED_ERROR=$(snmpwalk -v1 -Ovxq -c $COMMUNITY $HOST_NAME 1.3.6.1.2.1.25.3.5.1.2 2>/dev/null) DISPLAY=$(snmpwalk -v1 -Ovq -c $COMMUNITY $HOST_NAME 1.3.6.1.2.1.43.16.5.1.2.1 2>/dev/null | tr -d """) if [ ! -z "$PRINTER_DETECTED_ERROR" ]; then IFS=' ' read -ra ErrVals us is $PRINTER_STATUS. Printer is reporting: $PRINTER_ERROR_RESULT" STATUS_EXIT_CODE=2 fi if [[ "$DISPLAY" == "Sleep"* ]]; then EXIT_STRING="OK: Printer status is $DISPLAY." STATUS_EXIT_CODE=0 fi ;; "idle") EXIT_STRING="OK: Printer status is $PRINTER_STATUS" ;; "printing") EXIT_STRING="OK: Printer status is $PRINTER_STATUS" ;; "warmup") EXIT_STRING="OK: Printer status is $PRINTER_STATUS" ;; *) EXIT_STRING="WARNING: Printer status is $PRINTER_STATUS" STATUS_EXIT_CODE=1 ;; esac return $STATUS_EXIT_CODE }

Reviewed 9 years ago

No Favorites Found

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

Privacy PolicyTerms of UseTrademarks