collectd正在报告“请求缺失身份验证令牌”。试图通过Custom Collectd插件将指标发布到AWS CloudWatch时

发布于 2025-01-27 21:18:59 字数 830 浏览 3 评论 0 原文

我是新手收集和AWS Cloud观看的新手。使用C ++创建自定义插件,并安装了Collectd和Collectd插件的rpms。

CustomD插件(.SO)位于/opt/collectd/plugin_libs 安装Collectd插件RPM之后。

以下是collectd.conf中与插件相关的摘要,

PluginDir "/opt/collectd/plugin_libs"
LoadPlugin "plugin"

<Plugin plugin>
    default_name_space "SS"
    max_posts_per_second 5
    max_queue_size 100000
    post_cw true
    write_log true
    log_filename "/tmp/cd_metrics.csv"
 </Plugin>

当Collectd试图将指标发布到AWS Cloud Watch时,我们会遇到错误“ 请求缺少身份验证令牌”。

我正在思考一些我们需要如何将收集指向AWS凭据的文件。我有凭据,但我不确定我需要放置这些凭据以及如何通知收集文件以将该文件用于AWS凭据。

我的理解正确吗?有人可以帮助我解决这个问题。

I am new to collectd and AWS cloud watching. Created custom plugin using C++ and installed rpms for collectd and collectd plugin.

enter image description here

customd plugin (.so) is located in /opt/collectd/plugin_libs after installing collectd plugin rpm.

Below is the snippet in collectd.conf related to the plugin

PluginDir "/opt/collectd/plugin_libs"
LoadPlugin "plugin"

<Plugin plugin>
    default_name_space "SS"
    max_posts_per_second 5
    max_queue_size 100000
    post_cw true
    write_log true
    log_filename "/tmp/cd_metrics.csv"
 </Plugin>

When collectd is trying to post the metrics to AWS cloud watch, we are getting the error "Request is missing Authentication Token".

I am thinking some how we need to point the collectd to look in to some file for AWS credentials. I have the credentials but I am not sure in which file I need to place those credentials and how to inform the collectd to use that file for aws credentials.

Is my understanding correct? Can some one please help me to fix this issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逐鹿 2025-02-03 21:18:59

如果您使用的是SDK,请在此处查看如何查找凭据: https://docs.aws.aws.amazon.com/sdk-for-cpp/v1/developer-guide/credentials.html

如果您不使用SDK,则使用API​​调用的实际代码更新问题。

另外,CloudWatch提供了一个集合插件。也许这可能对您有用: https://github.com/awslabs/awslabs/collectd-cloudwatch

If you're using the SDK then take a look here for how credentials are looked up: https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/credentials.html

If you're not using the SDK, then update the question with the actual code that does the API call.

Also, CloudWatch provides a collectd plugin. Maybe that could be of use to you: https://github.com/awslabs/collectd-cloudwatch

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文