diff --git a/plugins/router/arris-tg3442 b/plugins/router/arris-tg3442 old mode 100644 new mode 100755 index 35307c74..088b50e5 --- a/plugins/router/arris-tg3442 +++ b/plugins/router/arris-tg3442 @@ -1,49 +1,65 @@ #!/usr/bin/env python3 """ -# MUNIN Plugin to monitor status of Arris TG3442 / TG2492LG-85 -# and compatible cable modems -# -# Connect to the web-frontend and get current DOCSIS status of upstream and -# downstream channels. (Signal Power, SNR, Lock Status) -# -# -# Requirements: -# - BeautifulSoup -# - pycryptodome -# -# Configuration: -# [arris] -# env.url http://192.168.100.1 -# env.username admin -# env.password yourpassword -# -# Parameters: -# url - URL to web-frontend -# username - defaults to "admin" -# password - valid password -# -# -# References: https://www.arris.com/products/touchstone-tg3442-cable-voice-gateway/ -# -# -# -# Copyright (c) 2019 Daniel Hiepler -# -# Permission to use, copy, and modify this software with or without fee -# is hereby granted, provided that this entire notice is included in -# all source code copies of any software which is or includes a copy or -# modification of this software. -# -# THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY -# REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE -# MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR -# PURPOSE. -# -# -# Magic markers -# #%# family=contrib +=head1 NAME + +arris - MUNIN Plugin to monitor status of Arris TG3442 / TG2492LG-85 + and compatible cable modems + +=head1 DESCRIPTION +Connect to the web-frontend and get current DOCSIS status of upstream and +downstream channels. (Signal Power, SNR, Lock Status) + + +=head1 REQUIREMENTS +- BeautifulSoup +- pycryptodome + + +=head1 CONFIGURATION + +=head2 Example +[arris] +env.url http://192.168.100.1 +env.username admin +env.password yourpassword + + +=head2 Parameters +url - URL to web-frontend +username - defaults to "admin" +password - valid password + + +=head1 REFERENCES +https://www.arris.com/products/touchstone-tg3442-cable-voice-gateway/ + + +=head1 AUTHOR + + Copyright (c) 2019 Daniel Hiepler + Copyright (c) 2004-2009 Nicolas Stransky + Copyright (c) 2018 Lars Kruse + + +=head1 LICENSE + Permission to use, copy, and modify this software with or without fee + is hereby granted, provided that this entire notice is included in + all source code copies of any software which is or includes a copy or + modification of this software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR + IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE + MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR + PURPOSE. + + +=head1 MAGIC MARKERS + + #%# family=contrib + +=cut """ import binascii @@ -134,6 +150,7 @@ def login(session, url, username, password): # set session r = session.post(f"{url}/php/ajaxSet_Session.php") + def docsis_status(session): """get current DOCSIS status page, parse and return channel data""" r = session.get(f"{url}/php/status_docsis_data.php") @@ -214,7 +231,7 @@ if __name__ == "__main__": ] # configure ? - if len(sys.argv) > 1 and "config" in sys.argv[1]: + if len(sys.argv) > 1 and "config" == sys.argv[1]: # process all graphs for g in graph_descriptions: # graph config