Forum Discussion
Danims_19205
Nimbostratus
Nov 28, 2012how to create a Statistics Profile
Hello everyone:
I need see the total connections for a specific network in a vserver. I´m reading about cretion irule but i need some help! con you help me? I have one f5 ltm 6900 v10.2.4
T...
What_Lies_Bene1
Cirrostratus
Dec 17, 2012As with anything, experience and practise make things rather easier. So, just to be clear, you have created a Statistics Profile called 'mystats' and relevant counters with the names specified above and then assigned that profile to the Virtual Server yes? And everything matches case-wise? Remember everything is case sensitive with iRules.
Then you've tried something like this and it isn't working - note I've added some logging which might help and gone back to if statements?
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.120.0.0/16] } {
log local0. "Matched 10.120/16, incrementing Stats_GER"
STATS::incr mystats Stats_GER 1
}
elseif { [IP::addr [IP::client_addr] equals 10.110.0.0/16] } {
log local0. "Matched 10.110/16, incrementing Stats_CZ"
STATS::incr mystats Stats_CZ 1
}
else {
log local0. "Matched nothing, incrementing Stats_Other"
STATS::incr mystats Stats_Other 1
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects