Enabling Mesos Logging

By Bill Ward | April 8, 2017

Learn the steps necessary to enable logging on your mesos masters and slaves. This post is a precursor to passing those logs to Logstash.

This post assumes that you already have Mesos installed and configured. If you don’t then see my article CONFIGURING A MESOS/MARATHON CLUSTER ON UBUNTU 16.04.

Enable logging

We are going to be adding the “‘–cluster=admintome –log_dir=/var/log/mesos”’ option to our mesos execution.

Mesos Masters

Update the /etc/systemd/system/mesos-master.service systemd service file

Description=Mesos Master Service

ExecStart=/usr/local/sbin/mesos-master --ip= --work_dir=/var/lib/mesos --zk=zk://,, --quorum=2  --cluster=admintome --log_dir=/var/log/mesos


Restart your mesos-master service

systemctl restart mesos-master.service

Mesos Slaves

”’ [Unit] Description=Mesos Slave Service

[Service] ExecStart=/usr/local/sbin/mesos-slave –master=zk://,, –work_dir=/var/lib/mesos3 –containerizers=docker,mesos –executor_registration_timeout=5mins

[Install] WantedBy=multi-user.target “’

Restart your mesos-slave service

systemctl restart mesos-slave.service

Viewing logs

You can now see the logs in the /var/log/mesos/ directory.


Now that you have logging enabled for mesos, send them to Logstash by following my article Sending mesos logs to Elasticsearch Logstash Kibana (ELK stack)

Subscribe to our mailing list

indicates required
Email Format

comments powered by Disqus
Google Analytics Alternative