Hi Guys,
hope you can help me out in the following.
i'm using:
- Elasticseearch 8.4.3
- metricbeat 8.4.3
- kubernetes / AWS EKS
I've deployed metricbeat in a kubernetes cluster. it gathering all sort of data and i also want it scrape a prometheus endpoint, the endpoint is available via:
testservice.default:9090
my prometheus module config looks like this:
- module: prometheus
metricsets: ["collector"]
enabled: true
period: 10s
hosts: ["testservice.default:9090"]
metrics_path: /metrics
so this seems to be working, as i don't see any error in the logs of metricbeat. However i don't see these logs coming in to my elasticstack. (other logs that metricbeat is collecting are being received).
i turned on debug logging in metricbeat to see if this would get me any further as to identify what the issue could be, however also here there is no error.
i see this log line:
{"log.level":"debug","@timestamp":"2023-03-02T13:56:10.972Z","log.logger":"module","log.origin":{"file.name":"module/wrapper.go","file.line":191},"message":"Starting metricSetWrapper[module=prometheus, name=collector, host=testservice.default:9090]","service.name":"metricbeat","ecs.version":"1.6.0"}
witch suggest to me the module is starting.
I also start seeing the log lines i want in the debug logs. How ever i don't see them appearing in Elasticsearch. I searched all indexes via:
GET /_search
{
"query": {
"query_string": {
"query": "myapp"
}
}
}
and the log lines are not present in any index..
the elasticsearch logs them self don't show any error's
What am i doing wrong?
Any help or suggestion will be appreciated!