Windows – Zabbix not collecting data from Apache for Windows

apache-2.2windowswindows-server-2008zabbixzabbix-agent

I have a Zabbix 2.2 installation and I need to monitor a Windows Server running Apache.

I have enabled mod_status, installed zapache (https://www.zabbix.org/wiki/Docs/howto/apache_monitoring_script#Method_3) and I am able to zabbix_get the values from the Zabbix Server:

ubuntu@zabbix-server:/var/log$ zabbix_get -s <host> -p 10050 -k "apache[ReqPerSec]"
1.45184
ubuntu@zabbix-server:/var/log$ zabbix_get -s <host> -p 10050 -k "apache[BytesPerReq]"
2446.25

However, when I configure a Template and attach it to the host, Zabbix doesn't show the collected data.

Any ideas?

Best Answer

Problem solved!

Both Zabbix Agent and Server have a "Timeout" parameter which specify how long Zabbix will wait for a check to finish (external, SNMP). The default value is 3s and it takes the Zapache Shell Script a little over 4s to execute, so one needs to adjust both timeouts to accomodate that. If you just adjust at the agent (as I have done at first), zabbix_get will work but the Server won't fetch the values, because it will time out as well.

Once both timeouts are set, everything will work.

WORD OF ADVICE: in my particular setup, once I got things working, I noticed that my queue for passive checks increased its delayed values. This was caused by the fact that the server was taking too much time to poll all Apache values (19 new items per monitored server). In my case, the best solution was to change all Apache items TYPE to "Zabbix Agent (active)". You can increase the number of Pollers, but I found that Active checking doesn't hurt the monitored server and eases the load on the Zabbix Server.