OK, I tried this again, here is the full error message:
metricbeat[19013]: {"log.level":"error","@timestamp":"2022-08-25T09:34:55.013Z","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset http.json: invalid character '#' looking for beginning of value","service.name":"metricbeat","ecs.version":"1.6.0"}
And here is the full config file /etc/metricbeat/modules.d/http.yml
Ah ok, I think this error comes from the parsing of the response received from the server, from here, or here.
Btw, do you know if the response received is an array? Then json.is_array: true should be used.
Would you have a chance to capture this response? Maybe using something like https://mitmproxy.org/, or modifying Metricbeat to log what is trying to parse.
Hmm... the response doesn't really look like a JSON object at all. Here is what it looks like
# HELP confluent_kafka_server_received_bytes The delta count of bytes of the customer's data received from the network. Each sample is the number of bytes received since the previous data sample. The count is sampled every 60 seconds.
# TYPE confluent_kafka_server_received_bytes gauge
confluent_kafka_server_received_bytes{kafka_id="XXXX",topic="XXXX",} N.N NNNNN
confluent_kafka_server_received_bytes{kafka_id="XXXX",topic="XXXXX",} N.N NNNNN
So it seems like the problem is that i was incorrect in using the JSON metricset here. You answer above technically solves the issue with the key having a dot in it, so I will mark that as the solution. My problem of getting these metrics into elastic still remains to be solved
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.