-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Hi all,
i'm trying to send notification to a SNS topic from alertmanager for trigger autoscaling of ECS,
i tried successfully slack notification,
but when i try to enable SNS notification the alertmanager panic with this error :
time="2015-11-18T15:20:11Z" level=info msg="Sent 1 notifications" file=manager.go line=353
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x6b51d2]
goroutine 1 [running]:
github.com/aws/aws-sdk-go/service/sns.New(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/app/.build/gopath/src/github.com/aws/aws-sdk-go/service/sns/service.go:53 +0x72
github.com/prometheus/alertmanager/manager.(_notifier).sendAmazonSnsNotification(0xc820194ae0, 0x1, 0xc820195560, 0xc82017c580, 0x0, 0x0)
/app/.build/gopath/src/github.com/prometheus/alertmanager/manager/notifier.go:464 +0x55
github.com/prometheus/alertmanager/manager.(_notifier).handleNotification(0xc820194ae0, 0xc82017c580, 0x1, 0xc8200d9500)
/app/.build/gopath/src/github.com/prometheus/alertmanager/manager/notifier.go:809 +0x853
github.com/prometheus/alertmanager/manager.(*notifier).Dispatch(0xc820194ae0)
/app/.build/gopath/src/github.com/prometheus/alertmanager/manager/notifier.go:817 +0x86
main.main()
/app/main.go:159 +0x1280
goroutine 17 [syscall, 1 minutes, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1
i"m using Docker images with this release:
branch master
date 20151109-20:48:36
go_version 1.5.1
revision 86f5f80
user @afbbf75ae75d
version 0.0.4
and alertmanager.conf is this:
notification_config {
name: "alertmanager_test"
amazon_sns_config {
topic_arn: "arn:aws:sns:us-east-1:1234567890X:MyTopicName"
send_resolved: true
}
}
aggregation_rule {
repeat_rate_seconds: 300
notification_config_name: "alertmanager_test"
}
My goal is authenticate to AWS using Instance-role, so i created one that permit action to AWS SNS, ( it's supported by AWS-SDK ) , but i also tried using credentials and environment variable but i had same issue
Best,
Enrico Casti