Hi @AK_Splunk, an additional information: you can extract the host from the path using the segment or a regex still on path or filename: host_regex = <regular expression>
* If specified, <regular expression> extracts host from the path to the file
for each input file.
* Detail: This feature examines the source key; if source is set
explicitly in the stanza, that string is matched, not the original
filename.
* Specifically, the first group of the regular expression (regex) is used
as the host.
* If the regex fails to match, the input uses the default 'host' setting.
* If 'host_regex' and 'host_segment' are both set, the input ignores 'host_regex'.
* No default.
host_segment = <integer>
* If set to N, the Splunk platform sets the Nth "/"-separated segment of the path
as 'host'.
* For example, if you set "host_segment = 3" and the path is
/logs/servers/host08/abc.txt, the third segment, "host08", is used.
* If the value is not an integer or is less than 1, the default 'host'
setting is used.
* On Windows machines, the drive letter and colon before the backslash *does not*
count as one segment.
* For example, if you set "host_segment = 3" and the monitor path is
D:\logs\servers\host01, Splunk software sets the host as "host01" because
that is the third segment.
* No default. as described at https://docs.splunk.com/Documentation/Splunk/9.0.4/admin/Inputsconf Ciao. Giuseppe
... View more