Skip to content

Instantly share code, notes, and snippets.

@erangaeb
Last active November 20, 2022 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erangaeb/a19dfc92c8954e578497ea60b9514db9 to your computer and use it in GitHub Desktop.
Save erangaeb/a19dfc92c8954e578497ea60b9514db9 to your computer and use it in GitHub Desktop.
run blackbox exporter with helm chart
# add helm repository
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
# install blackbox exporter with values file
helm install black prometheus-community/prometheus-blackbox-exporter --values values-blackbox.yaml
# running pods
❯❯ kubectl get pods
NAME READY STATUS RESTARTS AGE
black-prometheus-blackbox-exporter-66d48cc898-d9n79 1/1 Running 0 90s
# runng services
❯❯ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
black-prometheus-blackbox-exporter ClusterIP 10.105.196.114 <none> 9115/TCP 71s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 46h
# blackbox exporter create configmap with the probe configurations
❯❯ kubectl get configmaps
NAME DATA AGE
black-prometheus-blackbox-exporter 1 101s
kube-root-ca.crt 1 46h
# descripe configmap for get the probe configurations
# by default blackbox exporter addes http prober module [http_2xx]
# additionaly it contains the tcp prober module we have created [tcp_prober]
❯❯ kubectl describe configmap black-prometheus-blackbox-exporter
Name: black-prometheus-blackbox-exporter
Namespace: default
Labels: app.kubernetes.io/instance=black
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=prometheus-blackbox-exporter
app.kubernetes.io/version=0.22.0
helm.sh/chart=prometheus-blackbox-exporter-7.1.3
Annotations: meta.helm.sh/release-name: black
meta.helm.sh/release-namespace: default
Data
====
blackbox.yaml:
----
modules:
http_2xx:
http:
follow_redirects: true
preferred_ip_protocol: ip4
valid_http_versions:
- HTTP/1.1
- HTTP/2.0
prober: http
timeout: 5s
tcp_prober:
prober: tcp
tcp:
ip_protocol_fallback: false
preferred_ip_protocol: ip4
BinaryData
====
Events: <none>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment