Importing Data into Grafana for Alerting From GraphQL Endpoints

Hello,

I have a requirement to setup alerts based on data that is coming in from GraphQL datasources at the moment. It appears that alerting can only be configured with Prometheus and Loki/Cortex datasources and I was wondering if someone could recommend the best way to consume data from GraphQL and relay it to prometheus.

To add more context to this question. We have a subscription with CloudFlare that provides access to time series data relating to their products from their GraphQL API. We’d like to monitor and alert on that data.

Hey, so it looks like your question is two fold. For non-CloudFlare endpoints, we do have a GraphQL plugin that will import metrics into Prometheus.

For the CloudFlare specific question, you can generate alerts via the plugin. However, they are in GraphQL which is not something we maintain. So, unfortunately, the best we can do is direct you to GraphQL’s documentation for how to craft the query. If you have an example query that’s not working, we may be able to offer some assistance but we can’t guarantee it.

https://graphql.org/learn/

AFAIK this is not importing metrics into prometheus. It is just an ephemeral datasource that is pulling data into panels. We are using it for all our panels but there is no option to integrate this with prometheus or alerting.

Hi Nadeem,

Are you referring to the CloudFlare datasource? Or the GraphQL plugin I linked to?

GraphQL Plugin. The CloudFlare datasource is no longer relevant. The APIs have changed significantly, it appears.