Forum Discussion
uni
Sep 06, 2013Altostratus
Jason's method above is great if it is long term. For a quick-and-dirty solution, this perl will convert your output for you. Put it in a file, such as field-to-csv, and run it like this:
tmsh show ltm virtual field-fmt raw | field-to-csv
!/usr/bin/perl
while ($line = <>) {
chomp($line);
if ($line =~ /{/) { $out = ""}
elsif ($line =~ /}/) { print "$out\n" }
else {
$out .= "," if (length($out) != 0);
($field,$value) = split(" ",$line,2);
if ($value =~ /,/)
{ $out .= "\"$value\"" }
else
{ $out .= $value }
}
}
- uniSep 06, 2013Altostratusfinally got the formatting right
- gratlmichael_22Feb 29, 2016NimbostratusHas anyone the script ready for the export the performance data to csv? mem usage, packets, ssl transactions, http,.. Thanks!