安装DataDog AWS定价集成时,要监视Amazonec2服务的费率代码是什么?
我在US-EAST-1区域创建了一个测试AWS EC2实例(Amazon-Linux),并在其中安装了DataDog代理,并安装了AWS定价集成,以获取定价指标,如此文档发生以下错误。
datadog's aws_pricing 集成是报告:•实例#AWS_PRICING:D884B5186B651429 [error] [error]:[{message“ message”:“没有定义现有AWS服务的费率代码,请定义,请修复Conf.yaml proceckback”,“ praceback”,“”:“”:“”:“”:“”:“”:“”:“”:“”:“”:“”:“”:“”:“”: Trackback(最近的最新通话):\ n文件\ \“/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/base/checks/base.py \”,第1120行,在运行\ n self.check(实例)\ n file \ \“/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/aws_pricing/aws_pricing/aws_pricing.py \”,第29行,在检查\ n checkexception(message)\ ndatadag_checks.base.base.errors中。 Checkexception:未定义现有AWS服务的费率代码,请修复conf.yaml \ n“}]•实例#aws_pricing:698d047c39b859c1 [error] [error]:[{“ message”:“没有定义现有AWS服务的费率代码,请修复Conf.yaml”,“ Trackback”,“ Trackback”:“ Trackback”:最近的电话):\ n文件\ \“/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/base/checks/base.py \”,第1120行,在运行\ n self.check(实例)\ n file \ \“/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/aws_pricing/aws_pricing/aws_pricing.py \”,第29行,在检查\ n checkexception(message)\ ndatadag_checks.base.base.errors中。 Checkexception:未定义现有AWS服务的费率代码,请修复conf.yaml \ n“}]
似乎我必须编辑位于(/etc/datadog-agent/conf.d/aws_pricing.d/conf.yaml)datadog配置中的以下conf文件。 EC2服务器。
`
init_config:
instances:
-
## @param region_name - string - optional - default: us-east-1
## AWS region to run PricingService requests in.
## As of writing, only us-east-1 and ap-south-1 are supported.
## See https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/using-pelong.html
#
# - region_name: us-east-1
## Below is an example of how you would configure monitoring for AmazonEC2 pricing.
## This same format can be used for any other AWS service.
## @param AmazonEC2 - list - optional
## Rate codes to monitor for AmazonEC2 service.
#
# - AmazonEC2:
# - <RATE_CODE_1>
# - <RATE_CODE_2>
# - <RATE_CODE_3>
`
您可以找到此示例代码。
我想找出此文件中Amazonec2下的特定rate_codes。 (对于rate_code_1,rate_code_2,rate_code_3等)。通过安装此操作,我希望获得AWS.pricing.amazonec2 Metric,以显示Amazon EC2每单位的成本。我正在为此创建一个Datadog仪表板。
datadog support has shared these example resources to refer,
- explanation around what rate_code is
- 示例的速率代码示例
查找以下代码段,
`
"rateCode": {
"rateCode":"The rate code of the price",
"description":"The description of the term",
"unit":"The usage measurement unit for the price",
"startingRange":"The start range for the term",
"endingRange":"The end range for the term",
"pricePerUnit": {
"currencyCode":"currencyRate",
}
`
如果您发现解决方案,如果可以与我共享已配置的conf.yaml代码,那就太好了。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须按照说明根据您使用的EC2实例自己获取费率代码。没有其他人能为您提供此服务;这取决于实例大小,区域,保留/按需等。 -pelong.html“ rel =“ nofollow noreferrer”>价格列表api api api 的API文档,尤其是考虑使用SDK您正在使用的语言。
You have to follow the instructions to get the rate codes yourself based on what kind of EC2 instances you are using. Nobody else will be able to provide this for you; it depends on things like instance size, region, reserved/on-demand, etc. You might also want to look at the API documentation for the price list API, and especially consider using the SDK for whatever language you are working in.