Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

F5 - Command Line VIP/Pool/Node/Last UP Status Summary

DC4Networks_328
Nimbostratus
Nimbostratus

Fellow F5 Admins...

 

I have been trying to find the ideal Command Line to use on the F5 to ideally get the VIP/Pool/Node/Last UP Status Summary all in 1 line to be imported to a *.csv?

 

Thank you in advance for your Command Line Script.

 

2 REPLIES 2

To do so, you need Bash engineering 🙂

start with:

tmsh show ltm pool  members | grep -e "Ltm::" -e "Activity" -e "State"

If you need more help, tell me and I will back to rescue.

If you don't like Bash, you can do it with python as well (using F5 SDK).

KR, Dario.

Regards,
Dario.

balance5
Nimbostratus
Nimbostratus

Hi

I am trying to get LTM VIP status using a python script.

I can successfully pull all details of the VIP however not able to find a field in there that describes the state of the VIP (i.e. up or down).

Here is an example of the JSON output for a TEST VIP:

{
"addressStatus": "yes",
"autoLasthop": "default",
"cmpEnabled": "yes",
"connectionLimit": 0,
"creationTime": "2022-09-29T11:20:15Z",
"destination": "/Common/192.168.1.1:80",
"enabled": true,
"fullPath": "/Common/TEST_VS",
"generation": 1,
"gtmScore": 0,
"ipProtocol": "tcp",
"kind": "tm:ltm:virtual:virtualstate",
"lastModifiedTime": "2022-09-29T11:20:15Z",
"mask": "255.255.255.255",
"mirror": "disabled",
"mobileAppTunnel": "disabled",
"name": "TEST_VS",
"nat64": "disabled",
"partition": "Common",
"policiesReference": {
"isSubcollection": true,
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~TEST_VS/policies?ver=14.1.4.3"
},
"pool": "/Common/TEST_POOL",
"poolReference": {
"link": "https://localhost/mgmt/tm/ltm/pool/~Common~TEST_POOL?ver=14.1.4.3"
},
"profilesReference": {
"isSubcollection": true,
"items": [
{
"context": "all",
"fullPath": "/Common/TEST_HTTPPROFILE",
"generation": 1,
"kind": "tm:ltm:virtual:profiles:profilesstate",
"name": "TEST_HTTPPROFILE",
"nameReference": {
"link": "https://localhost/mgmt/tm/ltm/profile/http/~Common~TEST_HTTPPROFILE?ver=14.1.4.3"
},
"partition": "Common",
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~TEST_VS/profiles/~Common~TEST_HTTPPROFILE?ver=14.1.4.3"
},
{
"context": "all",
"fullPath": "/Common/tcp-lan-optimized",
"generation": 1,
"kind": "tm:ltm:virtual:profiles:profilesstate",
"name": "tcp-lan-optimized",
"nameReference": {
"link": "https://localhost/mgmt/tm/ltm/profile/tcp/~Common~tcp-lan-optimized?ver=14.1.4.3"
},
"partition": "Common",
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~TEST_VS/profiles/~Common~tcp-lan-optimized?ver=14.1.4...."
}
],
"link": "https://localhost/mgmt/tm/ltm/virtual/~Common~TEST_VS/profiles?ver=14.1.4.3"
},
"rateLimit": "disabled",
"rateLimitDstMask": 0,
"rateLimitMode": "object",
"rateLimitSrcMask": 0,
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~TEST_VS?ver=14.1.4.3",
"serviceDownImmediateAction": "none",
"source": "0.0.0.0/0",
"sourceAddressTranslation": {
"pool": "/Common/TEST_SNATPOOL",
"poolReference": {
"link": "https://localhost/mgmt/tm/ltm/snatpool/~Common~TEST_SNATPOOL?ver=14.1.4.3"
},
"type": "snat"
},
"sourcePort": "preserve",
"synCookieStatus": "not-activated",
"translateAddress": "enabled",
"translatePort": "enabled",
"vlansDisabled": true,
"vsIndex": 776
}