sensu-plugins / sensu-plugins-aws

This plugin provides native AWS instrumentation for monitoring and metrics collection, including: health and metrics for various AWS services, such as EC2, RDS, ELB, and more, as well as handlers for EC2, SES, and SNS.
http://sensu-plugins.io
MIT License
81 stars 143 forks source link

check-sqs-messages.rb only 1 AWS credential allowed to add to monitor sqs count why not multiple #379

Open akashkant-tech opened 4 years ago

akashkant-tech commented 4 years ago

Hi, I've found a issue in plugin, In /opt/sensu/.aws/credentials only 1 AWS region credentials can be added. Which limits the use of different region based different credentials for different sqs queues monitoring. Kindly add an option in check-sqs-messages.rb to select which credentials are needed to be selected from /opt/sensu/.aws/credentials for the desired check to work. Right now it takes only 1 credential entry i.e only 1 aws_access_key_id and aws_secret_access_key where we can't add other/different region monitoring

Please provide some help regarding that I'm using it monitoring all our micro services queue count. Thanks

akashkant-tech commented 4 years ago

@rwha @majormoses any insight will be grateful

rwha commented 4 years ago

Try adding /opt/sensu/.aws/config with profiles defined for each region, e.g.:

[profile one]
region = us-west-1

[profile two]
region = us-west-2

And define the credentials in the credentials file with for each profile (instead of [default] you would need sections for each of the profiles, like [one]).

Then define the command as AWS_PROFILE=one check-sqs-message.rb ...

I don't think these plugins are being maintained anymore now that sensu-core is EOL.

akashkant-tech commented 4 years ago

@rwha I tried that, changed [default] profile in both` ~/.aws/config and ~/.aws/credential and it's working fine. Accepting queue's from multiple profile. Thanks a lot for your help! :)

majormoses commented 3 years ago

These plugins can be used with sensu-(ruby|core|go) and are still maintained as much as the community is able to. We welcome any contributions.