I want to monitor API login endpoint /api/v1/login
. When I login using postman I get following response
{"id":"###-###-###-###-###","access_token":"****","refresh_token":"****"}
I tried following in heartbeat.yaml
reference from here
- name: api-dev
tags: ["api"]
type: http
enabled: true
urls: ["http://nginx.dev.svc.cluster.local/api/v1/login"]
username: 'login.monitor@example.com'
password: '<password>'
schedule: '@every 60s'
check.request:
method: POST
check.response:
status: 200
json:
- description: login status
condition:
equals:
status: ok
but got following in kibana UI
Error
received status code 400 expecting [200]
Response Body
Body size is 67B.
{"error":"Bad Authorization header. Expected value 'Bearer <JWT>'"}
What i am missing here ?