Comments (10)
from lambda-cloudwatch-slack.
Same here. What should we tune?
from lambda-cloudwatch-slack.
@henryzhang1984 Your event seems to be going through SNS, but what service is sending the event? I think there are currently some limitations that the processor has to be pre-defined: https://github.com/assertible/lambda-cloudwatch-slack/blob/master/config.js#L11
I'm happy to check this out if you can post your (scrubbed) event.
from lambda-cloudwatch-slack.
@rozhok What does your event look like?
IMO, we probably need a better way to have a default "catchall" type event.
from lambda-cloudwatch-slack.
Here we go:
{
"Records": [
{
"EventSource": "aws:sns",
"EventVersion": "1.0",
"EventSubscriptionArn": "arn:aws:sns:eu-west-1:111111111111111:samlpe-alert:ff1e3698-7f85-4da2-a90e-13ad2afe30e0",
"Sns": {
"Type": "Notification",
"MessageId": "0d7a65e4-435e-5ff1-8e80-37e6fba3ef4f",
"TopicArn": "arn:aws:sns:eu-west-1:111111111111111:Sample-alert",
"Subject": "ALARM: \"Sample Alert\" in EU - Ireland",
"Message": "{\"AlarmName\":\"Sample Alert\",\"AlarmDescription\":null,\"AWSAccountId\":\"111111111111111\",\"NewStateValue\":\"ALARM\",\"NewStateReason\":\"Threshold Crossed: 1 datapoint [1446.0 (07/08/17 18:46:00)] was greater than or equal to the threshold (1000.0).\",\"StateChangeTime\":\"2017-08-07T18:51:41.602+0000\",\"Region\":\"EU - Ireland\",\"OldStateValue\":\"OK\",\"Trigger\":{\"MetricName\":\"RequestCount\",\"Namespace\":\"AWS/ApplicationELB\",\"StatisticType\":\"Statistic\",\"Statistic\":\"SUM\",\"Unit\":null,\"Dimensions\":[{\"name\":\"LoadBalancer\",\"value\":\"app/app/6892f491c9b95d3f\"}],\"Period\":300,\"EvaluationPeriods\":1,\"ComparisonOperator\":\"GreaterThanOrEqualToThreshold\",\"Threshold\":1000.0,\"TreatMissingData\":\"\",\"EvaluateLowSampleCountPercentile\":\"\"}}",
"Timestamp": "2017-08-07T18:51:41.652Z",
"SignatureVersion": "1",
"Signature": "lol",
"SigningCertUrl": "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-b95095beb82e8f6a0463n12jnkndswea.pem",
"UnsubscribeUrl": "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:111111111111111:Sample-alert:ff1e3698-7f85-4da2-a90e-13ad2afe30e0",
"MessageAttributes": {}
}
}
]
}
from lambda-cloudwatch-slack.
We are working on this in #20
from lambda-cloudwatch-slack.
from lambda-cloudwatch-slack.
Thanks @henryzhang1984 - I see 2 issues here:
-
The
ECONNREFUSED
error. Do you have a correctUNENCRYPTED_HOOK_URL
value set in thedeploy.env
file when you deployed to lambda? That's only reason I can see that happening (becuase it did successfully matched aCloudWatch
event). -
In your original issue, you did post the
no matching processor found for event
. That one will be fixed in #20. (It also seems like you've corrected theEventSubscriptionArn
since then, so you should be getting past this).
Can you double check the webhook URL you have configured? Does that all look correct?
from lambda-cloudwatch-slack.
Hey all - we just released v0.2.1 that contains a 'catch-all' handler for events that don't have a matching processor. Now, SampleEvents and various things like should work.
@henryzhang1984 - I believe ECONNREFUSED
is an issue with not having a correct Slack Hook URL, so if you're still having issues with that please open another issue and I'll check it out!
from lambda-cloudwatch-slack.
@CodyReichert thanks! Will test it soon.
from lambda-cloudwatch-slack.
Related Issues (20)
- Bug: record.Sns.Message is not necessarily an object
- Notification not trigger on close message HOT 2
- npm run deploy fails HOT 3
- handle awslogs forwarded to CloudWatch
- Module initialisation Error
- AWS Warnings about Node Version HOT 2
- The runtime parameter of nodejs8.10 is no longer supported for creating or updating AWS Lambda functions. HOT 2
- npm run deploy error HOT 5
- User permissions HOT 2
- Invoke Error HOT 1
- how to send notification on a particular slack channel linked to a webhookurl url HOT 1
- CodeDeploy alerts are missing information in Slack
- What permissions does the User need? HOT 1
- ASG name is not appearing in the slack notification HOT 1
- url.parse is deprecated - Requests going to localhost
- Failed at the [email protected] deploy script './scripts/deploy.sh'. HOT 1
- Lambda deployment fails HOT 1
- Is it Possible to add the AWS Account Name in the Output Description?
- Error: certificate has expired at TLSSocket HOT 2
- AWS no longer support Node.js 12 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lambda-cloudwatch-slack.