Monitor

Event bus. All components can export their own metrics data, which are consumed and processed by listeners.

Example

  1. monitor:
  2. logger:
  3. period: 30s
  4. enabled: true
  5. listeners:
  6. filesource: ~
  7. filewatcher: ~
  8. reload: ~
  9. sink: ~

logger

Loggie supports outputting metrics to logs, which can be configured through logger.

fieldtyperequireddefaultdescription
logger.enabledboolfalsefalsewhether to open
logger.periodtime.Durationfalse10sThe time interval of indicator printing. It is recommended to extend the interval when the amount of data is large, such as 30s, 5m
logger.prettyboolfalsefalsewhether the printed indicator json needs to be displayed in a friendly manner.
logger.additionLogEnabledboolfalsefalseWhether it is necessary to output the printed metrics to another log file separately. In the case of a large amount of data, if we configure the printing interval to be short, this switch can be turned on to avoid too many metrics log interference.
logger.additionLogConfigfalseLog configuration parameters for extra output.
logger.additionLogConfig.directoryboolfalse/data/loggie/loglog directory for extra output
logger.additionLogConfig.maxBackupsintfalsemetrics.logThe maximum number of files to keep in log rotation. The default is 3
logger.additionLogConfig.maxSizeintfalse1024the maximum file size (in MB) when the log is rotated
logger.additionLogConfig.maxAgeintfalse14Maximum number of days to be retained for log rotation
logger.additionLogConfig.timeFormatstringfalse2006-01-02 15:04:05Time format for each line of log output

listeners

Indicates specific activated listeners. If the configuration is not filled in, it is closed. If the Listener is not activated, the related indicators will not be processed and exposed.