Difference between revisions of "Prometheus queries"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "``` probe_success < 1 probe_success{job="tcp"} ```")
 
Line 1: Line 1:
 +
# Queries
 +
 +
## up
 +
```
 +
up{job="<job-name>", instance="<instance-id>"}
 +
```
 +
1 if the instance is healthy, i.e. reachable, or 0 if the scrape failed.
 +
 +
## probe_success
 +
```
 +
up{job="<job-name>", instance="<instance-id>"}
 +
```
 +
1 if the instance is healthy, i.e. reachable, or 0 if the probe failed.
 +
 +
## Check for down
 +
```
 +
probe_success < 1
 +
up < 1
 +
```
 +
 +
## Check for sucess
 +
```
 +
up == 1
 +
```
 +
 +
# More
 +
 
```
 
```
 
probe_success < 1
 
probe_success < 1
 
probe_success{job="tcp"}
 
probe_success{job="tcp"}
 
```
 
```

Revision as of 00:22, 25 February 2024

Queries

up

up{job="<job-name>", instance="<instance-id>"}

1 if the instance is healthy, i.e. reachable, or 0 if the scrape failed.

probe_success

up{job="<job-name>", instance="<instance-id>"}

1 if the instance is healthy, i.e. reachable, or 0 if the probe failed.

Check for down

probe_success < 1
up < 1

Check for sucess

up == 1

More

probe_success < 1
probe_success{job="tcp"}