URL monitoring in Kibana

Hi,

I got a requirement to monitor URL for example http://testabc.com:8080/dcf .
In general the url requires username and password to go through.
But is there any way to get status code=200 without passing username and password in heartbeat.yml for this URL

Hi,

Can i know any update

@ksunil, I understand not wanting to include the user and pass information. We have the same requirements for several URLs that we monitor with Heartbeat.

You will want to look at configuring the check.response.status option for the URL you need to monitor. This will tell Heartbeat what the expected HTTP status code returned by the endpoint should be when things are "good".

For example, a URL that is secured with a username and password will respond with an HTTP status code of 401 Unauthorized if correct credentials are not provided. 401 would be an expected response for your use case. Thus, using Heartbeat you can define an HTTP monitor that looks something like this:

- type: http
  schedule: '@every 30s'
  urls: ["http://testabc.com:8080/dcf"]
  check.response.status: 401

Using this example, if the URL returns the HTTP status code of 401 then Heartbeat will output the monitor.status of "UP" and all will be well with the world :slight_smile:

Definitely check the official docs for detailed info on this configuration option.
https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html

  • Joey D

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