diff --git a/data/hostname/prado.softwareheritage.org.yaml b/data/hostname/prado.softwareheritage.org.yaml index da1db854..d37272dc 100644 --- a/data/hostname/prado.softwareheritage.org.yaml +++ b/data/hostname/prado.softwareheritage.org.yaml @@ -1,6 +1,33 @@ dar::backup::exclude: - srv/softwareheritage/postgres - srv/softwareheritage/postgres-hdd icinga2::host::vars: load: high + +prometheus::sql::exporter::extra_config: + - name: "SoftwareHeritageScheduler" + interval: '1h' + connections: + - 'postgres://postgres@:5434/softwareheritage-scheduler?sslmode=disable' + queries: + - name: "swh_scheduler_oneshot" + help: "Software Heritage Scheduled Oneshot Tasks" + labels: + - "type_policy_status" + values: + - "count" + query: | + select type ||' '|| status as type_policy_status, count(*) as count + from task + where policy='oneshot' group by 1 order by 1 + - name: "swh_scheduler_recurring" + help: "Software Heritage Scheduled Recurring Tasks" + labels: + - "type_policy_status" + values: + - "count" + query: | + select type ||' '|| status as type_policy_status, count(*) as count + from task + where policy='recurring' group by 1 order by 1