Commit Graph
6 Commits
Author SHA1 Message Date
Jellyfrog 61064dc9fe Cleanup some code (#355)
* Format with isort

* Format with Black

* Fix CRLF

* Format with shellcheck

* Fix some warning

* Fix PHP style

* Dont modifiy check_mk files

* Fixes
2021-03-18 12:24:30 +01:00
Hans Erasmus 399d2630f4 Rewrite Apache SNMP Agent to Python3 (#326)
* Updated to work with python3

Thanks to @murrant this file is now python3 compatible.

* Formatted for PEP8 specs

* Updated except according to request

* Updated according to request

As requested [here](https://github.com/librenms/librenms/pull/12009) by SourceDoctor.
2020-08-18 20:37:44 +02:00
Zane C. Bowers-Hadley d609e23600 /tmp fix (#250)
* convert the snmp scripts using tmp files over to use mktemp

* reverse this... joy... not a temp file but cache file ;(

* moved cache file from under /tmp to /var/cache/librenms

* fix mysql tmp usage
2019-08-08 21:18:06 -05:00
Daniel Bull 7fb48df857 Fix: Apache SNMP extend IndexError (#116)
See issue for more information:
https://github.com/librenms/librenms-agent/issues/95
2017-10-27 07:41:05 +02:00
Félim Whiteley 84630dfb84 Fix for first line as localhost (#130)
An example output like below where the first line of output is just "localhost" so it causes the splitting to cause an out of index error.

Example:
cat /tmp/apache-snmp
localhost
ServerVersion: Apache/2.4.25 (Ubuntu) PHP/5.6.30-5+deb.sury.org~trusty+2
ServerMPM: prefork
Server Built: 2016-12-21T00:00:00
CurrentTime: Thursday, 18-May-2017 19:26:43 EDT
RestartTime: Thursday, 18-May-2017 11:35:48 EDT
ParentServerConfigGeneration: 2
ParentServerMPMGeneration: 1
ServerUptimeSeconds: 28255
ServerUptime: 7 hours 50 minutes 55 seconds
Load1: 0.04
Load5: 0.05
Load15: 0.10
Total Accesses: 5367
Total kBytes: 61432
CPUUser: 19.69
CPUSystem: 1.05
CPUChildrenUser: 0
CPUChildrenSystem: 0
CPULoad: .0734029
Uptime: 28255
ReqPerSec: .189949
BytesPerSec: 2226.38
BytesPerReq: 11721
BusyWorkers: 1
IdleWorkers: 6
Scoreboard: ___....._.__.W........................................................................................................................................
2017-05-31 22:23:38 +01:00
Tony Murray 561efa41be SNMP extend scripts from the main repo 2016-08-22 21:47:53 -05:00