Cluster monitoring stack for clusters based on Prometheus Operator
Go to file
2019-05-03 14:00:05 -03:00
grafana-dashboards Update fluentd dashboard 2019-03-06 18:16:24 -03:00
manifests Change domain to generic nip.io. Use http Kubelet port 2019-05-03 14:00:05 -03:00
scripts Improve build scripts. Rebuild manifests due to escaping error on ~ 2019-03-13 19:27:20 -03:00
.gitignore
arm_exporter.jsonnet Fix issue #11. Arm-exporter didn't have a ServiceAccount and TLS params 2019-04-23 12:03:34 -03:00
base_operator_stack.jsonnet Separate variables into new file. Add persistence options 2019-04-08 16:41:23 -03:00
elasticsearch_exporter.jsonnet Fix for the unused namespaces in case of disabling additional addons 2019-03-25 18:01:00 -03:00
image_sources_versions.jsonnet Formatted files with jsonnet_fmt 2019-03-13 18:44:01 -03:00
jsonnetfile.json Change references to kube-prometheus library. Update libs and regenerate manifests 2019-04-22 15:17:53 -03:00
jsonnetfile.lock.json Update libs. Remove arm-exporter from default manifest generation 2019-05-03 13:57:03 -03:00
main.jsonnet Change domain to generic nip.io. Use http Kubelet port 2019-05-03 14:00:05 -03:00
Makefile Update libs. Re-add Kube-state-metrics override due to reverted threshold parameter on lib 2019-03-25 20:08:54 -03:00
metallb.jsonnet Fix for the unused namespaces in case of disabling additional addons 2019-03-25 18:01:00 -03:00
Readme.md Fix issue #11. Arm-exporter didn't have a ServiceAccount and TLS params 2019-04-23 12:03:34 -03:00
smtp_server.jsonnet Add default images to modules 2019-03-22 15:23:23 -03:00
traefik.jsonnet Formatted files with jsonnet_fmt 2019-03-13 18:44:01 -03:00
ups_exporter.jsonnet Formatted files with jsonnet_fmt 2019-03-13 18:44:01 -03:00
vars.jsonnet Change domain to generic nip.io. Use http Kubelet port 2019-05-03 14:00:05 -03:00

Cluster Monitoring stack 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
  • kube-state-metrics
  • CoreDNS
  • Grafana
  • SMTP relay to Gmail for Grafana notifications

There are additional modules (disabled by default) to monitor other components of the infra-structure. These can be disabled on vars.jsonnet file by setting the module in installModules to false.

The additional modules are:

  • ARM_exporter to generate temperature metrics
  • MetalLB metrics
  • Traefik metrics
  • ElasticSearch metrics
  • APC UPS metrics

There are also options to set the ingress domain suffix and enable persistence for Grafana and Prometheus.

After changing these parameters, rebuild the manifests with make.

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:

$ make deploy

# Or manually:

$ 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 them. You need Go already installed:

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