@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'
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
Definitely check the official docs for detailed info on this configuration option.