Apache Application

Hello everyone,

I’m trying to make it work with the Apache Application on the LibreNMS server (so basically monitoring itself for now) but with no success.

Everything is up to date and running on a CentOS7.

Here is what I get using snmpwalk:

[[email protected] ~]# snmpwalk -v 2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendObjects
NET-SNMP-EXTEND-MIB::nsExtendNumEntries.0 = INTEGER: 1
NET-SNMP-EXTEND-MIB::nsExtendCommand.“apache” = STRING: /etc/snmp/apache-stats.py
NET-SNMP-EXTEND-MIB::nsExtendArgs.“apache” = STRING:
NET-SNMP-EXTEND-MIB::nsExtendInput.“apache” = STRING:
NET-SNMP-EXTEND-MIB::nsExtendCacheTime.“apache” = INTEGER: 5
NET-SNMP-EXTEND-MIB::nsExtendExecType.“apache” = INTEGER: exec(1)
NET-SNMP-EXTEND-MIB::nsExtendRunType.“apache” = INTEGER: run-on-read(1)
NET-SNMP-EXTEND-MIB::nsExtendStorage.“apache” = INTEGER: permanent(4)
NET-SNMP-EXTEND-MIB::nsExtendStatus.“apache” = INTEGER: active(1)
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.“apache” = STRING: Traceback (most recent call last):
NET-SNMP-EXTEND-MIB::nsExtendOutputFull.“apache” = STRING: Traceback (most recent call last):
File “/etc/snmp/apache-stats.py”, line 38, in
user_agent = ‘SNMP Apache Stats’ )
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 775, in urlread
return default_grabber.urlread(url, limit, **kwargs)
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1236, in urlread
s = self._retry(opts, retryfunc, url, limit)
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1086, in _retry
r = apply(func, (opts,) + args, {})
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1219, in retryfunc
fo = PyCurlFileObject(url, filename=None, opts=opts)
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1283, in init
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1619, in _do_open
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1757, in _do_grab
raise e
urlgrabber.grabber.URLGrabError: [Errno 14] HTTP Error 404 - Not Found
NET-SNMP-EXTEND-MIB::nsExtendOutNumLines.“apache” = INTEGER: 18
NET-SNMP-EXTEND-MIB::nsExtendResult.“apache” = INTEGER: 1
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.1 = STRING: Traceback (most recent call last):
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.2 = STRING: File “/etc/snmp/apache-stats.py”, line 38, in
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.3 = STRING: user_agent = ‘SNMP Apache Stats’ )
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.4 = STRING: File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 775, in urlread
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.5 = STRING: return default_grabber.urlread(url, limit, **kwargs)
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.6 = STRING: File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1236, in urlread
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.7 = STRING: s = self._retry(opts, retryfunc, url, limit)
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.8 = STRING: File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1086, in _retry
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.9 = STRING: r = apply(func, (opts,) + args, {})
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.10 = STRING: File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1219, in retryfunc
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.11 = STRING: fo = PyCurlFileObject(url, filename=None, opts=opts)
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.12 = STRING: File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1283, in init
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.13 = STRING: self._do_open()
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.14 = STRING: File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1619, in _do_open
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.15 = STRING: self._do_grab()
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.16 = STRING: File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1757, in _do_grab
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.17 = STRING: raise e
NET-SNMP-EXTEND-MIB::nsExtendOutLine.“apache”.18 = STRING: urlgrabber.grabber.URLGrabError: [Errno 14] HTTP Error 404 - Not Found

Running apache-stats.py results in the same error.

Any help would be much appreciated, thanks !

Did you enabled, as docs sais, the mod_status in apache?

Thanks for your reply.
I did add those lines in /etc/httpd/conf/httpd.conf :

<Location "/server-status">
SetHandler server-status
Require host srv-monitoring.mycompany.fr

Though, http://srv-monitoring.mycompany.fr/server-status returns me a 404 error

Well I just restart httpd and now i get a 403 error instead of 404

I removed the “require” line and now the server-status works, graphs as well
Not sure if it’s a good idea though

Any suggestion ?

Try using Require host localhost
You wont be able to see server-status but apache-stat.py should do


Many thanks, It works as It should now.

Have a nice day,