Ad Widget
Collapse
Apache monitoring with Zabbix
Collapse
X
-
Hi BrynHi
Does anyone have any instructions on how to implement Method 3 on this URL https://www.zabbix.com/wiki/doku.php...pache#method_3 please?
I'm a newbie and am not sure where to put the bash script and how it should be executed (via cron or called from zabbix somehow?).
Sorry to be thick and thanks very much to anybody who can spare me the time to explain. I really need this to work as I'm having lots of Apache related issues and need to get some insight into what our app is doing with Apache.
Kind regards
Bryn
just put the bash script into a path on the apache server.
then reference that path in the local agent configuration file.
eg UserParameter=apache[*],/etc/zabbix/externalscripts/zapache.sh \$1
- remember to restart the zabbix agent post change
assuming you've then changed the apache configuration ( /etc/httpd/conf/httpd.conf) to allow extended access you should be good to go.Comment
-
Method #2 - Python Errors
Hi,
Method #2 seemed to be the most sustainable, however the python script is not working as it seems it is not receiving the apporpiate data from the Template, is there a fix or an update for this? We are running 2.05, Method #2 is the best from my perspective because it will also monitor apache servers on any OS.
If someone could update the wiki with a fixed version I would be much obliged,Code:Traceback (most recent call last): File "/var/lib/zabbixsrv/externalscripts/query_apachestats.py", line 26, in <module> Port = sys.argv[2] IndexError: list index out of range
ThanksComment
-
Just off the top of my head that looks like you're not running the script with the appropriate arguments... it looks like the python script is complaining that an argument is missing, which is the port your Apache server is running on.Hi,
Method #2 seemed to be the most sustainable, however the python script is not working as it seems it is not receiving the apporpiate data from the Template, is there a fix or an update for this? We are running 2.05, Method #2 is the best from my perspective because it will also monitor apache servers on any OS.
If someone could update the wiki with a fixed version I would be much obliged,Code:Traceback (most recent call last): File "/var/lib/zabbixsrv/externalscripts/query_apachestats.py", line 26, in <module> Port = sys.argv[2] IndexError: list index out of range
ThanksComment
-
Had the same issue. I have altered the template to work with zabbix 2.x.
It can be downloaded here:
Comment
-
zabbix 2.0.9 and query_apachestats.py
With later versions of Zabbix, such as 2.0.9, importing the template by user Winus will cause an error with something along the lines of "attributes construct error". You have to remove the nested quotes.
Changing stuff like this:
To this (or possibly using single-quotes):Code:key="query_apachestats.py["{HOST.CONN}", "80", "D"]"
With the combination of those changes, I was able to get query_apachestats.py working successfully with Zabbix 2.0.9.Code:key="query_apachestats.py[{HOST.CONN}, 80, D]"
Also... a final gripe:
WHATS THE POINT OF HAVING A WIKI THAT CAN'T BE EDITED BY THE COMMUNITY?
The stuff in there is just getting older and more out of date.
Comment
-
Hi All
Im using the 'Method #2' as described in the Wiki, however am getting mixed results.
Its working on some of my Apache Servers 2.2.x & older version, but nothing on 2.4.x
Has anyone deployed this successfully or can recommend a better method to monitor Apache 2.4.x ?
Cheers,
JKComment
Comment