awslabs / collectd-cloudwatch

A collectd plugin for sending data to Amazon CloudWatch
MIT License
199 stars 131 forks source link

Could not send processes plugin data to cloudwatch #59

Closed kkomazakii closed 6 years ago

kkomazakii commented 6 years ago

Does collectd-cloudwatch plugin not suppurt processes plugin?

I want to monitor my application's process and set alert on cloudwatch. So I made processes plugin enable and edit conf like below, and confirmed collectd output rrd file under /var/lib/collectd/rrd/.

LoadPlugin processes
...
LoadPlugin rrdtool
...
<Plugin processes>
    ProcessMatch "myapp" "myapp"
</Plugin>
...
<Plugin rrdtool>
    DataDir "/var/lib/collectd/rrd"
    CreateFilesAsync false
    CacheTimeout 120
    CacheFlush   900
    WritesPerSecond 50
</Plugin>

On cloudwatch metrics, only default metrics were shown and processes data did not appear like this.

image

Fodoj commented 6 years ago

You need to whitelist process metrics in cloudwatch plugin config file. I can confirm that this plugin works with processes plugin, I did it just two weeks ago :)

Fodoj commented 6 years ago

Look for this folder on your server: https://github.com/awslabs/collectd-cloudwatch/tree/master/src/cloudwatch/config

blocked_metrics has a dynamic list of all available but not whitelisted metrics. Whitelist.conf has a list of metrics that actually will be sent to cloudwatch.

kkomazakii commented 6 years ago

@Fodoj Thank you for reply. I'll try it!

I have to add processes to whitelist while it is not listed on blocked_metrics?

Fodoj commented 6 years ago

It doesn’t matter if it’s in blocked metrics. As long as it’s whitelisted, it will go through.

kkomazakii commented 6 years ago

@Fodoj Thank you for kindness. I could monitor process count as I wanted!

taith-agiletech commented 2 years ago

@kkomazakii I'm sorry but, I'm stuck here too. How did you add to the whitelist?