Monitoring Metronome
In this recipe, you will learn how to collect logs and metrics from Metronome.
How to do it...
By default, Metronome writes logs to stdout
. Logs are managed by logback.conf
, where we can define our custom appender, change what is logged, and change log patterns.
For example, we can extend the stacktrace size from the default 10 to 20 lines. To do this, open /opt/mesosphere/metronome-0.1.9/conf/logback.conf,
find the STDOUT
appender, and change the following code:
<pattern>%coloredLevel %logger{15} - %message%n%xException{10}</pattern>
Change it to the following code:
<pattern>%coloredLevel %logger{15} - %message%n%xException{20}</pattern>
before level information to datetime in log.
Now after the service Metronome restart, you can view your logs with:
sudo journalctl -f -u metronome
Unfortunately, Metronome does not provide bindings for external monitoring services such as Logstash, Graphite, or Datadog. Logs must be aggregated and parsed by other tools...