Cluster monitoring stack for clusters based on Prometheus Operator
Go to file
2019-02-15 10:22:45 -02:00
grafana-dashboards Update Grafana dashboard 2019-02-05 11:58:22 -02:00
manifests Cleanup after merging addon-resizer PR to upstream. Update libs 2019-02-15 10:22:45 -02:00
manifests-old New prometheus-operator structure using jsonnet build 2018-12-12 15:18:00 -02:00
.gitignore Added anti-affinity to Prometheus and alertmanager 2019-02-04 18:07:37 -02:00
arm_exporter.jsonnet Tag arm_exporter to arm64 only nodes 2019-02-05 16:54:41 -02:00
build_images.sh Fix image building script 2019-02-04 17:22:30 -02:00
build.sh New prometheus-operator structure using jsonnet build 2018-12-12 15:18:00 -02:00
create_gmail_auth.sh Add SMTP relay for Gmail 2019-02-04 17:24:49 -02:00
generate_ingress_auth.sh Added new config to the config generator. Import Grafana dashboards 2019-02-04 18:02:26 -02:00
image_sources_versions.jsonnet Update libs 2019-02-04 17:23:51 -02:00
jsonnetfile.json New prometheus-operator structure using jsonnet build 2018-12-12 15:18:00 -02:00
jsonnetfile.lock.json Cleanup after merging addon-resizer PR to upstream. Update libs 2019-02-15 10:22:45 -02:00
main.jsonnet Import all jsonnet files 2019-02-04 18:02:42 -02:00
Makefile New prometheus-operator structure using jsonnet build 2018-12-12 15:18:00 -02:00
metallb.jsonnet Added MetalLB ServiceMonitor 2019-02-04 18:01:11 -02:00
operator_stack.jsonnet Cleanup after merging addon-resizer PR to upstream. Update libs 2019-02-15 10:22:45 -02:00
Readme.md Updated README 2019-02-05 17:41:01 -02:00
smtp_server.jsonnet Add SMTP relay for Gmail 2019-02-04 17:24:49 -02:00
traefik.jsonnet Fix Traefik monitor 2019-02-04 17:25:28 -02:00

Prometheus Operator for ARM / X86-64 platforms

The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.

This have been tested on a hybrid ARM64 / X84-64 Kubernetes cluster deployed as this article.

This repository collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.

The content of this project is written in jsonnet and is an extension of the fantastic kube-prometheus project.

Components included in this package:

  • The Prometheus Operator
  • Highly available Prometheus
  • Highly available Alertmanager
  • Prometheus node-exporter
  • ARM_exporter to generate temperature metrics
  • MetalLB metrics
  • Traefik metrics
  • kube-state-metrics
  • Grafana

Quickstart

The repository already provides a set of compiled manifests to be applied into the cluster. The deployment can be customized thru the jsonnet files.

To simply deploy the stack, run:

$ kubectl apply -f manifests/

# It can take a few seconds for the above 'create manifests' command to fully create the following resources, so verify the resources are ready before proceeding.
$ until kubectl get customresourcedefinitions servicemonitors.monitoring.coreos.com ; do date; sleep 1; echo ""; done
$ until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done

$ kubectl apply -f manifests/ # This command sometimes may need to be done twice (to workaround a race condition).

Customizing

The content of this project consists of a set of jsonnet files making up a library to be consumed.

Pre-reqs

The project requires json-bundler and the jsonnet compiler. The Makefile does the heavy-lifting of installing:

git clone https://github.com/carlosedp/prometheus-operator-ARM
cd prometheus-operator-ARM
make vendor
# Change the jsonnet files...
make

After this, a new customized set of manifests is built into the manifests dir. To apply to your cluster, run:

make deploy

To uninstall, run:

make teardown

Images

This project depends on the following images:

Alertmanager Blackbox_exporter Node_exporter Snmp_exporter Prometheus

ARM_exporter

Prometheus-operator

Prometheus-adapter

Grafana

Kube-state-metrics

Addon-resizer

Obs. This image is a clone of ARM64 and ARM with a manifest. It's cloned and generated by the build_images.sh script

configmap_reload

prometheus-config-reloader

SMTP-server

Source: https://github.com/carlosedp/docker-smtp Autobuild: https://travis-ci.org/carlosedp/docker-smtp Images: https://hub.docker.com/r/carlosedp/docker-smtp

Kube-rbac-proxy

Source: https://github.com/brancz/kube-rbac-proxy Autobuild: No autobuild yet. Use provided build_images.sh script. Images: https://hub.docker.com/r/carlosedp/kube-rbac-proxy