A modular input is a script that you can ask splunk to run and grab the results.
You can make a simple test with a shell script like this:
Configure scripted data input in $SPLUNK_HOME/etc//default/inputs.conf. Use the local directory for the app to overwrite behavior defined in the default directory. Here is an example:
Make sure your script has execute permissions there for the Splunk user.
Please let me know if the answer was useful for you. If it was, accept it and upvote. If not, give us more input so we can help you with that
Modular inputs enable you to add new types of inputs to Splunk Enterprise, and have them treated as native Splunk Enterprise inputs.
Your users interactively create and update your custom inputs using Splunk Web, just as they do for native inputs.
You can refer the following docs:
Let me know if this helps!!
@surbhiQA Please accept the answer that helped you , so that this can be used for future reference