Search in docs

Results ..

No results for ''
Search by Algolia

Kubernetes Metrics

Bleemeo agent support discovering services running on Kubernetes. It will monitor all known services and gather Docker metrics.

But to achieve this, it require access to Kubernetes API. The easiest is to run Bleemeo agent in the Kubernetes cluster using DaemonSet. You should use the deployment yaml provided, you only need to change GLOUTON_BLEEMEO_ACCOUNT_ID, GLOUTON_BLEEMEO_REGISTRATION_KEY and GLOUTON_KUBERNETES_CLUSTERNAME.

The following use envsubst (should be available on all Linux) to automatically replace the values:

$ export GLOUTON_BLEEMEO_ACCOUNT_ID=<YOUR-ACCOUNT-ID>
$ export GLOUTON_BLEEMEO_REGISTRATION_KEY=<YOUR-REGISTRATION-KEY>
$ export GLOUTON_KUBERNETES_CLUSTERNAME="my_k8s_cluster_name"
$ curl -s https://packages.bleemeo.com/bleemeo-agent/kubernetes/k8s.yaml | envsubst | kubectl apply -f -

This will start one Bleemeo agent on every node of your Kubernetes cluster.

In addition to metrics from known services, Glouton will monitor:

  • kubernetes_ca_day_left: Time left before Kubernetes CA expiry in days
  • kubernetes_certificate_day_left: Time left before Kubernetes certificate expiry in days
  • kubernetes_api_status: Status of Kubernetes API server running on same node as the Glouton
  • kubernetes_kubelet_status: Status of the Kubelet running on the same node as the Glouton. This status is based on what Kubernetes API known of the Kubelet node, it cover low resources available (disk, memory and processes) and unready node.

Finally all Bleemeo agent on a same cluster will toghether monitor the status of the Kubernetes API, and report an error if the majority fail to contact the Kubernetes API. This status will be visible in the Status Dashboard and will use the cluster name your provided (GLOUTON_KUBERNETES_CLUSTERNAME used during installation).

Custom Configuration

If you need to some custom configuration to your Bleemeo agent, you will need to change the Kubernetes config map "glouton-config". We recommend to not change directly the sample k8s.yaml, to allow to easier update. Instead we recommend to:

  • Create another YAML file that only define the config map "glouton-config"
  • Apply both the sample k8s.yaml AND your custom file for each update

For example, create a custom file "glouton-custom.yaml" to allow some custom metrics (see Filtering page for details):

$ cat > glouton-custom.yaml << EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: glouton-config
data:
99-local.conf: |
#Β Add Glouton customization here
metric:
allow_metrics:
- "django_http_responses_total_by_status_total"
- "django_http_requests_latency_seconds_by_view_method_sum"
- "django_http_requests_latency_seconds_by_view_method_count"
EOF

Then to apply your change or upgrade the Bleemeo agent version:

$ export GLOUTON_BLEEMEO_ACCOUNT_ID=<YOUR-ACCOUNT-ID>
$ export GLOUTON_BLEEMEO_REGISTRATION_KEY=<YOUR-REGISTRATION-KEY>
$ export GLOUTON_KUBERNETES_CLUSTERNAME="my_k8s_cluster_name"
$ curl -s https://packages.bleemeo.com/bleemeo-agent/kubernetes/k8s.yaml | envsubst | kubectl apply -f -,./glouton-custom.yaml