Forum Discussion
kyle_martin_evop
Nimbostratus
Jul 26, 2023Finding all virtual servers with "log all traffic" policy applied via API
Hello, I am trying to locate virtual server configs in my F5 environment that are configured to log all traffic requests. Obviously, this has a detrimental impact to F5 logging performance. Is there...
JRahm
Admin
Jul 27, 2023Hi kyle_martin_evop,
AubreyKingF5's solution will work with a slight modification:
tmsh list ltm virtual one-line | egrep -i 'log.all.requests' | awk '{ print $3 }'
You could run bash via iControl rest against all your BIG-IPs to get this output.
but you can also do this natively via iControl REST against the virtual endpoint:
####
# GET request to -> https://ltm15/mgmt/tm/ltm/virtual?$select=name,securityLogProfiles,
####
# RESULT:
{
"kind": "tm:ltm:virtual:virtualcollectionstate",
"selfLink": "https://localhost/mgmt/tm/ltm/virtual?$select=name%2CsecurityLogProfiles%2C&ver=15.1.8.1",
"items": [
{
"name": "nginx-vip-tls",
"securityLogProfiles": [
"\"/Common/Log all requests\""
],
"securityLogProfilesReference": [
{
"link": "https://localhost/mgmt/tm/security/log/profile/~Common~Log%20all%20requests?ver=15.1.8.1"
}
]
},
{
"name": "testapp-vip"
},
{
"name": "testappssl-vip"
}
]
}
You can then parse this on the client side to cut down to match only the virtual servers with the matching condition.
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