dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Add support for new receivers tied to rebased monitoring to upstream version 50.x

Open gaktive opened this issue 10 months ago • 7 comments

Observability is working on https://github.com/rancher/rancher/issues/44614 to rebase monitoring to a newer upstream version; in this case 50.x.

There will be new CRDs for alerting, so UI needs to look at it as well. Details TK.

Internal reference: SURE-7884

gaktive avatar Apr 18 '24 17:04 gaktive

UI Differences

Here is a description of the things that would need to be chagned in in the UI, thanks for your patience!

Pod and Service Monitors

The crds for these resources have changes somewhat. I am not 100% sure how we get the initial yaml for the Create from YAML for the pod and service monitors, so let me know if / what you need from me to get those working.

Alerting Receivers

The main difference here is some new receivers. Shouldn't be anything super new, just different fields but all the same primitive types as the other receivers.

Discord

# Whether to notify about resolved alerts.
[ send_resolved: <boolean> | default = true ]

# The Discord webhook URL.
# webhook_url and webhook_url_file are mutually exclusive.
webhook_url: <secret>
webhook_url_file: <filepath>

# Message title template.
[ title: <tmpl_string> | default = '{{ template "discord.default.title" . }}' ]

# Message body template.
[ message: <tmpl_string> | default = '{{ template "discord.default.message" . }}' ]

# The HTTP client's configuration.
[ http_config: <http_config> | default = global.http_config ]

MSteams

# Whether to notify about resolved alerts.
[ send_resolved: <boolean> | default = true ]

# The incoming webhook URL.
# webhook_url and webhook_url_file are mutually exclusive.
[ webhook_url: <secret> ]
[ webhook_url_file: <filepath> ]

# Message title template.
[ title: <tmpl_string> | default = '{{ template "msteams.default.title" . }}' ]

# Message summary template.
[ summary: <tmpl_string> | default = '{{ template "msteams.default.summary" . }}' ]

# Message body template.
[ text: <tmpl_string> | default = '{{ template "msteams.default.text" . }}' ]

# The HTTP client's configuration.
[ http_config: <http_config> | default = global.http_config ]

Webex

# Whether to notify about resolved alerts.
[ send_resolved: <boolean> | default = true ]

# The Webex Teams API URL i.e. https://webexapis.com/v1/messages
# If not specified, default API URL will be used.
[ api_url: <string> | default = global.webex_api_url ]

# ID of the Webex Teams room where to send the messages.
room_id: <string>

# Message template.
[ message: <tmpl_string> default = '{{ template "webex.default.message" .}}' ]

# The HTTP client's configuration. You must use this configuration to supply the bot token as part of the HTTP `Authorization` header. 
[ http_config: <http_config> | default = global.http_config ]

joshmeranda avatar Apr 19 '24 01:04 joshmeranda

@joshmeranda is there a test build that UI can work off of? And are there example receivers for the 3 new ones to connect to?

gaktive avatar Apr 22 '24 16:04 gaktive

We may not need to make any changes - the yaml for the monitors comes from the backend, so as long as that is all good, that should "just work".

For the new alerting destinations, users can use the existing 'custom' option and provider yaml.

^ FYI @gaktive

nwmac avatar Apr 22 '24 16:04 nwmac

Cool. @nwmac is this ready for pointing then for an upcoming sprint?

gaktive avatar Apr 22 '24 21:04 gaktive

Suggestion:

  • Break out Teams and SMS from Webhook and have as top-level
  • Change Webhook to Generic Webhook
  • Add Discord
  • Add Webex

nwmac avatar Apr 25 '24 10:04 nwmac

Sorry for the delay!

We do not have a workable test build as of now I'll let you know once we get something that could work for this. Unfortunately, we also don't have any test receivers fro you to send stuff off to.

joshmeranda avatar Apr 30 '24 13:04 joshmeranda

Hi @joshmeranda, I'm checking the specs of the new receivers and they all have a HTTP client's configuration field. In the Webhook -> MS Teams example we currently have a SSL section and an Auth field:

image

image

Is that HTTP client's configuration related to any or both of them?

edenhernandez-suse avatar May 22 '24 14:05 edenhernandez-suse

We want to take this opportunity to fix some issues. We should have a sub-task only for that, not sure how to link it with this one.

The designs are here: Adobe Xd Prototype

edenhernandez-suse avatar Jun 10 '24 14:06 edenhernandez-suse