Closed HarHarLinks closed 1 year ago
@HarHarLinks Could you please add some spaces and a slash for improved formatting?
This is how it looks.
This is how an alarm looks with spaces and a slash added.
@erebion thanks for the screenshots. I agree with your sentiment. However I'm not actively using this (just copy-pasted from the hookshot channel), I'm not even running Alertmanager, yet... I think it'd be best if you could suggest changes via code review?
@HarHarLinks Sure, I modified this slightly to look better so I can tell you what I did.
This is how it looks like with the changes, had to purposefully crash Grafana, lol
I refactored @erebion's suggestions slightly, and kept to a bit more compact message. please resolve the review threads if you're happy with that?
Looks like:
Fallback looks something like:
I'm happy, will give @erebion a bit of time to respond.
Looks okay, though I'd be a bit happier with an additional line break after [WARNING - FIRING]
and before the source and silence link for improved readability and accessibilty.
Many people struggle to read such messages if they are a wall of text and have a much easier time if there's a line break.
Also, I think it looks a bit better.
"formatted_body": "<p><font color='green'><b>[RESOLVED]</b></font></p><p><b>HostSystemdServiceCrashed</b>: SystemD service crashed<br/> VALUE = 1<br/> LABELS: map[__name__:node_systemd_unit_state instance:localhost:9100 job:host_node_exporter name:grafana.service state:failed type:simple]</p><p><a href=\"http://erebion-matrix:9090/graph?g0.expr=node_systemd_unit_state%7Bstate%3D%22failed%22%7D+%3D%3D+1&g0.tab=1\">source</a> | <a href=\"http://localhost:9093#silences/new?filter={alertname%3D%22HostSystemdServiceCrashed%22,instance%3D%22localhost%3A9100%22,job%3D%22host_node_exporter%22,name%3D%22grafana.service%22,severity%3D%22warning%22,state%3D%22failed%22,type%3D%22simple%22}\">silence</a></p>"
looks like
could someone who is actually running this please test if my replaceAll works properly?
Signed-off-by: Kim Brose 2803622+HarHarLinks@users.noreply.github.com