Skip to content

Monitoring K8s

dejanualex edited this page Apr 21, 2022 · 2 revisions

Monitoring in K8s using Prometheus

  • This CRD is a part of Prometheus (in bundle-monitoring) - It is only possible to apply a ServiceMonitor if this CRD Prometheus Operator has been deployed in Kubernetes cluster
# check if prometheus operator is deployed

kubectl get crd -A | grep servicemonitors
kubectl get customresourcedefinitions.apiextensions.k8s.io servicemonitors.monitoring.coreos.com
  • ServiceMonitor and PodMonitor can be created in any namespace, as long as the Prometheus Operator has permissions to find it
  • A PodMonitoring CR scrapes targets only in the namespace the CR is deployed in.
  • To scrape targets in multiple namespaces, deploy the same PodMonitoring CR in each namespace
kubectl get podmonitoring -A
kubectl get servicemonitor -A

Monitoring RabbitMQ

  • General stuff. What RabbitMQ metrics are available ?

    • Node metrics
    • Queue metrics
    • Cluster-wide metrics
  • To enable monitoring

RabbitMQ management plugin provides an HTTP-based API for the management and monitoring of RabbitMQ nodes and clusters

# Node restart is not required after plugin activation
rabbitmq-plugins enable rabbitmq_management
Clone this wiki locally