Brian,
I just tested your suggestion as well. After I modified the fields like this 
below, it worked. What config of AlertManager shall I update to apply this to 
all alerts?

"groupLabels":{},
"commonLabels":{},
"commonAnnotations":{},


Zhang

> On Jun 3, 2020, at 3:00 AM, Brian Candler <[email protected]> wrote:
> 
> > json: cannot unmarshal string into Go struct field Message.commonLabels of 
> > type template.KV
> 
> means: "I tried to unpack a template.KV object, but you gave me a string 
> instead".  First try:
> 
> "groupLabels": {},
> "commonLabels": {},
> "commonAnnotations": {},
> 
> and if that works, you can change it to
> 
> "groupLabels": {
>   "alertname":"KubeControllerManagerDown",
>   .. etc
> },
> 
> This is like the example shown at 
> https://github.com/prometheus-msteams/prometheus-msteams#simulating-a-prometheus-alerts-to-teams-channel
>  
> <https://github.com/prometheus-msteams/prometheus-msteams#simulating-a-prometheus-alerts-to-teams-channel>
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/prometheus-users/50c98d18-fd13-4580-91df-55b2ff235970%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/prometheus-users/50c98d18-fd13-4580-91df-55b2ff235970%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/DCAA5F53-FA87-4A21-8BBC-B82A994B92DB%40gmail.com.

Reply via email to