Created
June 24, 2019 20:14
-
-
Save chaudum/68ca13ad090706c08f29c7fff1c49126 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
scrape_timeout_offset: 250ms | |
min_interval: 0s | |
max_connections: 3 | |
max_idle_connections: 3 | |
target: | |
data_source_name: "postgres://crate@localhost:5432/sys?sslmode=disable" | |
collectors: [health_collector] | |
collectors: | |
- collector_name: health_collector | |
metrics: | |
- metric_name: cluster_underreplicated_shards | |
type: gauge | |
help: "Underreplicated shards by table" | |
key_labels: | |
- health | |
- severity | |
- table | |
- schema | |
values: | |
- shards | |
query: | | |
SELECT lower(health) AS "health", | |
severity, | |
lower(table_name) AS "table", | |
lower(table_schema) AS "schema", | |
sum(underreplicated_shards) as "shards" | |
FROM sys.health | |
GROUP BY 1, 2, 3, 4 | |
- metric_name: cluster_missing_shards | |
type: gauge | |
help: "Missing shards by table" | |
key_labels: | |
- health | |
- severity | |
- table | |
- schema | |
values: | |
- shards | |
query: | | |
SELECT lower(health) AS "health", | |
severity, | |
lower(table_name) AS "table", | |
lower(table_schema) AS "schema", | |
sum(missing_shards) as "shards" | |
FROM sys.health | |
GROUP BY 1, 2, 3, 4 | |
- metric_name: cluster_health | |
type: gauge | |
help: "CrateDB cluster health" | |
key_labels: | |
- name | |
values: | |
- severity | |
query: | | |
SELECT sys_cluster.name as "name", | |
max(sys_health.severity) as "severity" | |
FROM sys.health sys_health, sys.cluster sys_cluster | |
GROUP BY 1 |
Author
chaudum
commented
Jun 24, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment