本帖最后由 keer_zu 于 2020-12-18 10:45 编辑
EDGEX FOUNDRY配置参数 --- support-scheduler
support-scheduler是主要是EDGEX系统中的提醒服务,support-scheduler使用介绍如下,他有2个启动参数可以配置: - registry是一个bool量,True表示support-scheduler的配置参数是从consul拉取,False表示从本地配置文件载入。
- profile本地配置文件的路径, 即便registry=True, 该参数也必须要指明一个配置文件,因为连接consul服务所需的host,port等参数必须从本地的配置文件中获取
- Usage: %s [options]
- Server Options:
- -r, --registry Indicates service should use Registry
- -p, --profile <name> Indicate configuration profile other than default
- Common Options:
- -h, --help Show this message
Table of Contents
support-scheduler的配置文件 Writable Clients Databases Logging Registry Service Intervals IntervalActions

support-scheduler的配置文件
- [Writable]
- ScheduleIntervalTime = 500
- LogLevel = 'INFO'
-
- [Service]
- BootTimeout = 30000
- ClientMonitor = 15000
- CheckInterval = '10s'
- Host = 'localhost'
- Port = 48085
- Protocol = 'http'
- ReadMaxLimit = 100
- StartupMsg = 'This is the Support Scheduler Microservice'
- Timeout = 5000
-
- [Registry]
- Host = 'localhost'
- Port = 8500
- Type = 'consul'
-
- [Logging]
- EnableRemote = false
- File = './logs/edgex-support-scheduler.log'
-
- [Clients]
- [Clients.Logging]
- Protocol = 'http'
- Host = 'localhost'
- Port = 48061
-
- [Databases]
- [Databases.Primary]
- Host = 'localhost'
- Name = 'scheduler'
- Password = ''
- Port = 27017
- Username = ''
- Timeout = 5000
- Type = 'mongodb'
-
- [Intervals]
- [Intervals.Midnight]
- Name = 'midnight'
- Start = '20180101T000000'
- Frequency = 'P1D'
-
- [IntervalActions]
- [IntervalActions.ScrubPushed]
- Name = 'scrub-pushed-events'
- Host = 'localhost'
- Port = 48080
- Protocol = 'http'
- Method = 'DELETE'
- Target = 'core-data'
- Path = '/api/v1/event/scrub'
- Interval = 'midnight'
-
- [IntervalActions.ScrubAged]
- Name = 'scrub-aged-events'
- Host = 'localhost'
- Port = 48080
- Protocol = 'http'
- Method = 'DELETE'
- Target = 'core-data'
- Path = '/api/v1/event/removeold/age/604800000'
- Interval = 'midnight'
如上是项目自带的support-scheduler的配置文件 ,主要分8部分,support-scheduler启动后会将配置文件的信息导入如下结构中,若registry=True则根据Registry中的信息连接consul并拉取相应的配置信息覆盖之前从本地配置文件中读取到的信息。
|