wawastein / zabbix-cloudwatch

Cloudwatch integration for Zabbix 3.x
GNU General Public License v3.0
33 stars 53 forks source link

Support for ECS? #4

Closed aviramartac closed 5 years ago

aviramartac commented 7 years ago

Hi,

Does this support discovery and monitoring of ECS instances? Is it possible to add this?

Thanks

wawastein commented 7 years ago

Hi @aviramartac, This supports anything that can be accessed through Boto3 library. However, I don't have access to AWS account with active ECS service, so I cannot write implementation right now. But I can help you with that if you like.

aviramartac commented 7 years ago

Hi @wawastein thanks for replying.

Just in general, how would you go about starting this? I have some knowledge in Python but not too in-depth

EDIT: I've been looking into boto3 ECS documentation and I can't really find what I want to monitor (CPU, memory usage of each docker). Maybe I'm missing something?

wawastein commented 7 years ago

I've written a rundown in my blog post: https://awawastuff.wordpress.com/2017/04/13/zabbix-and-cloudwatch-integration/ (see 'How to customize and debug modules')

In short: you need to create new python file for service discovery and populate it with code which will query AWS API and return list of items you want to monitor.

Let me know if I can help further.

wawastein commented 7 years ago

For exact metrics you need to review this: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-metrics.html It's not ECS API, it's Cloudwatch API, but ECS methods within that API. You can open Cloudwatch console and see which metrics you want to see in Zabbix.

aviramartac commented 7 years ago

Good stuff man, I'll start working on it and make a pull request when I'm done. Thanks