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:
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).
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:
For example, create a custom file "glouton-custom.yaml" to allow some custom metrics (see Filtering page for details):
$ cat > glouton-custom.yaml << EOFapiVersion: v1kind: ConfigMapmetadata:name: glouton-configdata:99-local.conf: |#Β Add Glouton customization heremetric: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