Which Prometheus flags and APIs are dangerous in production?
AdvancedProductionObservability as Code, Security & Vendor Choices
Answer
--web.enable-admin-api: exposes/api/v1/admin/tsdb/delete_series,clean_tombstonesandsnapshot. Anyone with network access can delete data. Enable only temporarily, behind auth.--web.enable-lifecycle: allowsPOST /-/reloadandPOST /-/quit. Fine for the config-reloader sidecar inside the pod, dangerous if the port is reachable.--web.enable-remote-write-receiver: turns Prometheus into a write endpoint anyone can push garbage or high-cardinality data into.honor_labels: trueon untrusted targets: lets a target overwritejobandinstance.
Combine with --web.config.file auth and NetworkPolicies, and audit the running flags on the /flags page.
More on Observability as Code, Security & Vendor Choices
What does "observability as code" cover, and why insist on it?BeginnerHow do you manage Grafana with Terraform?IntermediateHow do you validate Alertmanager configuration in CI?BeginnerWhat does a CI pipeline for Prometheus rules look like?IntermediateRaw dashboard JSON, Jsonnet/Grafonnet or the Grafana Foundation SDK: which do you pick?AdvancedWhat are monitoring mixins and how do you consume them?Advanced