When i run this /etc/snmp/apache-stats.py, I was getting this error:
Traceback (most recent call last):
File “/etc/snmp/apache-stats.py”, line 37, in
data = urlread ( ‘http://localhost/server-status?auto’,user_agent = ‘SNMP Apache Stats’ )
File “/usr/lib/python2.7/dist-packages/urlgrabber/grabber.py”, line 775, in urlread
return default_grabber.urlread(url, limit, **kwargs)
File “/usr/lib/python2.7/dist-packages/urlgrabber/grabber.py”, line 1236, in urlread
s = self._retry(opts, retryfunc, url, limit)
File “/usr/lib/python2.7/dist-packages/urlgrabber/grabber.py”, line 1086, in _retry
r = apply(func, (opts,) + args, {})
File “/usr/lib/python2.7/dist-packages/urlgrabber/grabber.py”, line 1219, in retryfunc
fo = PyCurlFileObject(url, filename=None, opts=opts)
File “/usr/lib/python2.7/dist-packages/urlgrabber/grabber.py”, line 1283, in init
self._do_open()
File “/usr/lib/python2.7/dist-packages/urlgrabber/grabber.py”, line 1619, in _do_open
self._do_grab()
File “/usr/lib/python2.7/dist-packages/urlgrabber/grabber.py”, line 1757, in _do_grab
raise e
urlgrabber.grabber.URLGrabError: [Errno 14] HTTP Error 404 - Not Found.
i have the next config apache httpd.conf
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from localhost
Allow from 127.0.0 ::1
Allow from IP public