Quartz的监控和管理工具:quartz-monitor

Quartz-Monitor是一款基于DWZ的Quartz管理工具,能够实时动态地管理Job和Trigger。其主要功能包括配置管理、Job管理、Trigger管理以及CronExpression校验等。通过简单的配置步骤,可以轻松实现对不同环境中Quartz实例的有效监控。

转载:http://www.open-open.com/lib/view/open1372314529588.html

quartz-monitor 是一个基于DWZ的Quartz管理工具,可以实时动态的管理Job和trigger,具体功能主要包括:

  1. 配置管理针对不同环境的Quartz,需要有一个统一的入口去管理这些配置,来满足对不同环境的任务的管理。
  2. Job管理提供对Job的管理和维护功能。Monitor提供对Job的基本管理,包括对其状态、执行时间、基本信息的管理以及提供基于Job的基本操作。
  3. Trigger管理提供对trigger的管理和维护功能。可以查看某个job的trigger信息,并添加和修改trigger。
  4. Cron Expression校验 Cron Expression虽然简单却非常容易写错,所以我们提供了对其的校验功能。

配置方法:

1)配置quartz支持JMX

在需要管理的应用的quartz.properties中加入配置:

org.quartz.scheduler.jmx.export = true

2)配置应用容器支持JMX

比如我使用的是TOMCAT,并且在Linux上,我需要往catalina.sh中加入:

JAVA_OPTS='-Dcom.sun.management.jmxremote=true 
-Dcom.sun.management.jmxremote.port=2911 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dorg.quartz.scheduler.jmx.export=true'

3)配置Quartz-Monitor

将quartz-monitor放入tomcat,配置好远程quartz的jmx信息,如jmx端口和ip,即可使用。

项目主页:http://www.open-open.com/lib/view/home/1372314529588

