Get http site body content with metricbeat or heartbeat

Hello,

Sorry for the newbie request... I managed to deploy & configure metribeat & heartbeat to monitor a few things, and make some graphs.
Unfortunately did not manage to get the body content of a simple webpage with the folowing http.yml configuration in metricbeat.
Could you please tell how i can do this ?

  • module: http
    metricsets: ["json"]
    period: 10s
    hosts: ["localhost:8182"]
    namespace: "json_namespace"
    path: "/TDV/isAlive"
    body: ""
    method: "GET"
    request.enabled: true
    response.enabled: true

Is the endpoint you're trying to reach JSON?

Are there any errors in the metricbeat logs?

No, the endpoint is not JSON. The logs show an error with the namespace (seems legit).
Is it mandatory ?

I also tried with the Metricbeat http module : metricsets: ["server"]
And also with Heartbeat and did not succeed

Hmmm, so the overall goal here is to fetch a webpage and get its contents.

This sounds a lot like heartbeat, but you also want the HTTP body, which it doesn't store. Is that a correct understanding?

May I ask what you want the body for?

You're absolutely right :slight_smile:
I'd like to get the body of a very light life-test web page for monitoring and build watcher alerts.

Do you think that's possible ?
One desperate solution may be to get the body content with a wget and send the output to a log file which would be send to kibana with Filebeat, but that seems really... desperate and awfull.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.