maxwo/snmp_notifier

502 BAD GATEWAY

gitmedur opened this issue · 1 comments

What did you do?
Using webhooks in alertmanager on OpenShift to send data to snmp notifier.
What did you see instead? Under which circumstances?
Getting:
DEBU[0783] Handling /alerts webhook request source="http_server.go:76"
ERRO[0783] 502 Bad Gateway: err=template: description-template.tpl:1:7: executing "description-template.tpl" at <(len .Alerts) gt 0>: can't give argument to non-function len .Alerts data=&{Receiver:occluster-webhook-receiver Status:firing Alerts:[{Status:firing Labels:map[alertname:KubeNodeUnreachable effect:NoSchedule endpoint:https-main instance:IPADDR:8443 job:kube-state-metrics key:node.kubernetes.io/unreachable namespace:openshift-monitoring node: $nodename pod:kube-state-metrics-55f99f49d7-lp9pb prometheus:openshift-monitoring/k8s service:kube-state-metrics severity:warning]

Wondering why i'm getting this.. Any ideas?

  • System information:
    Running snmp_notifier on CentOS 7 VM.

  • SNMP notifier version:

snmp_notifier, version 1.0.0 (branch: master, revision: 011a200)

  • SNMP notifier command line:
./snmp_notifier --snmp.destination=$IP_ADDRESS:162 --snmp.trap-description-template=description-template.tpl --log.level="debug"

Used golang 1.13.8 for build. Seems it's working now..