Splunk Search

Very Large Diag File

reed_kelly
Contributor

It is becoming harder to submit cases, because our diag files have gotten very large. In the most recent case, the diag-xxxx-2012-06-12.tar.gz was about 570 MB. A lot of that is Hosts.data files extracted from the db folders. We frequently use the metadata commands for host lists per index, so we don't want to get rid of these as a rule, but having them bloat the diag file is not helpful.

I can unpack the tar.gz file and remove the Hosts.data files, but I was wondering how others have dealt with large diag files. Also, the files are still pretty large after removing Hosts.data.

Tags (1)
1 Solution

trumpdeck
Engager

Here are some techniques to reduce the size of the diag :

If you do, please always mention in the case that files are missing from the diag.

  • Check if they are no dump or core files in $SPLUNK_HOME/var/log/splunk/*.dmp If this is the case, move them out of the folder before generating the diag, and upload separately the last one only.
  • If on the indexers the biggest file are your metadata (hosts.meta, sources.meta, sourcetype.meta etc...), then you may have a issue with performance (the SOS app warning dashboard will tell you).
  • You can exclude them from the diag, and upload them separately example splunk diag --exlude *.data see http://docs.splunk.com/Documentation/Splunk/4.3.2/Troubleshooting/ContactSplunkSupport

View solution in original post

pkumar9610
Explorer

I have similar issue, I am seeing Diag tgz file as 14GB where it was 3GB couple of months back. Not sure what is causing this issue, I have also tried excluding *.data files but still it didn't help.

Any inputs ?

0 Karma

marty_lindsay
Engager

need the correct spelling of exclude:

./splunk diag --exclude *.data

trumpdeck
Engager

Here are some techniques to reduce the size of the diag :

If you do, please always mention in the case that files are missing from the diag.

  • Check if they are no dump or core files in $SPLUNK_HOME/var/log/splunk/*.dmp If this is the case, move them out of the folder before generating the diag, and upload separately the last one only.
  • If on the indexers the biggest file are your metadata (hosts.meta, sources.meta, sourcetype.meta etc...), then you may have a issue with performance (the SOS app warning dashboard will tell you).
  • You can exclude them from the diag, and upload them separately example splunk diag --exlude *.data see http://docs.splunk.com/Documentation/Splunk/4.3.2/Troubleshooting/ContactSplunkSupport

tpsplunk
Communicator

another thing to watch out for is if your splunk server uses disk storage served up by a SAN/NAS that is using storage snapshots. The diag process may try to include them. in my case we use NetApp and splunk diag was picking up a bunch of files in .snapshot which bloated my diag file to 3GB. Support and I tracked this down by examining the contents of the 3GB tar file like so: tar ztvf diagfile.tar.gz | sort -k3 -r -n > /tmp/sorted-tar-contents.txt && less /tmp/sorted-tar-contents.txt. once we knew we were there we could exclude them using the aforementioned diag --exclude option

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Mile High Learning with Splunk University, Denver, Colorado

If Denver is known for its mile-high elevation, Splunk University is about to raise the bar on technical ...

IT Service Intelligence 5.0 Series: Your Guide to the June Launch

We are excited to announce the June release of Splunk IT Service Intelligence (ITSI) 5.0. This update ...

Agent Mode Engaged! Enchaining Agentic Operations with Splunk AI Assistant 2.0

    Are you ready to transform how your team handles complex data requests? We invite you to our upcoming ...