Build precise queries to find exactly what you need
Press ESC to close
Great Plugin. I added 3 little Functions – maybe you wanne add them to the Script: Display Message Printer Status Device Status
################################################# ######################################################### ### check_display function ### ######################################################### function check_display(){ DISPLAY=`snmpget -v1 -On -c $COMMUNITY $HOSTNAME 1.3.6.1.2.1.43.16.5.1.2.1.1 | cut -d ” ” -f4-`
printf “Displaytext: $DISPLAY ” exit 0 } ######################################################### ### check_printer_status function ### ######################################################### function check_printer_status(){ PRSTATUS=`snmpget -v1 -On -c $COMMUNITY $HOSTNAME 1.3.6.1.2.1.25.3.5.1.1.1 | cut -d ” ” -f4-` EXITSTRING=”Drucker Status = ” EXITCODE=0 case “$PRSTATUS” in “other(1)”) EXITSTRING=”$EXITSTRING$PRSTATUS – STATUS: CRITICAL!” EXITCODE=2 ;; “idle(3)”) EXITSTRING=”$EXITSTRING$PRSTATUS – STATUS: OK!” EXITCODE=0 ;; “printing(4)”) EXITSTRING=”$EXITSTRING$PRSTATUS – STATUS: OK!” EXITCODE=0 ;; “warmup(5)”) EXITSTRING=”$EXITSTRING$PRSTATUS – STATUS: OK!” EXITCODE=0 ;; *) EXITSTRING=”$EXITSTRING$PRSTATUS – STATUS: WARNING!” EXITCODE=1 ;; esac printf “$EXITSTRING|$PRSTATUS;;; ” exit $EXITCODE } ######################################################### ### check_device_status function ### ######################################################### function check_device_status(){ DEVSTATUS=`snmpget -v1 -On -c $COMMUNITY $HOSTNAME 1.3.6.1.2.1.25.3.2.1.5.1 | cut -d ” ” -f4-`
EXITSTRING = “Geraet Status = ” EXITCODE=0 case “$DEVSTATUS” in “unknown(1)”) EXITSTRING=”$EXITSTRING$DEVSTATUS – STATUS: WARNING!” EXITCODE=1 ;; “running(2)”) EXITSTRING=”$EXITSTRING$DEVSTATUS – STATUS: OK!” EXITCODE=0 ;; “warning(3)”) EXITSTRING=”$EXITSTRING$DEVSTATUS – STATUS: WARNING!” EXITCODE=1 ;; “testing(4)”) EXITSTRING=”$EXITSTRING$DEVSTATUS – STATUS: OK!” EXITCODE=0 ;; “down(5)”) EXITSTRING=”$EXITSTRING$DEVSTATUS – STATUS: CRITICAL!” EXITCODE=2 ;; *) EXITSTRING=”$EXITSTRING$DEVSTATUS – STATUS: WARNING!” EXITCODE=1 ;; esac printf “$EXITSTRING|$DEVSTATUS;;; ” exit $EXITCODE }
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!