Looking for some advice on how best to grab data already on my server. My current thoughts:
I've already got a script in place to detect all apache vhosts so should be able to grab values per vhost. Either from data captured in bulk from the node or by querying the node for each vhost.
[EDIT]
zapache set up, but this does not provide vhost specific statistics. My (shell/bash) log file parsing script is now done and works in combination with Apache2 rotatelogs. The output from my script is as follows:
What I need to do now is to collect these values for each domain listed (and calculate the cumulative from across multiple servers). There are a few examples on the forum about collecting values from text files. The trick will be using the domain to select the corresponding number of hits and bytes served.
- Grab output from logfiles and parse that into a cached archive. Store 5min indexed totals per vhost for collection by zabbix.
- Set up zabbix to fetch newly recorded indexes for all vhosts.
I've already got a script in place to detect all apache vhosts so should be able to grab values per vhost. Either from data captured in bulk from the node or by querying the node for each vhost.
[EDIT]
zapache set up, but this does not provide vhost specific statistics. My (shell/bash) log file parsing script is now done and works in combination with Apache2 rotatelogs. The output from my script is as follows:
Code:
# Apache2 Vhost log file scraper - 5 minute > matrix for Zabbix # # Log file read: //var/log/apache2/other_vhosts_access.log.1 # Timestamp of log file read: 20151122183501 # # vHost - Hits - Bytes djerk.nl 5 1356 geurtscass.com 3 604 promisestoday.com 2 59863 -*-*-*-*-.co.uk 1771 8017706 -*-*-*-*-*-*.com 2 21566