F5 Sites
  • F5.com
  • F5 Labs
  • MyF5
  • NGINX
  • Partner Central
  • Education Services Portal (ESP)
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Open Side Menu
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
GroupsEventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. CrowdSRC
  3. CodeShare

BigIP Report Old

Problem this snippet solves: This codeshare has been deprecated due to a hosting platform corruption. I have moved code and conversation to a new record (on the same original URL) https://devcentra...
Updated Dec 08, 2022
Version 2.0
application delivery
devops
iControl
LTM
microsoft powershell with icontrol
Patrik_Jonsson's avatar
Patrik_Jonsson
Icon for MVP rankMVP
Joined January 16, 2009
View Profile
PatrickCox's avatar
PatrickCox
Icon for Altocumulus rankAltocumulus
Mar 09, 2020

Patrik and Tim,

 

I have run into a issue with the CSV export option. The description field could contain commas, and the Associated-Pools field has extra quotation marks > "|" < when there are multiple pools. These cause the fields to get cut up when imported into a spreadsheet.

 

I checked both v5.2.9 and v5.3.0 and found the code the same in both. I modified the following lines in the "generateCSV" function of bigipreport.js:

var line = vs.name + ',"' + (vs.description || "") + '",' + (vs.ip || "") + "," + (vs.port || "") + ',"' + (vs.sslprofileclient || "None") + '","' + (vs.sslprofileserver || "None") + '",' +(vs.compressionprofile || "None") + "," + (vs.persistenceprofile || "None") + "," + vs.availability + "," + vs.enabled + "," + vs.currentconnections + "," + vs.cpuavg5sec + "," + vs.cpuavg1min + "," + vs.cpuavg5min + "," + (vs.defaultpool || "None") + ',"';
 
var firstpool = true;
 
for (var p in vs.pools) {
 
    if (!firstpool){ line += "|"} else { firstpool = false }
 
    var pool = getPool(vs.pools[p], vs.loadbalancer);
    line += pool.name + ": ";
 
    line += getMembers(pool);
}
 
line += '",' + vs.loadbalancer;

 

I modified the "var line =" line (1) by changing the "," around the vs.description to be literal strings using apostrophes, and then at the end of the line the same thing to make sure quotation marks would go around the Associated-Pools field. I removed the quotation marks around the pipes (lines 10 & 12). And then ensured closing quotation marks (line 15).

 

I also used mixed case in the CSV header, but then, I am "particular" that way.

var csv = "Name,Description,IP,Port,SslProfileClient,SslProfileServer,CompressionProfile,PersistenceProfile,Availability,Enabled,CurrentConnections,CpuAvg5sec,CpuAvg1min,CpuAvg5min,DefaultPool,Associated-Pools,LoadBalancer\n";

-Patrick

 

Help guide the future of your DevCentral Community!

What tools do you use to collaborate? (1min - anonymous)

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesTraining & Certification

SUPPORT

Manage SubscriptionsProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

©2026 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information