通知渠道 Notify Channel
https://aiops.com/integration.html
https://docs.erda.cloud/2.0/manual/msp/guides/apm/alert-notify-channel.html
https://github.com/yangpeng14/DevOps/blob/master/kubernetes/PrometheusAlert%E5%A4%9A%E6%B8%A0%E9%81%93%E5%91%8A%E8%AD%A6%E9%80%9A%E7%9F%A5%E7%A5%9E%E5%99%A8.md
https://www.alibabacloud.com/help/zh/log-service/latest/notification-methods
https://antchain.antgroup.com/docs/2/209963

钉钉数字一体化 https://www.dingtalk.com
image.png

  1. 钉钉,DingdingOutlined image.png
    1. DingtalkSquareFilled image.png
  2. 短信 MessageFilled image.png
  3. 电话,PhoneOutlined image.png
    1. PhoneTwoTone image.png
  4. 邮件,MailTwoTone image.png
    1. SMTP,发送;发消息给邮件服务器上的 SMTP Service
    2. POP3/IMAP 接收
  5. 企业微信,QQ
    1. QqSquareFilled image.png
    2. WechatFilled image.png image.png
  6. 飞书 image.png

image.png
image.png

  1. const options = [
  2. {
  3. label: <><DingdingOutlined style={{color: '#0983ff'}} /> 钉钉</>,
  4. value: "ding",
  5. },
  6. {
  7. label: <><MailTwoTone /> 邮件</>,
  8. value: "mail",
  9. },
  10. {
  11. label: <><PhoneTwoTone rotate={90} style={{ color: '#0ce463' }} /> 电话</>,
  12. value: "phone",
  13. },
  14. {
  15. label: <><MessageFilled style={{ color: '#0ce463' }} /> 短信</>,
  16. value: "message",
  17. }
  18. ];

tagRender

image.png
Select tagRender 自定义选择标签的样式
https://ant-design.antgroup.com/components/select-cn#components-select-demo-custom-tag-render

  1. import React from "react";
  2. // import PropTypes from "prop-types";
  3. import { Select as AntdSelect, Tag } from "antd";
  4. import {
  5. PhoneTwoTone,
  6. DingdingOutlined,
  7. MailTwoTone,
  8. MessageFilled
  9. } from "@ant-design/icons";
  10. import type { CustomTagProps } from "rc-select/lib/BaseSelect";
  11. const options = [
  12. {
  13. label: "钉钉",
  14. value: "ding",
  15. icon: <DingdingOutlined />,
  16. color: "processing"
  17. },
  18. {
  19. label: "邮件",
  20. value: "mail",
  21. icon: <MailTwoTone />,
  22. color: "warning"
  23. },
  24. {
  25. label: "电话",
  26. value: "phone",
  27. icon: <PhoneTwoTone rotate={90} />,
  28. color: "red"
  29. },
  30. {
  31. label: "短信",
  32. value: "message",
  33. icon: <MessageFilled />,
  34. color: "lime"
  35. }
  36. ];
  37. Select.propTypes = {};
  38. function Select() {
  39. function tagRender(props: CustomTagProps) {
  40. const { label, value, closable, onClose } = props;
  41. const item = options.find(it => it.value === value) ?? {};
  42. const onPreventMouseDown = (event: React.MouseEvent<HTMLSpanElement>) => {
  43. event.preventDefault();
  44. event.stopPropagation();
  45. };
  46. return (
  47. <Tag
  48. bordered={false}
  49. color={item.color}
  50. onMouseDown={onPreventMouseDown}
  51. closable={closable}
  52. onClose={onClose}
  53. icon={item.icon}
  54. >
  55. {label}
  56. </Tag>
  57. );
  58. }
  59. return (
  60. <AntdSelect
  61. options={options}
  62. mode="multiple"
  63. className="w-full"
  64. tagRender={tagRender}
  65. />
  66. );
  67. }
  68. export default Select;

邮件

SMTP,发送;发消息给邮件服务器上的 SMTP Service
POP3/IMAP 接收
SMTP,Simple Mail Transfer Protocal
POP,Post Office Protocol 邮局通讯协议
https://www.sohu.com/a/323407215_657867