Skip to main content

Enable logging and monitoring

Prometheus

To enable Prometheus, add addmetrics.prometheus.port=9190 to the node-config.system.properties file. For guidance on setting up alerts and understanding the available metrics, see the Set up Prometheus monitoring topic.

Generic logs

You have access to system logs in all containers and can set the log level to your desired level using the log4j2.yml file.

However, we do not recommend keeping the log level set to debug for extended periods, as this generates a large volume of logs and can quickly fill up disk space. Place this file in the mounted directory where all other node files are located: /data/chromia/node/node-mounted-files.

Configuration:
name: Default
monitorInterval: 30 # sec.

Appenders:
Console:
name: ConsoleAppender
target: SYSTEM_OUT
JSONLayout:
complete: false
compact: true
eventEol: true
stacktraceAsString: true
properties: true

Loggers:
Root:
level: warn
AppenderRef:
- ref: ConsoleAppender

Logger:
- name: net.postchain
level: info
additivity: false
AppenderRef:
- ref: ConsoleAppender