Automatic printer monitoring via SNMP as decentralized agents to allow for easy reporting and consumables monitoring π¨οΈ
Maps the SNMP OID values for various printer variants, queries them and reports the values to a REST API-backend for further processing, storing and alerting. Please note the REST API-backend is not included; alternatively you can use SMTP to report data via emails.
Requires Python 3; to use, simply install the dependencies pip install -r requirements.txt
, set up your configuration and run python Printer-Monitoring.py --help
π
Run once-twice a day; Monitor; ???; Profit π₯
Edit the configuration file printer_config.txt
(JSON) and edit the desired printers and variants.
client
: Name used for identifying the tenant a printer belongs toproxy
: Send data to backend using a standard proxy, else leave emptytoken
: Token to authenticate data report against the backendprinters
: List of all configured printers to query and monitorip
: IP address of the target printervariant
: Most important setting for getting accurate data. This describes a printer's type to map the relevant OIDs for querying (see Variants)serial
: Fallback serial number for clear identification, since OID evaluation can be unreliabledescription
: Optional description to identify a printer, e.g. by indicating its location
- Test your configuration and accurate data output using
python Printer-Monitoring.py --debug
To deploy and run regularly use cron or Windows Task Scheduler.
Variant | Description |
---|---|
xerox |
Big Xerox printers, e.g. WorkCentre, AltaLink |
xeroxbw |
Smaller Xerox printers; e.g. VersaLink |
xeroxphaser |
Custom class for Xerox Phaser 7760 |
xeroxWC3225 |
Custom class for Xerox Workcenter 3225 |
hp |
HP Color LasetJets etc |
hpbw |
HP LaserJet normal (B/W) |
hpmfp |
HP MFPs, in case the previous one does not work |
HPM725BW |
Custom class for HP M725 |
KCSW |
Kyocera B/W-Printers |
OKI |
OKI printers |
DICL |
Develop ineo+ 450i |
Run Docker using the Dockerfile
and following sample command:
docker build -t printermonitoring . \
&& docker run -d --name printermonitoring \
--restart unless-stopped \
-v ./printer_config.txt:/app/printer_config.txt:ro \
printermonitoring \
&& docker logs --follow printermonitoring
This allows running the script on e.g.
Alternatively consider using docker-compose
Example on what a tracking backend could look like. Storing historic printer data, indicating last consumables change, last report timestamp and showing the current state of the printer in a central dashboard