How do I register custom metrics with the Google Container Engine for Stackdriver?

I am currently learning more and more of the Google Cloud Platform and trying to appreciate how I can change my default stack. I like the idea of ​​using all the built-in tools instead of accessing various Saas products. One of the most open-ended questions was the use of Stackdriver Monitoring. I understand that in-built monitoring uses Heapster with Google Cloud Sink. However, how can I show my own custom metrics for Stackdriver? I don't mean magazine-based metrics, but the real thing?

I know that I could always install the agent myself in the cluster, but it seems to me that it is already running as part of the Google Container Engine, so how can I click metrics on it?

+5
source share
3 answers

The fluend block pre-installed in GKE is located in the namespace of kube systems and is managed by k8s, so you should not bother with it. Currently it seems that only stdout is stdout / stderr for Stackdriver. But according to this post , the k8s team is working to provide an accessible node to the fluentd public port out of the box.

This document has information about setting up custom logging.

+1
source

To answer my own question, the best strategy at the moment seems to be using https://github.com/GoogleCloudPlatform/k8s-stackdriver/tree/master/prometheus-to-sd

0
source

I think GCP is already giving us related documents, see Using Custom Metrics

-1
source

Source: https://habr.com/ru/post/1266818/


All Articles