All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.hippo4j.starter.alarm.ding.DingAlarmConstants Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package cn.hippo4j.starter.alarm.ding;

/**
 * Ding alarm constants.
 *
 * @author chen.ma
 * @date 2021/11/26 20:03
 */
public class DingAlarmConstants {

    /**
     * 钉钉机器人 Url
     */
    public static final String DING_ROBOT_SERVER_URL = "https://oapi.dingtalk.com/robot/send?access_token=";

    /**
     * 线程池报警通知标题
     */
    public static final String DING_ALARM_TITLE = "动态线程池告警";

    /**
     * 线程池参数变更通知标题
     */
    public static final String DING_NOTICE_TITLE = "动态线程池通知";

    /**
     * 线程池报警通知文本
     */
    public static final String DING_ALARM_TXT =
            "[警报] %s - 动态线程池运行告警 \n\n" +
                    " --- \n\n " +
                    "线程池ID:%s \n\n " +
                    "应用名称:%s \n\n " +
                    "应用实例:%s \n\n " +
                    "报警类型:%s \n\n " +
                    " --- \n\n  " +
                    "核心线程数:%d \n\n " +
                    "最大线程数:%d \n\n " +
                    "当前线程数:%d \n\n " +
                    "活跃线程数:%d \n\n " +
                    "最大任务数:%d \n\n " +
                    "线程池任务总量:%d \n\n " +
                    " --- \n\n  " +
                    "队列类型:%s \n\n " +
                    "队列容量:%d \n\n " +
                    "队列元素个数:%d \n\n " +
                    "队列剩余个数:%d \n\n " +
                    " --- \n\n  " +
                    "拒绝策略:%s \n\n" +
                    "拒绝策略执行次数:%d \n\n " +
                    "OWNER:@%s \n\n" +
                    "提示:%d 分钟内此线程池不会重复告警(可配置) \n\n" +
                    " --- \n\n  " +
                    "**播报时间:%s**";

    /**
     * 线程池参数变更通知文本
     */
    public static final String DING_NOTICE_TXT =
            "[通知] %s - 动态线程池参数变更 \n\n" +
                    " --- \n\n " +
                    "线程池ID:%s \n\n " +
                    "应用名称:%s \n\n " +
                    "应用实例:%s \n\n " +
                    " --- \n\n  " +
                    "核心线程数:%s \n\n " +
                    "最大线程数:%s \n\n " +
                    "核心线程超时:%s \n\n " +
                    "线程存活时间:%s / SECONDS \n\n" +
                    " --- \n\n  " +
                    "队列类型:%s \n\n " +
                    "队列容量:%s \n\n " +
                    " --- \n\n  " +
                    "AGO 拒绝策略:%s \n\n" +
                    "NOW 拒绝策略:%s \n\n" +
                    " --- \n\n  " +
                    "提示:动态线程池配置变更实时通知(无限制) \n\n" +
                    "OWNER:@%s \n\n" +
                    " --- \n\n  " +
                    "**播报时间:%s**";

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy