我是新手收集和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.

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.
发布评论
评论(1)
如果您使用的是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