# \#starlark

**URL:** https://community.influxdata.com/tag/starlark/117.md

[Latest](https://community.influxdata.com/latest.md) · [Categories](https://community.influxdata.com/categories.md) · [Tags](https://community.influxdata.com/tags.md)

---

## [Nested JSON Array](https://community.influxdata.com/t/nested-json-array/19479)

<div class="topic-metadata">

**Author:** [@goodvirus](https://community.influxdata.com/u/goodvirus)\
**Replies:** 9\
**Last updated:** [June 24, 2025, 11:08pm UTC](https://community.influxdata.com/t/nested-json-array/19479 "2025-06-24T23:08:20Z")

</div>

Hi, I´m trying to ingest some JSON data from an IoT scenario, but can’t get my head around how to ingest some JSON arrays. I got the following data: { "device\_name": "\_5\_115\_3\_TK\_Emmastr\_14", "properties": \[ …

---

## [OPCUA group combine values into tags](https://community.influxdata.com/t/opcua-group-combine-values-into-tags/57245)

<div class="topic-metadata">

**Author:** [@Marc203](https://community.influxdata.com/u/Marc203)\
**Replies:** 5\
**Last updated:** [May 14, 2025, 6:08pm UTC](https://community.influxdata.com/t/opcua-group-combine-values-into-tags/57245 "2025-05-14T18:08:17Z")

</div>

Hi all, I’m a bit lost after trying and reading for 2 days now.. Using Telegraf to collect data from an OPCUA server Problem is, that I can only read each value as separate value and this should be handled as a tag fo…

---

## [Telegraf deadband for polling plugin using starlark](https://community.influxdata.com/t/telegraf-deadband-for-polling-plugin-using-starlark/56713)

<div class="topic-metadata">

**Author:** [@JeroenVH](https://community.influxdata.com/u/JeroenVH)\
**Replies:** 10\
**Last updated:** [April 7, 2025, 4:30pm UTC](https://community.influxdata.com/t/telegraf-deadband-for-polling-plugin-using-starlark/56713 "2025-04-07T16:30:14Z")

</div>

Hello, When using an input plugin that is polling based, I would like to implement a deadband on all fields within a metric. In opcua\_listener this is part of the protocol, but for other polling based protocols like s7c…

---

## [Unable to rewrite timestamp using starlark processor](https://community.influxdata.com/t/unable-to-rewrite-timestamp-using-starlark-processor/39683)

<div class="topic-metadata">

**Author:** [@adam3ngland](https://community.influxdata.com/u/adam3ngland)\
**Replies:** 3\
**Last updated:** [December 6, 2024, 9:45pm UTC](https://community.influxdata.com/t/unable-to-rewrite-timestamp-using-starlark-processor/39683 "2024-12-06T21:45:48Z")

</div>

Setup: Telegraf with the tail plugin and grok data format to parse a local log file that is appended to periodically. I want to take a timestamp from the log file, convert it to UTC, and write that back into metric.time…

---

## [Starlark persitence](https://community.influxdata.com/t/starlark-persitence/38810)

<div class="topic-metadata">

**Author:** [@cortlieb](https://community.influxdata.com/u/cortlieb)\
**Replies:** 3\
**Last updated:** [October 31, 2024, 2:04pm UTC](https://community.influxdata.com/t/starlark-persitence/38810 "2024-10-31T14:04:58Z")

</div>

Hi there, I’m using a starlark script in my telegraf config-file. It basically calculates the difference between the previous amount of rainfall from a sensor and the current amount of rainfall and writes it into a mea…

---

## [Telegraf \[processors.starlark\]: issues only one topic appeared](https://community.influxdata.com/t/telegraf-processors-starlark-issues-only-one-topic-appeared/34674)

<div class="topic-metadata">

**Author:** [@sin\_356](https://community.influxdata.com/u/sin_356)\
**Replies:** 16\
**Last updated:** [July 2, 2024, 2:29pm UTC](https://community.influxdata.com/t/telegraf-processors-starlark-issues-only-one-topic-appeared/34674 "2024-07-02T14:29:02Z")

</div>

is there something wrong with this telegraf config ? \[outputs.influxdb\_v2\]\] urls = \["https://us-east-1-1.aws.cloud2.influxdata.com"\] token = "" organization = "." bucket = "MQTT input" exclude\_bucket\_tag = f…

---

## [\[processors.starlark\] Traceback (most recent call last): :2:20: in apply Error: key "pdu\_n05\_usv\_l1-A" not in Fields](https://community.influxdata.com/t/processors-starlark-traceback-most-recent-call-last-20-in-apply-error-key-pdu-n05-usv-l1-a-not-in-fields/34707)

<div class="topic-metadata">

**Author:** [@s.block](https://community.influxdata.com/u/s.block)\
**Replies:** 3\
**Last updated:** [June 25, 2024, 7:33pm UTC](https://community.influxdata.com/t/processors-starlark-traceback-most-recent-call-last-20-in-apply-error-key-pdu-n05-usv-l1-a-not-in-fields/34707 "2024-06-25T19:33:07Z")

</div>

Hi, I get this error, when I try to process some data. Can anyone help me? Here’s my config: \[\[inputs.snmp\]\] agents = \[“udp://xxx.xxx.xxx.xxx:161”\] ## PDU USV SR1 ## Agent addresses to retrieve values from. inter…

---

## [Telegraf: drop complete lines to insert when a value is 0 from MQTT in Json](https://community.influxdata.com/t/telegraf-drop-complete-lines-to-insert-when-a-value-is-0-from-mqtt-in-json/33168)

<div class="topic-metadata">

**Author:** [@HolasoyLorenzo](https://community.influxdata.com/u/HolasoyLorenzo)\
**Replies:** 2\
**Last updated:** [February 12, 2024, 2:22pm UTC](https://community.influxdata.com/t/telegraf-drop-complete-lines-to-insert-when-a-value-is-0-from-mqtt-in-json/33168 "2024-02-12T14:22:46Z")

</div>

Im sending data over mqtt, telegraf, influx grafana. When 1 the “power0” field is 0, there is no need to store in the database for some devices. For some others I need also the 0 values, otherwise the “mean” values are…

---

## [Telegraf starlark issues - multiple snmp table fields](https://community.influxdata.com/t/telegraf-starlark-issues-multiple-snmp-table-fields/32532)

<div class="topic-metadata">

**Author:** [@netdude](https://community.influxdata.com/u/netdude)\
**Replies:** 8\
**Last updated:** [December 19, 2023, 5:35pm UTC](https://community.influxdata.com/t/telegraf-starlark-issues-multiple-snmp-table-fields/32532 "2023-12-19T17:35:24Z")

</div>

Hello community, I am having a heck of a time getting the starlark processor to do what I want it to do. Essentially we are feeding snmp tables/fields into telegraf/influxdb. We are using the starlark processor to manip…

---

## [Starlark processing time in telegraf csv input](https://community.influxdata.com/t/starlark-processing-time-in-telegraf-csv-input/28687)

<div class="topic-metadata">

**Author:** [@Andreas](https://community.influxdata.com/u/Andreas)\
**Replies:** 1\
**Last updated:** [February 22, 2023, 7:55pm UTC](https://community.influxdata.com/t/starlark-processing-time-in-telegraf-csv-input/28687 "2023-02-22T19:55:24Z")

</div>

Trying to ingest CSV data via tail input in Telegraf. My CSV data has a unusual timeformat: DATE Type | Microsoft Learn I have written a starlark processor to handle it. It seems the starlark processing is happening af…

---

## [Help with decoding JSON mqtt data](https://community.influxdata.com/t/help-with-decoding-json-mqtt-data/18639)

<div class="topic-metadata">

**Author:** [@J.J.A\_Vogels](https://community.influxdata.com/u/J.J.A_Vogels)\
**Replies:** 7\
**Last updated:** [February 12, 2022, 9:43am UTC](https://community.influxdata.com/t/help-with-decoding-json-mqtt-data/18639 "2022-02-12T09:43:17Z")

</div>

Hello, I am getting hexadecimal 32bit float types via mqtt in json format. The json format looks like this: \[ { “bn” : “urn:dev:DEVEUI:000000C00001B08A7:”, “bt” : 1.614612404E9 }, { “n” : “payload”, “vs” : “01001…

---

## [Starlark for inputs.file with name\_override](https://community.influxdata.com/t/starlark-for-inputs-file-with-name-override/23213)

<div class="topic-metadata">

**Author:** [@icarson](https://community.influxdata.com/u/icarson)\
**Replies:** 2\
**Last updated:** [January 4, 2022, 11:03pm UTC](https://community.influxdata.com/t/starlark-for-inputs-file-with-name-override/23213 "2022-01-04T23:03:59Z")

</div>

Hi All I am extracting the cpu temperature from a Raspberry Pi using the following in my telegraf.conf \[\[inputs.file\]\] files = \["/sys/class/thermal/thermal\_zone0/temp"\] name\_override = "cpu\_temperature" dat…

---

## [Help starlark simple script](https://community.influxdata.com/t/help-starlark-simple-script/21740)

<div class="topic-metadata">

**Author:** [@pietro.ficeli](https://community.influxdata.com/u/pietro.ficeli)\
**Replies:** 1\
**Last updated:** [September 17, 2021, 6:11pm UTC](https://community.influxdata.com/t/help-starlark-simple-script/21740 "2021-09-17T18:11:02Z")

</div>

Hi all, I would like to calculate directly in telegraf the percentage of memory occupied on my devices (procurve switch). I would like to do this using starlark. Here is my configuration file “test.conf” \[\[inputs.snm…

---

## [Starlark: Error: unknown binary op: int - time.duration](https://community.influxdata.com/t/starlark-error-unknown-binary-op-int-time-duration/21214)

<div class="topic-metadata">

**Author:** [@mohsin106](https://community.influxdata.com/u/mohsin106)\
**Replies:** 1\
**Last updated:** [August 16, 2021, 9:06am UTC](https://community.influxdata.com/t/starlark-error-unknown-binary-op-int-time-duration/21214 "2021-08-16T09:06:06Z")

</div>

My data coming into Telegraf: { "fields": { "description": "desc goes here" }, "name": "measurement name", "tags": { "host": "hostname", "name": "interface-name", "path": "", "source": "sourc…
