I am exploring publishing metrics from my application to ES, and it looks like libbeat might be a good way to do this.
However, I'm having trouble seeing how to instantiate a github.com/elastic/beats/libbeat/beat.Beat to pass to the constructor of my custom github.com/elastic/beats/libbeat/beat.Beater. All of the examples I can find are for building a standalone monitoring application that reads config files, etc.
Am I wrong that libbeat could help me here? Can anyone point me to a similar use case?
It's a bit outdated as lots of things in the interfaces used changed with 6.0. I would recommend you to have a look at one of the simpler outputs like the file output to see what the minimal interfaces are that are required. https://github.com/elastic/beats/tree/master/libbeat/outputs/fileout
Right now, we send lots of metrics on everything in our application to graphite (using go-metrics). However, we are experiencing some growing pains with graphite, so I wanted to explore using ES as the backend for this. I thought embedding beats into our application (in place of go-metrics-graphite) would make sense, but maybe it isn't a good fit.
It probably can be done but is not really what beats was designed for.
If you are looking for a library that you can to send data to Elasticsearch (through apm-server) have a look at our go apm agent: https://github.com/elastic/apm-agent-go It does not support yet metrics but should happen in the future.
As I'm very interested on how people want to send metrics to ES can you perhaps share some more details on the metrics you generate? To you aggregate them on the client side or send one event for each? What is the structure of the metric events you send out?
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.