Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

export F5 ltm virtual servers and pool members to excel or csv

I have been hunting for something to help with doing this as I'm not a great with programming. Is there any scripts or api that can be easily used to gain this info?

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Try BigIP Report?

https://devcentral.f5.com/codeshare/bigip-report

One day I'll add CSV export functionality. Surprising amount of people that has asked for it.

/Patrik

2
Comments on this Answer
Comment made 07-Mar-2018 by Patrik Jonsson 3504

FYI. The CSV export feature is available now in case anyone wants it.

/Patrik

1
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

you can use the tmsh script

e.g. to export the whole LTM configuration you can use

tmsh list ltm 

if you need only virtual servers, you can type

tmsh list ltm virtual

Gabriel

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

I'm looking for something in a csv without having to group them up

0
Comments on this Answer
Comment made 20-Nov-2014 by Gabriel V 121
Still there's iControl API ( https://devcentral.f5.com/wiki/iControl.HomePage.ashx ) if you're looking for an API. But I wouldn't expect a simple button export..
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

v11.6 one liner, no button :)

tmsh list ltm virtual {pool destination} | awk '/virtual/{printf "%s,",$3}/destination/{printf "%s,",$2}/pool/{printf "%s,",$2; system("tmsh list ltm "$0" {members} | awk '\''/:/{gsub(/ /, \"\", $0);gsub(/{/, \",\", $0);printf $s,$1}'\''");printf "\n"}' > virtuals.csv

0
Comments on this Answer
Comment made 20-Mar-2017 by ulpe 0

Thanks for this! The command works really well, apart from an error message and some VSes missing from export: "The requested Pool (/Common/none) was not found."

Also, would it be possible to add an iRule column to the .csv output?

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Thanks a lot Jay for the command. It is really great. Can you please add Node members IP and status.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Is it possible to have this done with REST API call instead?

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi all,

tmsh list ltm virtual {pool destination} | awk '/virtual/{printf "%s,",$3}/destination/{printf "%s,",$2}/pool/{printf "%s,",$2; system("tmsh list ltm "$0" {members} | awk '\''/:/{gsub(/ /, \"\", $0);gsub(/{/, \",\", $0);printf $s,$1}'\''");printf "\n"}' > virtuals.csv

Jay code is perfect! It able to export the virtual server and pool for destination. Can the code be modified to allow for virtual server outbound using snat pool?

I have virtual servers used to perform the address translation, and due to an early bug with the LTM, we had to create VS for inbound NAT and outbound NAT, thus we were hoping to generate the view all the in and out bound NAT configurations done.

0