当前位置:网站首页>xxl-job配置告警邮件通知
xxl-job配置告警邮件通知
2022-06-26 08:14:00 【专注写bug】
前言
项目上线后,调度任务执行失败,当无告警信息时,只有再数据出现错误,进行问题定位和分析时,才会知道执行结果信息,每次出现问题,不能及时的知晓对于运维而言,很不友好。
但是xxl-job中具备这个能力,具体配置项参考下面详细信息。
xxl-job-admin服务配置
在application.properties中针对邮件告警配置项有如下信息:
### xxl-job, email
spring.mail.host=smtp.qq.com
spring.mail.port=25
[email protected]
[email protected]
spring.mail.password=xxxxx
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
这里的配置信息,是配置一个邮件发送方信息。
也就是:出现告警信息时,邮件发送者。
可以配置为:
### xxl-job, email
spring.mail.host=smtp.qq.com
spring.mail.port=25
[email protected]qq.com
[email protected]
spring.mail.password=aysktictvrtbbigj
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
这里用的是我个人的QQ邮箱。但这里需要注意一点:
spring.mail.password 不是设置密码,是设置 授权码
关于邮件授权码
进入QQ邮箱的设置,找到账户。
在账户项中下滑至POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务。
选择生成授权码。需要发送确认短信信息,当发送成功后,将会获得当前邮箱的授权码信息。
将授权码信息复制粘贴到spring.mail.password中即可!

具体使用

边栏推荐
- 花指令wp
- Quickly upload data sets and other files to Google colab ------ solve the problem of slow uploading colab files
- How to Use Instruments in Xcode
- Uniapp wechat withdrawal (packaged as app)
- swift 代码实现方法调用
- Pychart connects to Damon database
- Flower instruction WP
- Listview control
- What are the characteristics of digital factory in construction industry
- [postgraduate entrance examination: planning group] clarify the relationship among memory, main memory, CPU, etc
猜你喜欢

Recognize the interruption of 80s51

ASP. Net and Net framework and C #

Household enterprises use WMS warehouse management system. What are the changes

解决 psycopg2.NotSupportedError: PQconninfo not available in libpq < 9.3

Quickly upload data sets and other files to Google colab ------ solve the problem of slow uploading colab files

The solution of installing opencv with setting in pycharm

Crawler case 1: JS reversely obtains HD Wallpapers of minimalist Wallpapers

How to define a digital factory and what is the relationship with smart factory and industry 4.0

buuresevewp

Oracle 19C download installation steps
随机推荐
有序排列
Software engineering - high cohesion and low coupling
QT之一个UI里边多界面切换
Win10 mysql-8.0.23-winx64 solution for forgetting MySQL password (detailed steps)
Use middleware to record slow laravel requests
MySQL practice: 4 Operation of data
Opencv鼠标事件+界面交互之绘制矩形多边形选取感兴趣区域ROI
Deeply analyze storage costs and find cost reduction solutions
Go language shallow copy and deep copy
Oracle database self study notes
Interview JS and browser
Power apps application practice | easily develop employee leave attendance management applet with power apps
Test method - decision table learning
Use intent to shuttle between activities -- use explicit intent
Click the button to call the system browser to open Baidu home page
Wechat applet beginner level chapter
Macro task, micro task, async, await principle of interview
How to define a digital factory and what is the relationship with smart factory and industry 4.0
The 9th zero code training camp is officially open for registration! (Beijing, Shanghai, Guangzhou and Shenzhen)
技术分享 | MySQL:caching_sha2_password 快速问答