Cluster monitoring stack for clusters based on Prometheus Operator
Go to file
2019-02-27 16:01:42 -03:00
grafana-dashboards Updated UPS dashboard 2019-02-27 16:01:42 -03:00
manifests Updated UPS dashboard 2019-02-27 16:01:42 -03:00
manifests-old
scripts
.gitignore
arm_exporter.jsonnet Fix arm-exporter port/ip allocation. Update dashboard 2019-02-27 13:18:13 -03:00
base_operator_stack.jsonnet Rearrange files and dependencies 2019-02-27 09:28:00 -03:00
elasticsearch_exporter.jsonnet Fix ES deployment 2019-02-27 09:32:17 -03:00
elasticsearch_rules.jsonnet Add ElasticSearch exporter 2019-02-27 09:26:09 -03:00
image_sources_versions.jsonnet Rearrange files and dependencies 2019-02-27 09:28:00 -03:00
jsonnetfile.json
jsonnetfile.lock.json
main.jsonnet Rearrange files and dependencies 2019-02-27 09:28:00 -03:00
Makefile
metallb.jsonnet Rearrange files and dependencies 2019-02-27 09:28:00 -03:00
Readme.md
smtp_server.jsonnet Rearrange files and dependencies 2019-02-27 09:28:00 -03:00
traefik.jsonnet Rearrange files and dependencies 2019-02-27 09:28:00 -03:00
ups_exporter.jsonnet

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