Hi

We would like to start a job within K8s. We start this job based on the value of a metric. The Prometheus server is outside of K8s.

Is this procedure correct? Using curl to query the HTTP API of Prometheus and then, based on output start a job or not?

Are there other possibilities?

Is the curl correct? Can it be called every 10 sec?

curl -s -u "$USER:$PASS" https://example.org/api/v1/query\?query\=cluster_location_azure | jq '.'
{
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
      {
        "metric": {
          "__name__": "cluster_location_azure",
 (...)
        },
        "value": [
          1631694616.135,
          "1"
        ]
      }
    ]
  }
}

kind regards
Evelyn

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/a25db19b-41e6-3f67-3daf-5a84733865fc%40disroot.org.

Attachment: OpenPGP_0x61776FA8E38403FB.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to