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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...