How to monitor a curl call with cert and key

  • 23 January 2020
  • 1 reply
  • 4 views

I'm trying to monitor a curl call with cert and keys

The call would be something like this:

curl --key myKey.key --cert myCert.crt myurl.com

Regular internal web check gives me the option of adding username and password but I don't see a way to add key and cert.

Would appreciate any help! 

 


1 reply

Looking at the innards of the service-detector.jar, which is where I think the canonical LMRequest class is defined, you won't be able to do this with an internal web check (scripted or out-of-box) as documented

You would be able to do this with a scripted Datasource though--something similar to this: https://stackoverflow.com/questions/21223084/how-do-i-use-an-ssl-client-certificate-with-apache-httpclient. The libraries listed in the SO thread solution (except for junit, which isn't necessary) are available to the current GA collector. 

I have not attempted to use the apache httpclient libraries in a scripted internal web check... yet. So if you feel adventurous ?...

Reply