Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help using handler-sns.rb #250

Closed
ulutomaz opened this issue Oct 19, 2017 · 7 comments
Closed

Help using handler-sns.rb #250

ulutomaz opened this issue Oct 19, 2017 · 7 comments

Comments

@ulutomaz
Copy link

Hi,

would it be possible to get an example with SNS, how to configure it, to be able to send SMS when alerts occur?

Best,
Tomaz

@majormoses
Copy link
Member

based on discussion is slack I believe this is likely your problem:

This I think is a duplicate of #240 which is being worked on but will leave it open so that when it is fixed you can validate if your issue is solved following the documentation.

@eheydrick
Copy link
Collaborator

I'm going to expand the docs for handlers when I update them to AWS-SDK v2. Would love to get your feedback on that @ulutomaz.

@eheydrick
Copy link
Collaborator

The handlers have been updated to AWS-SDK v2 in 10.0.0. I also added more docs for handler-sns to the README. There's a few more checks to update before we can remove the v1 dep (see #240) but it's close.

@ulutomaz
Copy link
Author

I've reconfigured this, but still haven't successfully sent a message. I noticed you're mentioning 2 way of configuring AWS authentication. Can I still put credentials in /etc/sensu/conf.d/sns.json?

Can I use this handler for both? Server side checks and standalone too?

In logs I can't see any relevant info...

Any suggestion?

@majormoses
Copy link
Member

majormoses commented Oct 25, 2017

There are technically 3 ways to support aws authentication now and only use native methods that aws cli/sdk use. There is documentation for the two recommended solutions:

  • IAM role (prefered for all things except local dev)
  • Use AWS config

The last option which we do not have any documentation for is ENV vars which are a viable option but are too often misused so we do not encourage people to go this route unless they really understand what they are doing and the consequences.

We have documentation here on authentication.

@eheydrick
Copy link
Collaborator

Yes you can use this handler for either check type. Can you post the handler or handlers part of your check definition. You should see something in the server log when the handler is invoked...

{"timestamp":"2017-10-24T06:21:02.802153+0000","level":"info","message":"handler output","handler":{"type":"pipe","command":"handler-sns.rb","name":"sns"},"output":[]}

@majormoses majormoses changed the title handler-sns.rb Help using handler-sns.rb Nov 4, 2017
@majormoses
Copy link
Member

Given the lack of response I am gonna close this out. If you still need help please feel free to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants