Getting Data In

How do you refresh programmatically created Input configurations?

DavidGirsvaldas
Explorer

Hi,

Im creating new configurations for ModularInput using C# SDK. This is how I do it:

service.Configurations.GetAllAsync();
service.Configurations.Where(x => x.Name == "inputs").SingleOrDefault();
Configurations.CreateAsync("myModularInputName");
Configurations.UpdateAsync("myModularInputName", myModInputArguments);

This code works. Configurations get created and are visible in Splunk files and the UI. However, ExecProcessor will not use the new configuration to start streaming it unless I explicitly refresh it. For example, all it takes for me to refresh it is to open newly created config in Splunk UI and click "save" on it, even without making any edits. Something gets called in Splunk behind the scenes which causes newly created config to get executed.

Some things I tried to far are calling "https://localhost:8089/services/apps/local/myModularInputName?refresh=true", however this restarted ALL "myModularInputName" configurations, instead of just newly created one.

I tried calling "https://localhost:8089/servicesNS/nobody/system/data/inputs/myModularInputName/myNewConfig/_reload", but it doesn't do anything.

Thank you for your attention.

chrisyounger
SplunkTrust
SplunkTrust

You need to Make a POST call to the debug/refresh endpoint, specifically this one:

https://__SPLUNKURL__/en-GB/debug/refresh?entity=admin/conf-inputs

All the best!

0 Karma

DavidGirsvaldas
Explorer

thank you for your input.
However refreshing given endpoint does refresh all of the inputs, instead of a specific one. I managed to solve my problem by enabling my new configuration at endpoint /servicesNS/nobody/system/data/inputs/myModualrInput/myNewConfig/enable

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...