zabbix - external checks (for apache) not working
Hi!
I want to monitor apache from zabbix (2.0.x). I'm following this guide over here: https://www.zabbix.com/wiki/templates/apache (method 2). I have set up the script, I have added the template, I have licked the apache template to a host but, when any of the items is checked for, I see this in the logs: Code:
Traceback (most recent call last): Code:
# The web server IP to query Thanks in advance |
Ok.... I had to go into the _template_ (couldn't do it at the host level) and do 2 things:
- Add the host as a first parameter to each of the items. - Separate each parameter by a , instead of a white space. Got the items to show up and graph... BUT there should be a way to pass the hostname or IP address as a parameter so that different servers could be linked to the same template, doesn't it make sense? |
It's all in the macros
Hi eantoranz, I just registered here to be able to answer you ;-)
You can put your items into templates by using macros (Zabbix speak for "variables"), e.g. Code:
query_apachestats.py["{HOST.CONN1}", "arg2", "arg3"] The macro {HOST.CONN1} for example resolves to the first ip/hostname you specified for each host. There is only one trap: an ip/hostname belongs to an "interface" (SNMP, Agent, IPMI, ...). After applying the template to the hosts be sure to check if the items (on each host) have the correct interface applied. For what you want to do, this would be the "Agent" interface. A good way to set it quickly is by using Zabbix' mass update function. |
Working fine here
I had the same problem, solved after the maxhq instructions.
Thank you very much. |
All times are GMT -5. The time now is 10:46 PM. |