Splunk Search

how to add Sourcetype Cli command

parrotgw
Explorer

hi
i would like add some sourcetype.
Adding thoungh Web Browser is easy,
just click create sourcetype button and not need splunk restart
I found a cli command to add a sourcetype, but I couldn't find it.

One way i found
The sourcetype is written directly to the props.conf file.
but it's need splunk restart

I'm writing an auto define script for some log files
so i can't use restart splunk

i want not need splunk restart & cli command like a web browser

thk~

Tags (1)
0 Karma
1 Solution

badrinath_itrs
Communicator

Hi ,

You need to take a look into below documentation as what changes in props.conf requires restart . Any changes to index time field extraction and time stamp properties requires a restart of splunkd process.

https://docs.splunk.com/Documentation/Splunk/latest/Admin/Configurationfilechangesthatrequirerestart

Regarding creating props from command line, this is generally pushed from Cluster master to Indexers or from Deployment server to HWF in distributed environment.

I doubt we have an option to create sourcetype from command line and don't see either in the below link.

https://docs.splunk.com/Documentation/Splunk/7.3.2/Admin/CLIadmincommands

Thanks

View solution in original post

0 Karma

badrinath_itrs
Communicator

Hi ,

You need to take a look into below documentation as what changes in props.conf requires restart . Any changes to index time field extraction and time stamp properties requires a restart of splunkd process.

https://docs.splunk.com/Documentation/Splunk/latest/Admin/Configurationfilechangesthatrequirerestart

Regarding creating props from command line, this is generally pushed from Cluster master to Indexers or from Deployment server to HWF in distributed environment.

I doubt we have an option to create sourcetype from command line and don't see either in the below link.

https://docs.splunk.com/Documentation/Splunk/7.3.2/Admin/CLIadmincommands

Thanks

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...