Monitor websites by performing GET call with an header

Hello,

I want to monitor some websites but sending an header in the command . I succes to test it using curl, but i prefer to use a nagios plugin instead .
My curl command is :

curl -v -H ‘x-api-key’:‘Phasd6e7sadasv5zkk2PN3eah9sada0’ https://vfzoylg6u3.execute-api.eu-west-1.amazonaws.com/prd/cyberfleet/api/v1/pairing/healthcheck/ok

Have anyone an idea if is available a nagios plugin for this ?

Cheers,
Petre

Hi,

you can use the check_http plugin of the Monitoring Plugins collection. The -k (or the long option --header) argument sets the header. For additonal details look into the check_http documentation.

The check_http is also available in the Icinga Template Library (ITL), have a look here. Use the custom variable http_header to set the needed header.

Cheers
Michael

1 Like