Learn the steps necessary to enable Mesos 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


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)


I hope you have enjoyed this article, if so please leave a comment below.  For more articles, please signup for the AdminTome Blog below.  Also please feel free to share the article to your friends using the buttons to the left.  Thanks again for reading this post.

Signup for the AdminTome Blog Newsletter

Get weekly updates from AdminTome Blog including the latest articles and special content only for subscribers.

privacy We value your privacy and would never spam you

%d bloggers like this: