After the restarting splunk i was getting details of each files as events and file name as source.
So inside inbox folder we have files like this:-
I wanted to just get the file names under the sourcetype inbox but i am getting the details of each file and the file is stored as source.
sorry, I don't understand your question, could yushare more details?
Are you saying that you have events with inbox sourcetype and you want to override sourcetype value with the source?
If this is your need, it isn't a good idea because in Splunk there are many things related to sourcetype (fields, tags, eventtypes, etc...).
Usually file names are stored in source field and the contents as events, but which details are you speaking?
I have to monitor a log (/export/mail/inbox) under this i have to display the below mentioned in events as they will get updated every 10 mins and the file names will change accordingly.
I have written a configuration to monitor the path. But the issue which is happening is that splunk is displaying the details of files as an event rather than displaying it the file name mentioned above.
I want that in source:-/export/mail/inbox :- sourcetype inbox
i should see only the name of the files not the details inside the file as a events in splunk.
If the problem is that you don't want to ingest these logs, you have to change your input: instead of monitor, you have to create a simple script (e.g. containing the dir command) that lists the files in a path and ingest the script output as events.