sematext / sematext-agent-docker

Sematext Docker Agent - host + container metrics, logs & event collector
https://sematext.com/docker
Apache License 2.0
209 stars 30 forks source link

Using local elasticsearch cluster and bulk post fails #47

Closed PetterHaggman closed 5 years ago

PetterHaggman commented 6 years ago

Hi I've tried to use the agent for monitoring in a docker swarm, sending to a local elasticsearch cluster. I keep getting http errors about bulk insert:

""reason" : "Malformed action/metadata line [1], expected START_OBJECT or END_OBJECT but found ".

This seems to be because the agent posting to es lacks the "action_and_meta_data\n" as line 1.

Now I've tried this with 1.31.62 against es 6.4.2 and 5.6.12 with the same problem. My question is if this setup has worked before or am I on a lonely road here? If this is a bug, what previous release of the agent could I try instead?

Regards /Petter

megastef commented 6 years ago

Please try Logagent image to collect Docker logs: https://hub.docker.com/r/sematext/logagent/

megastef commented 5 years ago

What did tou configure as LOGSENE_RECEIVER?

See e.g https://github.com/sematext/sematext-agent-docker/issues/44#issuecomment-377504681

megastef commented 5 years ago

Ahh - You tried to send metrics to Elasticsearch? This is not supported - only logs can be shipped to Elasticsearch. We support InfluxDB interface in a new agent version, which will be released very soon (in a few weeks). But logagent can receive data from any influxdb agent and ship data to Elasticsearch. Check the plugin list: https://sematext.com/docs/logagent/plugins/