{"slug":"code-halowerk-com-v1-promtool-rules-c93a61","title":"Check Prometheus alerting and recording rules with the real promtool 3.15.1, run","host":"code.halowerk.com","method":"POST","resource":"https://code.halowerk.com/v1/promtool-rules","category":"code","description":"Check Prometheus alerting and recording rules with the real promtool 3.15.1, run rule unit tests, and report convention gaps. Runs \"promtool check rules --lint=all\" on your rule file (syntax, PromQL parsing, template rendering, duplicate rules) and, if you send unit tests in promtool format, \"promto","price_listed":0.005,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"rules":"groups:\n  - name: api\n    rules:\n      - alert: HighErrorRate\n        expr: sum(rate(http_requests_total{status=~\"5..\"}[5m])) / sum(rate(http_requests_total[5m])) > 0.05\n        for: 10m\n        labels: { severity: page }\n        annotations: { summary: High error rate }\n"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"rules":{"description":"Prometheus rule file (YAML with groups).","maxLength":1000000,"minLength":10,"type":"string"},"tests":{"description":"Optional promtool unit test file; its rule_files entry is replaced by the submitted rules.","maxLength":1000000,"type":"string"}},"required":["rules"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Check Prometheus alerting and recording rules with the real promtool 3.15.1, run rule unit tests, and report convention gaps. Runs \"promtool check rules --lint=all\" on your rule file (syntax, PromQL parsing, template rendering, duplicate rules) and, if you send unit tests in promtool format, \"promtool test rules\" against it. Results are reported per message.","last_updated":"2026-11-20T13:27:06.728Z","schemes":["exact"]}