英文:
What hostname should I use for sending custom metrics to datadog's agent, inside k8s?
问题
我有一个安装了Datadog的Helm的Kubernetes集群。
我想将自定义指标发送到Datadog的代理,但我不知道应该为dogstatsd客户端主机设置什么值。
这些代理实际上是一个守护程序集,所以我假设本地主机(localhost)会起作用,但事实并非如此。
另外,考虑到它使用UDP协议,很难知道请求是否未能传递,因此试错起来非常困难。
有什么建议吗?
英文:
I've got a k8s cluster where the datadog's helm is installed.
I want to send custom metrics to the datadog's agent, but I don't know what value to set for the dogstatsd client host.
These agents are actually a daemonset so I assumed localhost would work, but it doesn't.
Also, given the fact that it's UDP, it's very difficult to know if requests are failing to be delivered or not, so it's very difficult to trial and error it.
Any idea?
答案1
得分: 1
通常,使用DogStatsD或通过自定义代理检查发送的任何指标都是自定义指标。
有多种方法可以将指标发送到Datadog:
将自定义应用程序指标发送到Datadog的最简单方法是将它们发送到DogStatsD,这是Datadog代理捆绑的指标聚合服务。
将主机和端口设置为代理的主机名/IP和端口(如果不同于默认的127.0.0.1:8125)
statsd_host': '127.0.0.1
statsd_port': 8125
有关通过DogStatsD提交自定义指标的更多信息,请参阅此文档。
您还可以使用Datadog官方和社区贡献的API和DogStatsD客户端库之一来提交自定义指标。
注意:自定义指标提交没有强制的固定速率限制。如果超过了您的默认分配量,将按照Datadog的计费政策计费自定义指标。
英文:
Generally any metric you send using DogStatsD or through a custom Agent Check is a custom metric.
There are multiple ways to send metrics to Datadog:
The easiest way to get your custom application metrics into Datadog is to send them to DogStatsD, a metrics aggregation service bundled with the Datadog Agent.
Set host and port to hostname/IP and port of the agent (if different from the default 127.0.0.1:8125)
statsd_host':'127.0.0.1
statsd_port':8125
Refer to this doc for more information about custom Metric Submission through DogStatsD
You can also use one of the Datadog official and community contributed API and DogStatsD client libraries to submit your custom metrics
Note: There are no enforced fixed rate limits on custom metric submission. If your default allotment is exceeded, you are billed according to Datadog’s billing policy for custom metrics.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论