Forum Discussion

kgaigl's avatar
Icon for Cirrocumulus rankCirrocumulus
Jan 20, 2021

HTTPS Monitor: JSON File behind login page


we've already a https monitor that reads the contents of a json file, it looks like this:

send string: GET /intern/api/v1/health/portal-status HTTP/1.1\r\nHost:\r\n\r\n
receive strimg: \"portalStatus\":\"AVAILABLE\"

this works fine.

but now I need a similar monitor, but the json file is passwort protectet, when I add username/password to the monitor, it doesn't work.

when I do a curl:

curl -sku monitor:<pw> -H "Content-Type: application/json" -X GET

I get the logon-page for the username/pw

I tried some other parameter for curl, but I don't get the content of the json-file.

Any ideas?

thanks in advance

14 Replies