That's what I have done.   Was just wondering if there was another way that 
was more efficient processing wise.



On Monday, September 12, 2016 at 10:03:57 PM UTC+9:30, Cameron Sparr wrote:
>
> why not just create multiple [[inputs.snmp]] instances?
>
> On Mon, Sep 12, 2016 at 1:27 PM, Matt Baker <[email protected] 
> <javascript:>> wrote:
>
>> Problen then is it will attempt to get SNMP data from devices that may 
>> not support that oid.
>>
>> I am looking to collect from a number of hosts, which comprise of 
>> switches, routers, UPS, PDU's, and other IoT type devices.  All have a very 
>> different set of oid's.
>>
>> Maybe might be worth having a "type" style specifier for a host to tie 
>> that host to a set of oid's ?
>>
>>
>>
>>
>>
>> you can also put multiple hosts in the "agents" list
>>>
>>> On Mon, Sep 12, 2016 at 7:42 AM, Matt Baker <[email protected]> wrote:
>>>
>>>> Hi Cam,
>>>>
>>>> I created over the weekend a new config file to just test this function 
>>>> and found that it actually worked..  Always the way.  Looks like I have an 
>>>> issue with my original config that I will go and look at further to find 
>>>> the cause.
>>>>
>>>> Sorry to waste your time.
>>>>
>>>>
>>>> Just as a quick question is running multiple [[inputs.snmp]] the only 
>>>> way to have different SNMP stats collected for different hosts?
>>>>
>>>>
>>>> cheers,
>>>>
>>>> Matt
>>>>
>>>> On Saturday, September 10, 2016 at 1:59:27 AM UTC+9:30, 
>>>> [email protected] wrote:
>>>>>
>>>>> Hi Matt, 
>>>>>
>>>>> can you provide your full config file, the exact commands you are 
>>>>> running, and the exact output you are getting from each of those. 
>>>>>
>>>>> you can paste them here or put them in a gist: 
>>>>> https://gist.github.com/ 
>>>>>
>>>>> thanks, 
>>>>> Cam 
>>>>>
>>>>> On Friday, September 9, 2016 at 10:24:39 AM UTC+1, Matt Baker wrote: 
>>>>> > Hi, 
>>>>> > 
>>>>> > 
>>>>> > I was after some guidance about having multiple SNMP input plugins. 
>>>>>   The reason is that I have lots of different types of machines that I 
>>>>> would like to collect different OIDs for. 
>>>>> > 
>>>>> > 
>>>>> > I figured maybe the best way was to have separate .conf files under 
>>>>> telegraf.d but it while they seemed to load the config they didn't run.  
>>>>> So 
>>>>> as a test I put the config back into the main telegraf.conf file and 
>>>>> found 
>>>>> the same situation. 
>>>>> > 
>>>>> > 
>>>>> > Config file: 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > [[inputs.snmp]] 
>>>>> > 
>>>>> >   interval = "10s" 
>>>>> > 
>>>>> >   agents = [ "192.168.0.1:161", "192.168.0.2:161" ] 
>>>>> > 
>>>>> >   timeout = "5s" 
>>>>> > 
>>>>> >   version = 2 
>>>>> > 
>>>>> >   community = "public" 
>>>>> > 
>>>>> >   max_repetitions = 50 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> >   name = "test" 
>>>>> > 
>>>>> >   [[inputs.snmp.field]] 
>>>>> > 
>>>>> >         name        = "hostname" 
>>>>> > 
>>>>> >         oid        = ".1.3.6.1.2.1.1.5.0"                # sysName 
>>>>> > 
>>>>> >         is_tag        = true 
>>>>> > 
>>>>> > 
>>>>> > [[inputs.snmp]] 
>>>>> >   interval = "10s" 
>>>>> >   agents = [ "192.168.0.3:161" ] 
>>>>> >   timeout = "5s" 
>>>>> >   version = 2 
>>>>> >   community = "public" 
>>>>> >   max_repetitions = 50 
>>>>> > 
>>>>> > 
>>>>> >   name = "test" 
>>>>> >   [[inputs.snmp.field]] 
>>>>> >         name        = "other" 
>>>>> >         oid        = ".1.3.6.1.2.1.1.5.0" 
>>>>> > 
>>>>> >         is_tag        = true 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > The result in the log file looks like: 
>>>>> > 
>>>>> > 
>>>>> > * Plugin: snmp, Collection 1 
>>>>> > * Internal: 10s 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > > cpu,agent_host=....                            (all the stats for 
>>>>> the first [[inputs.snmp]] entry work okay) 
>>>>> > 
>>>>> > 
>>>>> > * Plugin: snmp, Collection 1 
>>>>> > 
>>>>> > 
>>>>> > * Internal: 10s 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > the log then stops. As if the 2nd [[inputs.snmp]] is loaded but not 
>>>>> run. No stats are collected for these hosts. 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > Is there a correct way to do different collections for different 
>>>>> hosts or a better way to achieve this? 
>>>>>
>>>>>
>>>
>

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/777a34fc-02d4-48e6-bb6a-8ebb7bd127f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to