Patch through POSTRES_PASSWORD and export the number of failed repos
parent
b809b8b983
commit
876b454916
|
@ -84,6 +84,8 @@ services:
|
||||||
|
|
||||||
query-exporter:
|
query-exporter:
|
||||||
image: adonato/query-exporter:latest
|
image: adonato/query-exporter:latest
|
||||||
|
environment:
|
||||||
|
POSTGRES_URL: "postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/bluesky?sslmode=disable"
|
||||||
volumes:
|
volumes:
|
||||||
- "./metrics/prometheus/exporters/query-exporter/config.yaml:/config.yaml"
|
- "./metrics/prometheus/exporters/query-exporter/config.yaml:/config.yaml"
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
|
@ -91,4 +93,4 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:9560:9560"
|
- "0.0.0.0:9560:9560"
|
||||||
links:
|
links:
|
||||||
- postgres
|
- postgres:postgres
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
databases:
|
databases:
|
||||||
db1:
|
db1:
|
||||||
dsn: postgres://postgres:postgres@host.docker.internal:15432/bluesky?sslmode=disable
|
dsn: env:POSTGRES_URL
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
repos_fully_indexed:
|
repos_fully_indexed:
|
||||||
|
@ -9,15 +9,23 @@ metrics:
|
||||||
repos_seen:
|
repos_seen:
|
||||||
type: gauge
|
type: gauge
|
||||||
description: Repositories seen
|
description: Repositories seen
|
||||||
|
repos_failed:
|
||||||
|
type: gauge
|
||||||
|
description: Repositories that we failed to index
|
||||||
|
|
||||||
queries:
|
queries:
|
||||||
query1:
|
query1:
|
||||||
interval: 30
|
interval: 30
|
||||||
databases: [db1]
|
databases: [db1]
|
||||||
metrics: [repos_fully_indexed]
|
metrics: [repos_fully_indexed]
|
||||||
sql: select count(*) as repos_fully_indexed from repos where last_indexed_rev <> '' and (last_indexed_rev >= first_rev_since_reset or first_rev_since_reset is null or first_rev_since_reset = '');
|
sql: select count(*) as repos_fully_indexed from repos where failed_attempts < 3 and last_indexed_rev <> '' and (last_indexed_rev >= first_rev_since_reset or first_rev_since_reset is null or first_rev_since_reset = '');
|
||||||
query2:
|
query2:
|
||||||
interval: 30
|
interval: 30
|
||||||
databases: [db1]
|
databases: [db1]
|
||||||
metrics: [repos_seen]
|
metrics: [repos_seen]
|
||||||
sql: select count(*) as repos_seen from repos;
|
sql: select count(*) as repos_seen from repos;
|
||||||
|
query3:
|
||||||
|
interval: 30
|
||||||
|
databases: [db1]
|
||||||
|
metrics: [repos_failed]
|
||||||
|
sql: select count(*) as repos_failed from repos where failed_attempts >= 3;
|
||||||
|
|
Loading…
Reference in New Issue