Pingsured vs. Blackbox Exporter: probes or a service
If you already run Prometheus, the Blackbox Exporter is the natural way to add outside-in checks to it. It is not an uptime monitor on its own, though, and the difference decides whether it suits you. This page sets the setup next to Pingsured, which is a hosted service: the biggest difference is who runs it.
What it is
- Open source. The exporter is released under the Apache License 2.0, in the Prometheus project's GitHub organization. Prometheus itself is a graduated project of the Cloud Native Computing Foundation.
- Probes. HTTP and HTTPS, DNS, TCP, ICMP and gRPC. The HTTP prober can require status codes and HTTP versions, match the body or headers against patterns, and set TLS options, all named in its configuration file.
- It answers when asked. A probe runs when Prometheus requests it, and the result is a set of metrics, among them probe_success, which says whether the probe worked.
What the setup consists of
The exporter sends no alerts. In a Prometheus setup the pieces are:
- the exporter, which runs the probes;
- Prometheus, which asks for them at the scrape interval (a minute by default), stores the results (for 15 days by default) and evaluates the alerting rules you write;
- Alertmanager, which receives the alerts and sends them on to email, webhooks, Slack, Microsoft Teams, PagerDuty, Discord, Telegram and others;
- something to look at the results with, which is another part of your setup.
Each has its own YAML configuration: modules for the exporter, scrape configuration for Prometheus, rule files, receivers for Alertmanager.
What you take on
- Three services, and the work of keeping them alive, with upgrades, backups and disk for the stored time series. A monitoring stack that stops is a stack that says nothing, so it deserves to be watched as well.
- The alert rules. What counts as down, for how long, and who is told is something you write rather than choose from a list.
- Care with what it may reach. Its README notes that the exporter makes requests to any target it is given, so it should not be reachable by people you would not trust to choose targets. It resolves the target's name on every probe, and ICMP probes need elevated privileges.
- One vantage point per exporter. Checking from several regions means an exporter in each, and a Prometheus that collects from them.
Where Pingsured differs
- Managed, one account instead of a stack. You add a URL and a threshold; the schedule, the storage, the alert path, the history and the operating of all of it are ours.
- Multiple locations, judged separately, without running anything in them.
- Outside your network, with alerts that leave from us and not from the monitored infrastructure.
- Certificates and content. TLS checks that warn before expiry and judge the server's configuration, and checks on what a JSON, XML or HTML answer contains.
Is Blackbox Exporter the better choice?
- You already run Prometheus. Probes then sit with the rest of your metrics, and you can write rules across all of them.
- Flexibility. If you can express it as a rule over metrics, you can alert on it.
- Inside your network, and for protocols Pingsured does not check.
- Cost and control. It is free, and you can read and change all of it.
Questions to ask yourself
- Who owns the stack, and who looks at it when the alert does not come?
- How long should results be kept, and what does that cost in disk?
- Do I need to see my site from more than one place?
- What watches the watcher?