I have come to this thread due to a problem similar to the one discussed here, and I would like to please, if you would be so kind to help me or guide me in this regard.
I’m trying to run a monitoring stack that I successfully developed and implemented in another infrastructure at the time.
However, I am getting an error similar to the one reported in this thread. In this new infrastructure where I am trying to make the code I had developed work, I am getting errors from the telegraf agent since it cannot ingest the data into the influx database:
[inputs.exec] Error in plugin: metric parse error: expected tag at 1: 7: "ERROR:"
The funny thing about the case is that if I do a test of my configuration file, telegraf reads and executes the script that generates the metric, correctly, but if I let the system run on its own, it gives the error that I indicated before.
Doing a test of the configuration file I get an output like this:
[root@ip-XXX-31-XX-XXX oracle]# telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d --test --input-filter="exec"
2021-09-27T23:45:09Z I! Starting Telegraf 1.20.0
> oracle_bbdd_pga_usage,db_name=ORCL,host=ip-XXX-31-XXX-XXX.eu-west-1.compute.internal,pga_usage_stat=session_pga_memory,product=orards pga_usage_amount=490618600 1632786309000000000
> oracle_bbdd_pga_usage,db_name=ORCL,host=ip-XXX-31-XXX-XXX.eu-west-1.compute.internal,pga_usage_stat=session_pga_memory_max,product=orards pga_usage_amount=644279672 1632786309000000000
From the telegraf configuration file, I call the script that generates the metric, like this:
commands = ["/etc/telegraf/telegraf.d/plugins/oracle/telegraf_call_ora_metric_queries oracle_bbdd_instance_sum_pga_usages.sql"]
timeout = "40s"
interval = "60s"
data_format = "influx"
Please, could you help me determine what is the reason why influx rejects the metric?
Thank you so much in advance for any help you could give me in this regard.