{"repo":"FUSAKLA/promruval","free":true,"listed":false,"github":"https://github.com/FUSAKLA/promruval","clone":"git clone https://github.com/FUSAKLA/promruval.git","description":"Validate Prometheus/Thanos/Mimir/Loki rules metadata and expression properties to match requirements and constrains of your setup.","language":"Go","stars":167,"topics":["prometheus","rules","validation","ci","testing","alerting","prometheus-rules-metadata","promruval","promtool","prometheus-rules"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"Promtool allows users to verify syntactic correctness and test PromQL expressions. Promruval aims to validate the rules' metadata and expression properties to match requirements and constraints of the particular Prometheus cluster setup. User defines his validation rules in a simple yaml configuration and passes them to the promruval which validates specified files with Prometheus rules same way promtool does. Usually it would be used in the CI pipeline. You can read a blog post about the motivation and usage here or watch a lightning talk about it from PromCon . Example use-cases - Make sure the playbook, linked by an alert, is a valid URL and really exists. - Ensure the range selectors in the expr are not lower than three times your Prometheus scrape interval. - Avoid querying more data than is retention of used Prometheus by inspecting if the expr does not use older data than specified. - Make sure expr does not use any of the specified labels. Useful when using Thanos, to forbid usage of external labels when alerting on Prometheus to avoid confusion. - Ensure alerts has the required labels expected by routing in Alertmanager possibly with allowed values. - Make sure Alerts has the expected annotations for rendering the alert template. - Forbid usage of some labels or annotations if it got deprecated. - and many more... As a good starting point you can use the docs/default validation.yaml which contains some basic validations that are useful for most of the users. Validati","default_branch":null,"files":null,"tree":[],"storefront":"/r/FUSAKLA","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/FUSAKLA/promruval/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}