diff --git a/docs/20_Checks/check_snmp_printer.md b/docs/20_Checks/check_snmp_printer.md new file mode 100644 index 0000000000000000000000000000000000000000..4f69e965cf26b9e44e06a5837c94e3e3b8129ba1 --- /dev/null +++ b/docs/20_Checks/check_snmp_printer.md @@ -0,0 +1,100 @@ +## Check SNMP printer + +Script: `check_snmp_printer` + +**check_snmp_printer** is a wrapper for Nagios plugin check_snmp_printer. Its main task is to fetch SNMP authentication parameters from a config file and then call the Nagios check. + +## Requirements + +* snmpget +* snmpwalk +* check_snmp_printer or an update of it eg. <https://github.com/Tylan/check_snmp_printer/tree/master> + +## Standalone installation + +From this repository ypu need next to this script: + +* `inc_pluginfunctions` shared function for all IML checks written in bash +* `check_snmp_includes` with a shared snmp config reader + +## Syntax + +Start the script without parameter to get the help. + +```txt +______________________________________________________________________ + +CHECK_SNMP_PRINTER +v1.0 + +(c) Institute for Medical Education - University of Bern +Licence: GNU GPL 3 + +https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_snmp_printer.html +______________________________________________________________________ + +This is a wrapper for the check_snmp_printer plugin. +Maybe you want to upgrade it from +<https://github.com/Tylan/check_snmp_printer/tree/master> + +The wrapper does + +- scan for snmp auth parameters of given host by check_snmp_includes +- adds snmp timeout +- executes check_snmp_printer with given other params + +USAGE: + check_snmp_printer [-d] [-c SCRIPT] -H SNMPTARGET [other params] + +PARAMETERS: + + -d, --debug (as 1st param) + Debug mode: shows all generated params. + "-d" or "--debug" will be removed from params for + check_snmp_printer script + + -c SCRIPT + Set script to execute with full path + default: /usr/lib64/nagios/plugins/check_snmp_printer_v2.0.1 + + -H HOSTNAME + required: as fqdn or ip address; default: localhost + + All other params for check_snmp_printer, eg. + --consum + --messages + --pagecount + --trays + +CONFIG FILE: + The config file can be multiline and has the syntax + [SNMPTARGET[,target2]]:[auth parameters] + The auth parameters set the version and all needed values to connect. + Snmp v2 uses a community string. + Snmp v3 is highly recommended (you should disable Snmp v2) and needs + a user and password. + +EXAMPLE: + check_snmp_printer -H 192.168.100.12 --consum + +``` + +## Examples + +### Messages of the printer + +`./check_snmp_data -H 192.168.100.12 --messages` + +### Consumables + +`./check_snmp_data -H 192.168.100.12 --consum` + +### Number of pages printed + +`./check_snmp_data -H 192.168.100.12 --pagecount` + +### Status of trays for paper + +`./check_snmp_data -H 192.168.100.12 --trays` + +Remark: when using --trays the param `--nofeeder` will be inserted too.