# OPC UA on Telegraf and column database

**URL:** <https://community.influxdata.com/t/opc-ua-on-telegraf-and-column-database/34471>\
**Category:** Systems\
**Tags:** telegraf\
**Created:** [June 5, 2024, 2:05pm UTC](https://community.influxdata.com/t/opc-ua-on-telegraf-and-column-database/34471 "2024-06-05T14:05:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alberto\_p](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/alberto_p/32/15693_2.png) [@alberto\_p](https://community.influxdata.com/u/alberto_p)\
**Post date:** [June 5, 2024, 2:05pm UTC](https://community.influxdata.com/t/opc-ua-on-telegraf-and-column-database/34471/1 "2024-06-05T14:05:28Z")

</div>

Hi all,  
I’m a beginner in Telegraf and InfluxDB, and I configured input in Telegraf with OPC UA and with the follow configuration :

```auto
: nodes = [
  {name="Tag1", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag1"}, 
  {name="Tag2", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag2"},
  {name="Tag3", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag3"}
]

```

I get in database for each Tag(n) the correspondent value like the follow one:  
`"host","id","Quality","timestamp","Tag1","Tag2","Tag3"`

> timestamp … Tag1\_val,null, null  
> timestamp … null,Tag2\_val, null  
> timestamp … null, null, Tag3\_val

and I would like the follow:  
`"host","id","Quality","timestamp","Tag"`

> timestamp … Tag1\_val  
> timestamp … Tag2\_val  
> timestamp … Tag3\_val

who can suggest me which could be the configuration?  
Best Regards  
Alberto

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [June 5, 2024, 4:43pm UTC](https://community.influxdata.com/t/opc-ua-on-telegraf-and-column-database/34471/2 "2024-06-05T16:43:19Z")

</div>

Hello @alberto_p,

If you want each tag to be in its own measurement:

```auto
[[inputs.opcua]]
  endpoint = "opc.tcp://localhost:4840"
  security_policy = "None"
  security_mode = "None"
  authentication_method = "Anonymous"
  name_override = "opcua"
  metric_name = "opcua_metrics"
  
  nodes = [
    {name="Tag1", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag1"}, 
    {name="Tag2", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag2"},
    {name="Tag3", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag3"}
  ]

  fieldpass = ["Tag1", "Tag2", "Tag3"]

```

If you want all tags to be in a single measurement but on separate rows:

```auto
[[inputs.opcua]]
  endpoint = "opc.tcp://localhost:4840"
  security_policy = "None"
  security_mode = "None"
  authentication_method = "Anonymous"
  name_override = "opcua"
  metric_name = "opcua_metrics"
  
  nodes = [
    {name="Tag1", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag1"}, 
    {name="Tag2", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag2"},
    {name="Tag3", namespace="2", identifier_type="s", identifier="Channel1.Device1.Tag3"}
  ]

  fieldpass = ["Tag1", "Tag2", "Tag3"]

```

Does that help?

---

<div class="post-metadata">

**Author:** ![alberto\_p](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/alberto_p/32/15693_2.png) [@alberto\_p](https://community.influxdata.com/u/alberto_p)\
**Post date:** [June 6, 2024, 3:57pm UTC](https://community.influxdata.com/t/opc-ua-on-telegraf-and-column-database/34471/3 "2024-06-06T15:57:52Z")

</div>

Hi Anaisdg,  
thanks’ for quick response!  
I tried to apply both solutions but the only effect that I can see is visible below.

without `fieldinclude` is present the Quality key,value:

> opcua,host=QUESTDB,id=ns=2;s=B11.Device1.M.Alarm.0x0000 Quality=“The operation succeeded. StatusGood (0x0)”,Tag5=1i 1717687067000000000  
> opcua,host=QUESTDB,id=ns=2;s=B11.Device1.M.Alarm.0x0001 Quality=“The operation succeeded. StatusGood (0x0)”,Tag6=1i 1717687067000000000

with fieldinclude:

> opcua,host=QUESTDB,id=ns=2;s=B11.Device1.M.Alarm.0x0000 Tag5=2i 1717687667000000000  
> opcua,host=QUESTDB,id=ns=2;s=B11.Device1.M.Alarm.0x0001 Tag6=2i 1717687667000000000

and in database still present the form  
timestamp … Tag5\_val,null  
timestamp … null,Tag6\_val

Additional: `filedpass` seems deprecated and suggest to use `fieldinclude`, and `name_override` and `metric_name` has no effect on the output.

Best Regards  
Alberto

---

<div class="post-metadata">

**Author:** ![barts2108](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/barts2108/32/10674_2.png) [@barts2108](https://community.influxdata.com/u/barts2108)\
**Post date:** [October 16, 2026, 6:17am UTC](https://community.influxdata.com/t/opc-ua-on-telegraf-and-column-database/34471/4 "2026-10-16T06:17:35Z")

</div>

Sorry for late question. I do not see any difference between the two code snippets.  
Currently I am facing the same issue: each opcua node will be stored in its own column in influxdb(v3). With a maximum of 1000 columns that’s not a good solution.

Was the second code snippet meant to be different from the first one ? If so, will you still be able to post the corrected second snippet?
