I want to index snmp data from a number of hosts that i have listed in a csv file. In the csv i'll have the host ip, port and the community string. The idea would be to avoid the need to create an input for each host since the kind of data i'll be using is the same from each host.
If your CSV is a list of host, port and community string , then this is mostly what you would setup via Splunk Web that gets persisted to inputs.conf anyway.
So you may as well just create your inputs.conf file by hand and use this as your "master record"
inputs.conf
#common shared settings , just mock example data
[snmp]
index = main
sourcetype = my_snmp_data
mib_names = IF-MIB,DNS-SERVER-MIB,BRIDGE-MIB
object_names = 1.3.6.1.2.1.1.3.0
snmp_mode = attributes
snmp_version = 2C
#each specific hosts settings , examples for 2 fictional hosts foo and goo
[snmp://foo]
communitystring = foo
destination = foohost
port = 162
disabled = 0
[snmp:/goo]
communitystring = goo
destination = goohost
port = 163
disabled = 0
Hey Damien
That's a possible solution/workaround. The main point, and i sorry for not pointing that out in the OP, is: i'm building an app for snmp monitoring and i'm also trying to build a view where the user can insert new hosts without having to edit files since most of the data/inputs will be the same for all host. There are alot of data i want to use and using your modular input i'm not being able to retrieve multiple OIDs in a single input. So i need to have multiple inputs and that might not be easy to manage if you have with hundreds of devices.