# Help with config

**URL:** <https://community.influxdata.com/t/help-with-config/4778>\
**Category:** Systems\
**Created:** [April 16, 2018, 8:10pm UTC](https://community.influxdata.com/t/help-with-config/4778 "2018-04-16T20:10:14Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![junior466](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/junior466/32/1987_2.png) [@junior466](https://community.influxdata.com/u/junior466)\
**Post date:** [April 16, 2018, 8:10pm UTC](https://community.influxdata.com/t/help-with-config/4778/1 "2018-04-16T20:10:14Z")

</div>

Hello all,

I am sure I am overlooking a small detail but for some reason as soon as I add the section below to my configuration the service fails to start.

```
   # Interface tag - used to identify interface in metrics database
  [[inputs.snmp.table.field]]
  name = "ifDescr"
  oid = "IF-MIB::ifDescr.1"

```

Here’s my complete working config:

```
[[inputs.snmp]]

agents = ["192.168.139.50:161"]
# ## Timeout for each SNMP query.
   timeout = "5s"
# ## Number of retries to attempt within timeout.
   retries = 3
# ## SNMP version, values can be 1, 2, or 3
   version = 2
#   
# ## SNMP community string.
   community = "public"
#
# ## The GETBULK max-repetitions parameter
   max_repetitions = 10
#
# ## measurement name
   name = "unifi_UAP"
   [[inputs.snmp.field]]
     name = "sysUpTime"
     oid = ".1.3.6.1.4.1.41112.1.6.3.5.0"

```

Error:

```
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
   Loaded: loaded (/lib/systemd/system/telegraf.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Mon 2018-04-16 16:03:24 EDT; 361ms ago
     Docs: https://github.com/influxdata/telegraf
  Process: 14049 ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d $TELEGRAF_OPTS (code=exited, status=1/FAILURE)
 Main PID: 14049 (code=exited, status=1/FAILURE)

Apr 16 16:03:24 ubuntustats systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Apr 16 16:03:24 ubuntustats systemd[1]: telegraf.service: Unit entered failed state.
Apr 16 16:03:24 ubuntustats systemd[1]: telegraf.service: Failed with result 'exit-code'.
Apr 16 16:03:24 ubuntustats systemd[1]: telegraf.service: Service hold-off time over, scheduling restart.
Apr 16 16:03:24 ubuntustats systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Apr 16 16:03:24 ubuntustats systemd[1]: telegraf.service: Start request repeated too quickly.
Apr 16 16:03:24 ubuntustats systemd[1]: Failed to start The plugin-driven server agent for reporting metrics into InfluxDB.

```

What I am doing wrong?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [April 16, 2018, 8:55pm UTC](https://community.influxdata.com/t/help-with-config/4778/2 "2018-04-16T20:55:03Z")

</div>

I think maybe you just need `inputs.snmp.table` before the table field:

```auto
[[inputs.snmp.table]]
  [[inputs.snmp.table.field]]
  name = "ifDescr"
  oid = "IF-MIB::ifDescr.1"

```

If that doesn’t help, can you post the full non-working section for the snmp input.

---

<div class="post-metadata">

**Author:** ![junior466](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/junior466/32/1987_2.png) [@junior466](https://community.influxdata.com/u/junior466)\
**Post date:** [April 16, 2018, 9:25pm UTC](https://community.influxdata.com/t/help-with-config/4778/3 "2018-04-16T21:25:25Z")

</div>

@daniel That helped and now the service will start. Unfortunately I am greeted with:

```
Error in plugin [inputs.snmp]: initializing table unifi: initializing field ifDescr: translating: exec: "snmptranslate": executable file not found in $PATH
```

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [April 16, 2018, 11:48pm UTC](https://community.influxdata.com/t/help-with-config/4778/4 "2018-04-16T23:48:54Z")

</div>

When using OID textual names, you will need the snmptranslate and snmptable commands in your environment. Usually you can get these with `apt-get install snmp`.

---

<div class="post-metadata">

**Author:** ![junior466](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/junior466/32/1987_2.png) [@junior466](https://community.influxdata.com/u/junior466)\
**Post date:** [April 17, 2018, 2:06am UTC](https://community.influxdata.com/t/help-with-config/4778/5 "2018-04-17T02:06:32Z")

</div>

@daniel I tried installing what you suggested but I still get the same error.

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [April 17, 2018, 2:48am UTC](https://community.influxdata.com/t/help-with-config/4778/6 "2018-04-17T02:48:13Z")

</div>

Check if these commands exist for the `telegraf` user:

```auto
sudo -u telegraf snmptranslate --help

```

---

<div class="post-metadata">

**Author:** ![junior466](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/junior466/32/1987_2.png) [@junior466](https://community.influxdata.com/u/junior466)\
**Post date:** [April 17, 2018, 3:08pm UTC](https://community.influxdata.com/t/help-with-config/4778/7 "2018-04-17T15:08:39Z")

</div>

@daniel It does not exist (command not found). Shouldn’t it been installed with snmp?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [April 17, 2018, 5:53pm UTC](https://community.influxdata.com/t/help-with-config/4778/8 "2018-04-17T17:53:49Z")

</div>

Is it listed in the output of `dpkg -L snmp`

---

<div class="post-metadata">

**Author:** ![junior466](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/junior466/32/1987_2.png) [@junior466](https://community.influxdata.com/u/junior466)\
**Post date:** [April 17, 2018, 7:06pm UTC](https://community.influxdata.com/t/help-with-config/4778/9 "2018-04-17T19:06:49Z")

</div>

> [@daniel](#):
>
> sudo -u telegraf snmptranslate --help

Let me try and explain better (should of done that since the beginning, I apologize).

Here’s is my working configuration prior to the error:

```
[[inputs.snmp]]

agents = ["IP:161"]
# ## Timeout for each SNMP query.
   timeout = "5s"
# ## Number of retries to attempt within timeout.
   retries = 3
# ## SNMP version, values can be 1, 2, or 3
   version = 2
#
# ## SNMP community string.
   community = "Public"
#
# ## The GETBULK max-repetitions parameter
   max_repetitions = 10
   
name = "esxi"
[[inputs.snmp.field]]
  name = "esxi-memory-used"
  oid = ".1.3.6.1.2.1.25.2.3.1.6.5"
[[inputs.snmp.field]]
  name = "esxi-memory-available"
  oid = ".1.3.6.1.2.1.25.2.2.0"
[[inputs.snmp.field]]
  name = "esxi-uptime"
  oid = ".1.3.6.1.2.1.25.1.1.0"
[[inputs.snmp.field]]
  name = "esxi-cpuload1"
  oid = ".1.3.6.1.2.1.25.3.3.1.2.1"
[[inputs.snmp.field]]
  name = "esxi-cpuload2"
  oid = "..1.3.6.1.2.1.25.3.3.1.2.2"
[[inputs.snmp.field]]
  name = "esxi-cpuload3"
  oid = ".1.3.6.1.2.1.25.3.3.1.2.3"
[[inputs.snmp.field]]
  name = "esxi-cpuload4"
  oid = ".1.3.6.1.2.1.25.3.3.1.2.4"
[[inputs.snmp.field]]
  name = "esxi-cpuload5"
  oid = ".1.3.6.1.2.1.25.3.3.1.2.5"
[[inputs.snmp.field]]
  name = "esxi-cpuload6"
  oid = ".1.3.6.1.2.1.25.3.3.1.2.6"

```

**Then, I tried adding another configuration for my router:**

```
[[inputs.snmp]]

agents = ["IP:161"]
# ## Timeout for each SNMP query.
   timeout = "5s"
# ## Number of retries to attempt within timeout.
   retries = 3
# ## SNMP version, values can be 1, 2, or 3
   version = 1
#
# ## SNMP community string.
   community = "Public"
#
# ## The GETBULK max-repetitions parameter
   max_repetitions = 10
#
[[inputs.snmp.field]]
  name = "hostname"
  oid = "RFC1213-MIB::sysName.0"
  is_tag = true

[[inputs.snmp.table]]
  name = "snmp"
  inherit_tags = ["hostname"]

[[inputs.snmp.table.field]]
  name = "ifDescr"
  oid = "IF-MIB::ifDescr"
  is_tag = true

[[inputs.snmp.table.field]]
  name = "ifInOctets"
  oid = "IF-MIB::ifInOctets"

[[inputs.snmp.table.field]]
  name = "ifOutOctets"
  oid = "IF-MIB::ifOutOctets"

```

But that results in the error I originally posted. You suggested I install snmp and after doing so I get this when I try the command `telegraf snmptranslate --help`:

```
telegraf snmptranslate --help
2018/04/17 14:53:13 I! Using config file: /etc/telegraf/telegraf.conf
2018-04-17T18:53:13Z I! Starting Telegraf v1.5.3
2018-04-17T18:53:13Z I! Loaded outputs: influxdb
2018-04-17T18:53:13Z I! Loaded inputs: inputs.cpu inputs.mem inputs.net inputs.snmp inputs.snmp inputs.swap inputs.system inputs.ipmi_sensor inputs.disk inputs.diskio inputs.kernel inputs.processes
2018-04-17T18:53:13Z I! Tags enabled: host=ubuntustats
2018-04-17T18:53:13Z I! Agent Config: Interval:10s, Quiet:false, Hostname:"ubuntustats", Flush Interval:10s 
2018-04-17T18:53:22Z E! Error in plugin [inputs.snmp]: initializing field esxi-cpuload2: translating: exit status 2: Bad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDU
Unlinked OID in IPATM-IPMC-MIB: marsMIB ::= { mib-2 57 }
Undefined identifier: mib-2 near line 18 of /usr/share/mibs/ietf/IPATM-IPMC-MIB
Expected "::=" (RFC5644): At line 493 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Expected "{" (EOF): At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad object identifier: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad parse of OBJECT-IDENTITY: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
..1.3.6.1.2.1.25.3.3.1.2.2: Unknown Object Identifier (Sub-id not found: (top) -> )
2018-04-17T18:53:30Z E! Error in plugin [inputs.snmp]: initializing field esxi-cpuload2: translating: exit status 2: Bad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDU

```

Thanks for your help so far.

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [April 17, 2018, 7:38pm UTC](https://community.influxdata.com/t/help-with-config/4778/10 "2018-04-17T19:38:22Z")

</div>

In the original config, there is a line: `oid = "..1.3.6.1.2.1.25.3.3.1.2.2"`, can you remove one of the leading dots so you have `oid = ".1.3.6.1.2.1.25.3.3.1.2.2"`.

---

<div class="post-metadata">

**Author:** ![junior466](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/junior466/32/1987_2.png) [@junior466](https://community.influxdata.com/u/junior466)\
**Post date:** [April 17, 2018, 8:35pm UTC](https://community.influxdata.com/t/help-with-config/4778/11 "2018-04-17T20:35:08Z")

</div>

Ok, now I get:

```
Apr 17 16:32:48 ubuntustats telegraf[29556]: 2018-04-17T20:32:48Z I! Loaded outputs: influxdb
Apr 17 16:32:48 ubuntustats telegraf[29556]: 2018-04-17T20:32:48Z I! Loaded inputs: inputs.mem inputs.swap inputs.system inputs.net inputs.snmp inputs.snmp inputs.snmp inputs.cpu in
Apr 17 16:32:48 ubuntustats telegraf[29556]: 2018-04-17T20:32:48Z I! Tags enabled: host=ubuntustats
Apr 17 16:32:48 ubuntustats telegraf[29556]: 2018-04-17T20:32:48Z I! Agent Config: Interval:10s, Quiet:false, Hostname:"ubuntustats", Flush Interval:10s
Apr 17 16:32:50 ubuntustats telegraf[29556]: 2018-04-17T20:32:50Z E! Error in plugin [inputs.snmp]: initializing table : translating: exit status 2: MIB search path: /etc/telegraf/.
Apr 17 16:32:50 ubuntustats telegraf[29556]: Cannot find module (HOST-RESOURCES-MIB): At line 1 in (none)
Apr 17 16:32:50 ubuntustats telegraf[29556]: HOST-RESOURCES-MIB::hrDeviceTable: Unknown Object Identifier
Apr 17 16:33:50 ubuntustats telegraf[29556]: 2018-04-17T20:33:50Z E! Error in plugin [inputs.snmp]: initializing table : translating: exit status 2: MIB search path: /etc/telegraf/.
Apr 17 16:33:50 ubuntustats telegraf[29556]: Cannot find module (HOST-RESOURCES-MIB): At line 1 in (none)
Apr 17 16:33:50 ubuntustats telegraf[29556]: HOST-RESOURCES-MIB::hrDeviceTable: Unknown Object Identifier
```

---

<div class="post-metadata">

**Author:** ![junior466](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/junior466/32/1987_2.png) [@junior466](https://community.influxdata.com/u/junior466)\
**Post date:** [April 17, 2018, 8:43pm UTC](https://community.influxdata.com/t/help-with-config/4778/12 "2018-04-17T20:43:42Z")

</div>

@daniel After a quick google search, I discovered that I needed to `sudo apt-get install snmp-mibs-downloader` and `sudo download-mibs`. I am sure you were about to tell me to do that anyways! 👍

Now everything works great!

Thank you very much for your prompt responses. I really appreciate it!

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [April 17, 2018, 8:55pm UTC](https://community.influxdata.com/t/help-with-config/4778/13 "2018-04-17T20:55:37Z")

</div>

Cool, I didn’t know about that step. We did it!

---

<div class="post-metadata">

**Author:** ![NVass](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@NVass](https://community.influxdata.com/u/NVass)\
**Post date:** [February 20, 2019, 11:06am UTC](https://community.influxdata.com/t/help-with-config/4778/14 "2019-02-20T11:06:25Z")

</div>

Hi, I have the same problem.

I am trying to collect snmp data from several sources using Telegraf  
however I am getting the same error

When I try to install snmp-mibs-downloader it keeps telling me the package is not available. I have tried adding to the sources.list and updating but nothing works.

I am running ubuntu 17.04 -386i

Any Ideas!

Thanks

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [February 21, 2019, 2:51am UTC](https://community.influxdata.com/t/help-with-config/4778/15 "2019-02-21T02:51:07Z")

</div>

This package is only in the non-free section of the Debian repo, perhaps you need to enable it? Here is a Debian example but it should be pretty similar:

```auto
deb http://ftp.us.debian.org/debian/ stretch main contrib non-free

```

---

<div class="post-metadata">

**Author:** ![NVass](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@NVass](https://community.influxdata.com/u/NVass)\
**Post date:** [February 22, 2019, 6:44am UTC](https://community.influxdata.com/t/help-with-config/4778/16 "2019-02-22T06:44:11Z")

</div>

Thanks for the input. Sorry but your solution didn’t work. However I have solved the problem and Telegraf is now up and running. Just in case anyone else has the same issue this is what I did (not an elegant solution but it worked!).

I am using an old small form factor 32bit machine as its only job is telegraf.

1/ Went back to ubuntu 16.04 -i386 installed and fully updated.  
2/ Found snmp-mibs-downloader\_1.2\_all.deb installed it manually and updated the MIBs files.  
3/ Found snmp\_5.7.2\_dfsg-8.1 ubuntu3.3\_i386.deb and installed it manually.  
4/ Installed Influx repository and Telegraf.  
5/ update telegraf.conf and restarted.

Not elegant but it worked!
