Forum Discussion

alexcardoso_383's avatar
alexcardoso_383
Icon for Nimbostratus rankNimbostratus
Feb 11, 2019

Help with script for Big-IP report.

Hi everyone,

 

I am new to big ip, and i need some help.

 

I had a demand, but i can`t figure this out.

 

I need to create a report in ".csv" and import to excel for my boss, that contains:

 

Partition > VS name > destination ip > pool(and pool members) > policy > service port > http profile > ssl profiles > SNAT pool > irules > get content of the irules (And filter a regular expression like "/any_word/*" and "/any_word*" (the context has a "*" at the end of the names))

 

Example of the irule that needs filtering (I need to get the "/consult/*" in this example) :

 

/consult/* { snatpool snat_rede10250 pool Pool_Consult persist source_addr 255.255.255.0 600 }

 

Im trying to create that script, based on this script (I got this on devcentral).

 

"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"

 

Best Regards

 

No RepliesBe the first to reply