Forum Discussion
aj1
Nimbostratus
Aug 14, 2015tmsh show /sys connection cs-client-addr x.x.x.x using iControl REST
Been going through the iControl REST reference and it appears appending stats to the GET request outputs the tmsh show ... of a pool, virtual etc. I've tried the same approach for tmsh show...
aj1
Nimbostratus
Sep 10, 2015Thank you Kevin. That worked like a charm. What would be the best way to parse the response table in
apiAnonymous to display the inside address for the outside address sent in the request (that is cs-server-addr). In the below output, I'd like to get the inside IP 172.25.52.251%4.
$ curl -sk -u "admin:admin" -H "Content-Type: application/json" -X GET "https://x.x.x.x/mgmt/tm/sys/connection?options=ss-client-addr+197.72.208.78" | perl -pe 's/\\n/,\n/g'
{"kind":"tm:sys:connection:connectionstats","selfLink":"https://localhost/mgmt/tm/sys/connection?options=ss-client-addr+197.72.208.78&ver=11.6.0","apiRawValues":{"apiAnonymous":"Sys::Connections,
172.25.52.251%4:41334 69.28.57.177%4:10086 197.72.208.78:1142 69.28.57.177:10086 tcp 499 (slot/tmm: 1/0) none,
172.25.52.251%4:60179 193.235.206.82%4:4070 197.72.208.78:1043 193.235.206.82:4070 tcp 47 (slot/tmm: 1/0) none,
Total records returned: 2,
"}}
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
