Forum Discussion

alucien's avatar
alucien
Icon for Nimbostratus rankNimbostratus
Mar 20, 2019

iRule obtain bandwidth use per Virtual Hosts in Virtual Servers

Hello everybody... let me explain what I need... I would like to implement some kind of iRule with the following pourpose: I have defined a Virtual Server (IP:port) with diferent HTTP/s services (Virtual Hosts), i.e: VS: xx.yy.zz.5 port 80. Different URIs (name1, name2, name3) under the same VirtualServer.

Depending on the URI, the Apache servers reply with the correct web content. This works fine, but I would like to Obtain/account the amount of traffic for each URI-VirtuaHost during a time.

AFAIK, F5 only get statistics of the VirtualServer, but not of the VirtualHost defined under the same VirtualServer.

I don't have a clear idea of how to proceed with the iRULE and any help will be welcomed. I don't know exaclty the resources that the iRule should have, maybe I should use tables for maintain the list of URI-VirtualHosts and the "TCP::bandwidth" or "IP::stats" resources to obtain the traffic/bandwidth utilization. I don't have also a clear idea about how to show the information obtained, ISTATs?, STATS?, log local0?... all I need is some place to store this information. It would be nice if it could be stored and sent via syslog. In any case, I don't know if this is possible.

As you can see, I'm a mess... I have seen so many iRules examples but no one covers exactly what I need:

Thanks in advance and any information will be welcomed. B.R.

- Antonio.