![]() Today I’m using Google Managed Prometheus, but at the time I stood up Prometheus using a Deployment, PersistentVolume and PersistentVolumeClaim. Standing up Prometheus on Kubernetes is pretty simple as well. dns verifies that the target DNS server returns the expected records. ![]() This allows me to verify the certificates presented by my mail server, and that the server is up and running, rather than just opening a TCP socket. ![]() imap_starttls and smtp_starttls both make IMAP and SMTP connections, respectively, over TLS. This does what you’d expect - checking the response of an HTTP request for a 2XX response code. For testing HTTP(s) targets I’ve defined an http_2xx module. The modules in the configuration above define what sort of blackbox testing the blackbox_exporter can perform. port: 9115 protocol: TCP targetPort: 9115 selector: mountPath: /etc/blackbox_exporter name: blackbox-exporter volumes:ĭefaultMode: 420 name: blackbox-exporter name: blackbox-exporter. image: prom/blackbox-exporter:v0.22.0 name: blackbox-exporter securit圜ontext: Name: blackbox-exporter namespace: prometheus data:ĪpiVersion: apps/v1 kind: Deployment metadata:Īpp: blackbox-exporter name: blackbox-exporter namespace: prometheus spec: To deploy blackbox_exporter on Kubernetes I used the following manifest: At the time I had no experience with Prometheus, and since everyone was talking about it at the time, I figured it was time to learn. However, I never quite got it working the way I wanted. I stumbled across Cloudprober and tried to get it working with Stackdriver. I wanted to check service health of TCP services (i.e. Also, the TCP checks are rather limited, simply confirming that a connection could be made. However, at the time, uptime checks did not check for SSL certificate expiration, something I considered important given I was using 90 day Let’s Encrypt certificates and wanted to ensure that certificate rotation was working as expected. Google Cloud Monitoring has support for uptime checks which can be used to perform blackbox monitoring of HTTP, HTTPS, and TCP services. Since I was already running some infrastructure on Google Cloud Platform, I first took a look at Stackdriver (now Google Cloud Monitoring). I surveyed the hosted service landscape but the available free options didn’t support the variety of services I needed to monitor and the paid services cost as much as a single VPS at ARP Networks. I had quite a few services to monitor, including multiple Web servers, a mail server, IRC server, and more. I had used Pingdom for this in the past, but they killed their free plan in 2019. A couple of years ago I was looking for a way to monitor the health of various services I had deployed across virtual machines and containers running on my home network. Unsure where to use whitebox and where to use blackbox monitoring? Contact us.Prior to migrating from Cacti to Prometheus for infrastructure monitoring, I’d already been using Prometheus for blackbox monitoring. This makes it easy to alert on soon to expire SSL certs. ![]() One nifty feature is that if a module ends up using TLS/SSL, the exporter will automatically expose when the cert chain will expire. The config in blackbox.yml can be expanded to add additional modules that cater to your needs. The blackbox exporter includes some useful modules out of the box, such as HTTP, TCP, POP3S, IRC and ICMP. While this example only checks the local machine, you could get a list of targets from any service discovery method - for example EC2 or Consul instead of just static_configs. You can now see the result of probe_success in the expression browser! ![]() # Actually talk to the blackbox exporter though # Ensure port is 22, pass as URL parameter Now let's get Prometheus to use this: wget If you visit :9115/probe?target=127.0.0.1:22&module=ssh_banner it'll test to see if SSH on the local machine is responding. As an example let's check for the SSH returning the banner.įirst we run the blackbox exporter: wget For this Prometheus offers the blackbox_exporter . Sometimes though you want to check how things look from the outside, which is to say blackbox monitoring. Prometheus is a whitebox monitoring system, ingesting metrics exposed from inside applications. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |