Cluster monitoring stack for clusters based on Prometheus Operator
Go to file
2019-02-27 09:26:54 -03:00
grafana-dashboards Add new dashboards for Elastic and UPS 2019-02-27 09:26:54 -03:00
manifests Update libs 2019-02-27 09:25:07 -03:00
manifests-old Merge branch 'new-operator' 2019-02-22 12:43:39 -03:00
scripts Move scripts to dir 2019-02-27 09:23:58 -03: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
elasticsearch_exporter.jsonnet Add ElasticSearch exporter 2019-02-27 09:26:09 -03:00
elasticsearch_rules.jsonnet Add ElasticSearch exporter 2019-02-27 09:26:09 -03:00
image_sources_versions.jsonnet Update SMTP image version 2019-02-15 10:33:59 -02:00
jsonnetfile.json New prometheus-operator structure using jsonnet build 2018-12-12 15:18:00 -02:00
jsonnetfile.lock.json Update libs 2019-02-27 09:25:07 -03:00
main.jsonnet Import all jsonnet files 2019-02-04 18:02:42 -02:00
Makefile Move scripts to dir 2019-02-27 09:23:58 -03: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 Readme fixes 2019-02-22 12:52:20 -03: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
ups_exporter.jsonnet Add APC UPS exporter 2019-02-27 09:25:44 -03: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.

To continue using my previous stack with manifests and previous versions of the operator and components, use the legacy repo tag from: https://github.com/carlosedp/prometheus-operator-ARM/tree/legacy.

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 (all supports ARM, ARM64 and AMD64 thru manifests):

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 AMD64, ARM64 and ARM with a manifest. It's cloned and generated by the build_images.sh script

configmap_reload

prometheus-config-reloader

SMTP-server

Kube-rbac-proxy