# Telegraf , SNMP Tag keys issue

**URL:** <https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257>\
**Category:** Systems\
**Tags:** influxdb, telegraf\
**Created:** [June 5, 2021, 1:29pm UTC](https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257 "2021-06-05T13:29:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiran\_Kumar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/kiran_kumar/32/7619_2.png) [@Kiran\_Kumar](https://community.influxdata.com/u/Kiran_Kumar)\
**Post date:** [June 5, 2021, 1:29pm UTC](https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257/1 "2021-06-05T13:29:45Z")

</div>

Hey Hi ,

I’m using oid to get the snmp fields and when i set is\_tag = true , the data is missing and the configuration is below

when i remove is\_tag = true data is being pushed to the influx db , as without tags i was unable to perform influx db time series analysis

[[inputs.snmp]]  
agents = [“103.148.119.222”]  
version = 2  
community = “private”  
interval = “5s”  
timeout = “10s”  
retries = 3  
[[inputs.snmp.field]]  
oid = “SNMPv2-MIB::sysDescr.0”  
name = “hostname”

[[inputs.snmp.table]]  
name = “onu”  
inherit\_tags = [“hostname”]  
[[inputs.snmp.table.field]]  
name = “rx”  
oid = “1.3.6.1.4.1.37950.1.1.6.1.1.3.1.7”  
[[inputs.snmp.table.field]]  
name = “ONUname”  
oid = “1.3.6.1.2.1.31.1.1.1.1”  
is\_tag = true

---

<div class="post-metadata">

**Author:** ![FixTestRepeat](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/fixtestrepeat/32/5208_2.png) [@FixTestRepeat](https://community.influxdata.com/u/FixTestRepeat)\
**Post date:** [June 5, 2021, 11:06pm UTC](https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257/2 "2021-06-05T23:06:31Z")

</div>

Welcome!  
Can you clarify what your desired result is? Is it working without tagging ? If not, what about it is isn’t working?

The general rule of thumb is do not creat a tag unless you actually need it. Creating extra tags increases series cardinality ,

---

<div class="post-metadata">

**Author:** ![Kiran\_Kumar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/kiran_kumar/32/7619_2.png) [@Kiran\_Kumar](https://community.influxdata.com/u/Kiran_Kumar)\
**Post date:** [June 6, 2021, 8:41am UTC](https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257/3 "2021-06-06T08:41:14Z")

</div>

Goal : To capture multiple interfaces RX Transmission Power

OID 1 : Interface name  
OID 2 : RX Transmission power

where currently i’m able to capture these values and push them to influx metrics , but when i try to put analytics in Grafana the interface was not getting listed in SELECT

```auto
> select * from interface limit 10
name: interface
time agent_host host hostname ifDescr rx
---- ---------- ---- -------- ------- --
1622968194000000000 100.164.119.222 TESTIN-NMS V1600G0 GPON03ONU31 jayantilal-bsnl -14.498(dBm)
1622968199000000000 100.164.119.222 TESTIN-NMS V1600G0 GPON01ONU4 abbastara -13.686(dBm)
1622968203000000000 100.164.119.222 TESTIN-NMS V1600G0 GPON03ONU26 -17.906(dBm)
1622968210000000000 100.164.119.222 TESTIN-NMS V1600G0 GPON02ONU9 ashishthakur -16.218(dBm)
1622968215000000000 103.148.119.222 TESTIN-NMS V1600G0 GPON02ONU15 YASHWANTMEENA-BSNL -19.548(dBm)

```

 ![Screenshot 2021-06-06 at 2.02.21 PM](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/6/64075b234012db4a25b5622c5bde0ea92084f6d8.png)

When i tried to make the OID 1 as is\_tag = true the data is null , but without tag the data is being pushed

Thanks for replying , awaiting to see how can this be fixed

---

<div class="post-metadata">

**Author:** ![Hipska](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/hipska/32/3877_2.png) [@Hipska](https://community.influxdata.com/u/Hipska)\
**Post date:** [June 10, 2021, 12:45pm UTC](https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257/4 "2021-06-10T12:45:56Z")

</div>

Your table is called `onu` instead of `interface`.

What do you get as output when running `telegraf --test`?

---

<div class="post-metadata">

**Author:** ![Kiran\_Kumar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/kiran_kumar/32/7619_2.png) [@Kiran\_Kumar](https://community.influxdata.com/u/Kiran_Kumar)\
**Post date:** [June 10, 2021, 4:18pm UTC](https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257/5 "2021-06-10T16:18:15Z")

</div>

HI Hipska ,

i just renamed my table from onu to interface

---

<div class="post-metadata">

**Author:** ![Nicomdz](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/nicomdz/32/11066_2.png) [@Nicomdz](https://community.influxdata.com/u/Nicomdz)\
**Post date:** [September 23, 2022, 5:18pm UTC](https://community.influxdata.com/t/telegraf-snmp-tag-keys-issue/20257/6 "2022-09-23T17:18:41Z")

</div>

Hi everyone, could you help me? i try graphing value of onu power rx, I am doing something wrong.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/b/be2bf555c51bf91cd9d68603f5b20d6f729c2516.png)

```auto
> SELECT * FROM "Snmp_Onus" taks
ERR: error parsing query: found taks, expected ; at line 1, char 27
> SELECT * FROM "Snmp_Onus" 
name: Snmp_Onus
time OnuIndex Onurx agent_host gOnuOpticalInfoBias gOnuOpticalInfoOnuInx gOnuOpticalInfoPonInx gOnuOpticalInfoRxPwr gOnuOpticalInfoTemp gOnuOpticalInfoTxPwr gOnuOpticalInfoVolt host
---- -------- ----- ---------- ------------------- --------------------- --------------------- -------------------- ------------------- -------------------- ------------------- ----
1663947681000000000 1 -21.080(dBm) 10.20.41.2 14.800(mA) 1 1 -21.192(dBm) 33.750(C) 2.374(dBm) 3.42(V) 9de4157992ae
1663947681000000000 10 -19.172(dBm) 10.20.41.2 12.600(mA) 10 1 -19.202(dBm) 24.309(C) 1.950(dBm) 3.36(V) 9de4157992ae
1663947681000000000 11 -20.080(dBm) 10.20.41.2 12.250(mA) 11 1 -20.000(dBm) 28.152(C) 1.888(dBm) 3.40(V) 9de4157992ae
1663947681000000000 12 -19.102(dBm) 10.20.41.2 11.200(mA) 12 1 -19.202(dBm) 27.453(C) 1.988(dBm) 3.40(V) 9de4157992ae
1663947681000000000 13 -18.666(dBm) 10.20.41.2 11.700(mA) 13 1 -18.730(dBm) 36.199(C) 2.044(dBm) 3.32(V) 9de4157992ae
1663947681000000000 14 -22.840(dBm) 10.20.41.2 14.750(mA) 14 1 -22.926(dBm) 33.402(C) 2.470(dBm) 3.36(V) 9de4157992ae

```

**[[inputs.snmp]]**  
\*\* agents = [“10.20.41.2:161”] # Replace this with your router(s) IP/port\*\*  
\*\* community = “ad123”\*\*  
\*\* interval = “60s”\*\*  
\*\* name = “an1”\*\*  
\*\* #OLT\*\*  
\*\* [[inputs.snmp.table]]\*\*  
\*\* name = “Snmp\_Onus”\*\*  
\*\* oid = “V1600G::gOnuOpticalInfoTable”\*\*  
**[[inputs.snmp.table.field]]**  
**name = “OnuIndex”**  
**oid = “1.3.6.1.4.1.37950.1.1.6.1.1.3.1.2”**  
**is\_tag = true**

**[[inputs.snmp.table.field]]**  
**name = “Onurx”**  
**oid = “1.3.6.1.4.1.37950.1.1.6.1.1.3.1.7”**  
**is\_tag = true**

```auto

```
