Monitoring Splunk

Can I put a custom log file in $SPLUNK_HOME/var/log/splunk?

joxley
Path Finder

I have a scripted input that writes diagnostic information out to /var/log/myscript.log. I have a monitor on that file sending it to the main index with the sourcetype myscript_log for debugging purposes.

Is is appropriate to put the file in $SPLUNK_HOME/var/log/splunk/myscript.log?

Will this file be automatically sucked into splunk?

If so will it go into _internal?

If not, is it appropriate to put it in _internal?

0 Karma
1 Solution

MuS
Legend

Hi joxley,

sure you can do this, by default you have a inputs monitor like this:

[monitor:///opt/splunk/var/log/splunk]
index = _internal

so your log will end up in index=_internal as well. But keep in mind that the default retention for _internal is only 30 days.

cheers, MuS

View solution in original post

MuS
Legend

Hi joxley,

sure you can do this, by default you have a inputs monitor like this:

[monitor:///opt/splunk/var/log/splunk]
index = _internal

so your log will end up in index=_internal as well. But keep in mind that the default retention for _internal is only 30 days.

cheers, MuS

yannK
Splunk Employee
Splunk Employee

remember that :
- splunk will not manage your log, it only rotated the ones defined in the .../etc/log.cfg
- and that this input does not work on universal and lightweight forwarders (that use a special output filter and keys to drop all data except splunkd.log)

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...