Ad Widget

Collapse

apache bandwidth monitoring (vhost)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmgeurts
    Junior Member
    • Nov 2015
    • 4

    #1

    apache bandwidth monitoring (vhost)

    Looking for some advice on how best to grab data already on my server. My current thoughts:
    1. Grab output from logfiles and parse that into a cached archive. Store 5min indexed totals per vhost for collection by zabbix.
    2. 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
    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.
    Last edited by dmgeurts; 22-11-2015, 19:42. Reason: New information added
Working...