Yet another efficient DOCSIS SNMP poller.
docsispy provides a tool to query efficiently in SNMP a population of DOCSIS cable modems in the field. The goal is to fetch as efficiently as possible some important values from the modems like:
- modem uptime
- firmware version and boot status
- SNR and power of all downstream channels
- power of all upstream channels
- WAN traffic consumption (download and upload)
- WAN public IP address and gateway
As a solid foundation, the tool relies on a python SNMP library called easysnmp. It uses this library to build tailor-made SNMP queries.
docsispy depends on easysnmp: it must be compiled and installed beforehand.
docsispy works with Python 3 only. Python 2 is not supported.
A configuration file is required. Currently, it is only used to define SNMP community strings. By default, this file is located in ~/.docsispy/docsispy.secret
. An example file is available in the sources in the conf
folder.
The main executable is bin/launch_poller.py
. A detailed help is available with the --help
option.
A typical invocation of the program is:
launch_poller.py --parallel 500 --config ~/.docsispy/docsispy.secret --cachedb ~/.docsispy/docsispy.db --output results.txt ip.txt
It can be scheduled via crontab for regular queries.
The only strictly mandatory parameter in the input file (ip.txt
in the example above). It contains the list of modems to be queried. The format is one modem per line with the following syntax: bpid;mac;private_ip
.
Example: 123456;51be3bea6106;10.0.0.1
bpid
is a customer reference, not used in the program execution, but easy to keep in the output file as an easy reference to the customer.
docsispy is currently used in production and is considered as stable. However, if you want to use it for your own needs, and want to contribute back to the code, feel free to contact the repository admin, or the author via email (name and email source files).
(c) © 2016-2017 Xavier Lüthi xavier@luthi.eu
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
See LICENSE.txt for the full license text.