I use INPUT OPCUA.LISTENER in telegraf, I collect data from kepware (opcua Server).
I have problem with bad status.
How do I change output data when the status is bad,
I need: When the status signal == bad I would like my output data for example equals: “MACHINE OFF”. This is possible?
At the moment, when the status is bad, Telegraf does not send any information about this.
In database, I have last value with status good
Hello @Michu123 ,
What version of InfluxDB are you using?
You could use Flux to do this processing after.
Or you could use the execd processor plugin and code that logic in the language of your choice.
# Execd Processor Plugin
The `execd` processor plugin runs an external program as a separate process and
pipes metrics in to the process's STDIN and reads processed metrics from its
STDOUT. The programs must accept influx line protocol on standard in (STDIN)
and output metrics in influx line protocol to standard output (STDOUT).
Program output on standard error is mirrored to the telegraf log.
Telegraf minimum version: Telegraf 1.15.0
## Caveats
- Metrics with tracking will be considered "delivered" as soon as they are passed
to the external process. There is currently no way to match up which metric
coming out of the execd process relates to which metric going in (keep in mind
that processors can add and drop metrics, and that this is all done
asynchronously).
- it's not currently possible to use a data_format other than "influx", due to
the requirement that it is serialize-parse symmetrical and does not lose any
This file has been truncated. show original
Here’s a repo with an example of using the execd processor plugin so you understand the file system etc
1 Like