System metrics configuration

Customize the reporting of system metrics.


To control all aspects of the system metrics behavior.

frequencystringInitial system metrics reporting frequency as a sequence of decimal numbers, each with optional fraction and a unit suffix, such as: 300ms, 1.5h, 10m30s, etc., time units are: ns, us (or µs), ms, s, m, h
Local connectivity
brokerstringtcp://localhost:1883Address of the MQTT server/broker that the system metrics will connect for the local communication, the format is: scheme://host:port
usernamestringUsername that is a part of the credentials
passwordstringPassword that is a part of the credentials
logFilestringlog/system-metrics.logPath to the file where log messages are written
logLevelstringINFOAll log messages at this or higher level will be logged, the log levels in descending order are: ERROR, WARN, INFO, DEBUG and TRACE
logFileCountint5Log file maximum rotations count
logFileMaxAgeint28Log file rotations maximum age in days, use 0 to not remove old log files
logFileSizeint2Log file size in MB before it gets rotated


The minimal required configuration that enables the auto reporting of system metrics.

    "frequency": "60s",
    "logFile": "/var/log/system-metrics/system-metrics.log"


The configuration can be further adjusted according to the use case. The following template illustrates all possible properties with their default values.

    "frequency" : ""
    "broker": "tcp://localhost:1883",
    "username": "",
    "password": "",
    "logFile": "log/system-metrics.log",
    "logLevel": "INFO",
    "logFileCount": 5,
    "logFileMaxAge": 28,
    "logFileSize": 2
Last modified September 27, 2022