Dashboards & Visualizations

Poor formatting for report export to CSV

mxanareckless
Path Finder

In the first picture, you can see the desired layout of the report in CSV.

problem.PNG

The second picture displays the corresponding results in Splunk after running the report.

problem2.PNG

However, in the final picture you can see the exported CSV is hard to read, and the values of the far-right columns are one long string without newlines.

problem3.PNG

Here's the SPL.

index=index host=host sourcetype="db_backup_size" OR sourcetype=df
| eval usage=Size+" "+Name, OldestBackup=OldestBackup+" "+Name
| eval Environment="Production",
    "Server info (LDOM)"="LDOM",
    "Mount Point"="Mount Point",
    "Backup Filesystem"="/backup",
    "Local mount"="/b"
| chart latest(Environment) as Environment,
    latest("Server info (LDOM)") as "Server info (LDOM)",
    latest("Mount Point") as "Mount Point",
    latest("Backup Filesystem") as "Backup Filesystem",
    latest("Local mount") as "Local mount",
    latest(Size) as "Allocation", latest(Used) as "Usage", values(usage) as "Usage for Each Database", values(OldestBackup) as "Oldest Backup Set"

How can I export something that resembles the first picture? Thank you!

Labels (1)
Tags (3)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @mxanareckless,

Splunk exports multivalue fields correctly to CSV file. In order to se them nice in Excel, you should save file as XLSX, convert text to columns using Data | "Text to Columns" menu (Delimeter as comma), then enable "Word Wrap" on multivalue columns.

If this reply helps you an upvote is appreciated.
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...