YAML 解析错误 in ./application-common.yaml: expected a single document in the stream in "./application-common.yaml", line 1, column 1 but found another document in "./application-common.yaml", line 50, column 1 common.yaml: server: port: 8087 main: web-application-type: servlet spring: port: 8087 main: web-application-type: servlet logging: level: com.tplink.smb.omada: debug com.tplink.smb.component.schedule: debug com.tplink.smb.ecsp: debug com.tplink.smb.rtty: debug com.tplink.smb.omada.monitor.statistic.service.ApStatService: warn com.tplink.smb.omada.monitor.port.mongo.statistic.site.fivemin.SiteStat5MinMongoRepositoryImpl: warn com.tplink.smb.omada.monitor.statistic.application.StatisticScheduleApplicationService: warn # 临时关闭manager收到Gateway inform的warn打印 com.tplink.smb.omada.client.port.eventcenter.ClientInformFromDevGwWatcher: ERROR # 临时关manager收到Gateway inform的warn打印 com.tplink.smb.omada.client.port.eventcenter.ClientInformFromDevGwWatcherV2: ERROR pattern: console: '%d{MM-dd-yyyy HH:mm:ss.SSS} %p [%t] [%X{REQUEST_ID}] %c{1}.%M(%L): %m%n' # TODO: 下发给设备的端口配置,API-Gateway的要保持一致 portal: http: port: 8088 https: port: 8843 directPort: 443 # TODO: 下发给设备的管理端口配置,Device-Gateway的保持一致 omada: manage: v1: port: 29811 v2: port: 443 update: adoptInfo: timeout: 10000 manage: adopt: sync: batchsize: 100 timeout: 30 threadNum: 2 queuelength: 10000 --- # Transport 组件使用的event center配置 eventCenter: mode: kafka --- # Transport 组件支持协议配置 ecsp: proxy: enableV1: true enableV2: true enableV3: true # 事件中心的 topic 前缀 - 项目名称 topic-prefix: omada # 事件中心的 topic groupId - 微服务名称 topic-group-id: sdn-lite-manager #-------Common-------- # data retention 线程池 data-retention: queue-capacity: 5000 core-threads: 4 scheduler: cloud: # quartz启动的时间间隔(单位:秒), 其值应小于等于 最频繁任务的执行时间间隔,默认:15 schedule-interval: 15 # 允许调度模块使用时间轮,若允许,则每次quartz启动后会将任务逐秒分发, 默认:true enable-time-wheel: false # enableTimeWheel为true时,预先读取数据库的时间(单位:秒),默认:1 pre-read-time: 1 # kafka 主题前缀,kafka主题为topicPrefix + instanceName topic-prefix: omada.schedule.event. # Kafka主题分区数。需与实际配置分区数一致。 partitions: 4 # quartz tag version-tag: ${SERVER_VERSION} eventCenter: mode: kafka common: topicPrefix: easy. ignorePrefixTopic: - omada.cloud.license.topics - ebu.omada.cloud.license.topics - omada.device.online - ebu.license.manager.expired.license.topics - ebu.vms.cloud.license.topics - omada.cloud.license.prd.topics # 当前central使用uat,需根据测试环境配置修改 - omadacentral.settings.ipaccessrule.event - omadacentral.settings.organization.event - omadacentral.log.send # 负责提供各种api的grpc实现 omada-dispatcher: grpc: enable: true #-------Manager-------- #配置Omada Cloud外部访问地址 omadacloud: internal: host: ${OMADA_CLOUD_INTERNAL_HOST} external: domain: ${OMADACLOUD_EXTERNAL_DOMAIN} # 配置CVM业务云访问地址 cvmserver: internal: host: ${CVM_SERVER_INTERNAL_HOST} # 配置cloud base url cloudbase: portal-domain: ${CLOUDBASE_PORTAL_DOMAIN} device-domain: ${CLOUDBASE_DEVICE_DOMAIN} cbcType: free device-max-num: 1500 device-batch-num: 50 # 覆盖默认端口配置, 仅测试环境需要配置 device: discovery-port: 35001 manager-port: 35002 # 覆盖默认端口配置, 仅测试环境需要配置 port: config: adopt-port-v1: 35005 upgrade-port-v1: 35007 discovery-port: 35001 manager-port-v1: 35006 manager-port-v2: 35002 transfer-port-v2: 35004 rtty-port: 35003 device-monitor-port: 35008 # 配置基础云内部域名,V1/V2协议共用 tpcloud: internal: domain: ${TPCLOUD_INTERNAL_DOMAIN} # 敏感信息加密配置 access-key: ${TPCLOUD_ACCESS_KEY} secret-key: ${TPCLOUD_SECRET_KEY} host: ${TP_CLOUD_HOST} # 使用omada的biz-cloud-type biz-cloud-type: omada_controller_cloud # 配置LicenseManager license: enabled: false manager: host: ${LICENSE_MANAGER_SERVER} secret: ${LICENSE_MANAGER_SERVICE_SECRET} eventcenter: topic: ebu.omada.cloud.license.uat2.topics groupId: EBU_LICENSE_MANAGER_EVENT_GROUP_OMADA_LICENSE_ESS ebu-topic: ebu.omada.cloud.license.uat2.topics only-use-accountid: false need-compatible: false # 是否监听License Manager listen-license-manager: false thread: config: discoveryCoreThreadNum: 10 discoveryMaxThreadNum: 10 discoveryExecutorQueueLength: 1000 adoptCoreThreadNum: 10 adoptMaxThreadNum: 10 adoptExecutorQueueLength: 1000 managerCoreThreadNum: 10 managerMaxThreadNum: 10 managerExecutorQueueLength: 2000 managerInformCoreThreadNum: 10 managerInformMaxThreadNum: 15 managerInformExecutorQueueLength: 2000 upgradeCoreTreadNum: 10 upgradeMaxThreadNum: 10 upgradeSendReqCoreThreadNum: 10 upgradeSendReqMaxThreadNum: 10 sn-add: offline: area: ${REGION_FULL} topic: omada.device.online groupId: uat-free-lite-manager-sn-device-online-group use-other-kafka: true kafka-servers: ${SN_KAFKA_CONSUMER_SERVERS} limit: # 检测周期 checkTimeS: 300 # 限流器数量 errorCount: 100 # 在检测周期内超过限流器数量后的锁定时间 lockTimeS: 1800 # cbc 暂未实现 radius server,临时添加配置,让 5.11 先能运行 aaa: cache: cache-name: aaa:test:cache user-eap-cache-info-exp-secs: 30 certificate: ca: path: classpath:cert/tplink/ca.crt server: path: classpath:cert/tplink/server.p12 store-pass: 123456 key-pass: 123456 protocol: eap-tls: false tacacs: false nbu-common: secret-key: ${LOG_AES_KEY} secret-IV: ${LOG_AES_IV} hash-salt: ${LOG_SHA_SALT} busy-site: check-task-interval: 30m cache-keep-alive: 30m #-------Essential Manager独有-------- manager: device-white-list: cache: mem: empty-keep-alive: 10s keep-alive: 1m redis: keep-alive: 5m profiles: - profile-name: default region-codes: [ '*' ] #-------log-------- # Log组件Client Cloud配置, 覆盖global的 log: config: partitions: 4 #用于设置日志上限清除定时任务的分区,注:schedule组件推荐默认分片大小 app-types: ['TP-Link_Omada_Android_dev','TP-Link_Omada_iOS_dev','TP-Link_Omada_Android_beta','TP-Link_Omada_iOS_beta'] component: server: config: cache-log-queue-size: 15000 #缓存日志队列长度(默认15000) consume-log-size: 1000 #批量从MQ取日志时,一次取出日志数量(默认1000) timeout: 5 #批量从MQ取日志时,超时等待时间(默认5s) core-pool-size: 16 #日志处理自定义线程池核心线程数(默认16) maximum-pool-size: 128 #注日志处理自定义线程池最大线程数(默认128) topic: omada.log.send #topic定义 group-id: smb-free-sdn-lite-log-send-group #groupId定义;规范:部门名-项目名-微服务名-topic相关名-group client: config: topic: omada.log.send #Topic定义 cache-log-queue-size: 5000 #缓存日志队列长度(默认15000) timeout: 5 #批量从MQ取日志时,超时等待时间(默认5s) batch-add-log-size: 50 #批量从MQ取日志时,一次取出的日志数量(默认50) #------monitor---------- statistic: partitions: 4 topology: partitions: 4 # 调度任务刷新周期,单位分钟 schedulePeriod: 2 # 拓扑自动刷新最小间隔,单位分钟 topoRefreshPeriod: 15 roaming: partitions: 4 rfplanning: core-pool-size: 1 maximum-pool-size: 50 queue-capacity: 2000 # 存活时间单位分钟 keep-alive-time: 30 # 大数据上报相关 # CBC 5.2开启 data-track: expImprove: false monitor: device: inform: device-num: 5000 pool-size: 8 max-size: 8 #-------Client-------- radius: partitions: 2 client: timeout: clientTimeoutPatchEnable: false timeout-preserve-duration: ${TIMEOUT_PRESERVE_DURATION:5d} recognition: #终端识别定时任务分片数 shardingSize: 4 #-------Central-------- # 是否从central获取邀请链接 user-invite: central-enable: true # embedWeb配置,前端更新前配置为false,更新后配置为true embedWeb: enable: ${ESSENTIAL_EMBEDWEB_ENABLE} deploy: env: uat # 测试环境开启忙闲时监控 busy-device-task: enabled: true countInterval: 1h sleepInterval: 500ms # 控制配置同步双写双读的开关,Local默认关闭双写开关,CBC在新旧服务兼容时需要打开双写开关 config: sync: write-enable: false read-enable: false
最新发布
12-18
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值