Displaying value from a CURL call on Dashboard

I am keeping track of certificate expiration dates and I’ like to display this information on the dashboard. The dates are obtained by making a couple of API calls which return the most current certificate expiration values. I would like to display these values on the dashboard so that the DevOps team has this value in front of them at all time and perhaps add some alerts to the dashboard as well to inform them that 1) It’s time to renew the certs or 2) the certs have expired.

Is there a way to pull this value from a CURL call in Grafana?

For example: expiry_date=$(curl https://certinfourl | jq '…)

Grafana would use the “expiry_date” value to display on the dashboard.

Is that possible?

might want to explore simple http plugin ? or ajax plugin

Or https://sriramajeyam.com/grafana-infinity-datasource/. Kind of depends on whether the returned payload needs parsing.

1 Like

I just added this data source to my Grafana stack. Using the test URL that the documentation recommends it works. So this is close to what I need. However, when I use my own internal API URL it fails. I can see the error being displayed (which is a 500) it really doesn’t provide more diagnostic data than that. Not sure if you’ve run into this before. But I do see other use cases for the data source. Thank you!