Hi,
I’m new here so I don’t know if this is the right place.
I started using Grafana for work about a week ago so I don’t have much experience.
I’m trying to set up notification (for email) for particular alert. What I want to get in an email is the name of the host where problem is happening and the value of metric that I’m monitoring.
I tried many things, looked many tutorials etc. The best thing that I found is to use command:
{{ .Value }}
which gives me something like this:
[metric=‘cpu.usage_idle {cpu: cpu-total host=hostname.somethin}’ labels={cpu=cpu-total, host=hostname.somethin value=90.0000000000001]
Now, I want to extract name of the host from this and that value on the end.
I tried many things, here are some examples:
{{ .ValueString }}
{{ range .Value }}
{{ .Value.labels }}
{{ .Value.labels.host }}
{{ .Value.host }}
{{ .Value[“host”] }}
{{ .Value “host” }}
{{ .Value.value }}
{{ .Value }}{{ $host }}
etc etc
I really don’t know what to do or where to look. Please help.
Thank you.