DevEX - reference for building teams, processes, and platforms
Florian Koch - Monitoring CoreOS with Zabbix
1. What’s special with CoreOS Container? Build the Container Challenges Disadvantages Thank You
Monitoring CoreOS with Zabbix
Florian Koch
Riga September 2015
2. What’s special with CoreOS Container? Build the Container Challenges Disadvantages Thank You
• CoreOS has readonly /usr
• No package manager!
• Build your own CoreOS image to add packages
• Compile a static linked Zabbix Agent
• Copy to the CoreOS system, fire it up and you are done?
3. What’s special with CoreOS Container? Build the Container Challenges Disadvantages Thank You
• This does not scale, using containers as ”packages”
• We use the rkt (Rocket) container manager
• Containers need a rootfs, which base rootfs will we use?
• CentOS 7 minimal rootfs is 170 MB
• Extracted from docker image
• 170 MB only to run the Zabbix Agent?
4. What’s special with CoreOS Container? Build the Container Challenges Disadvantages Thank You
• no, we don’t need a rootfs, Zabbix Agent is static linked!
• Create the needed directory structure
• Copy the binary and config into the structure
• Build the Container, the final image is 600 KB
• That’s less than 1 Percent from the CentOS rootfs
5. What’s special with CoreOS Container? Build the Container Challenges Disadvantages Thank You
• Managing the Agent config inside the container
• Generate the config at build time
• Build the config management into the container
• Build an sidekick container with config management
• Mount a file from the host
• Environment vars & sed magic
• more tools inside needed
6. What’s special with CoreOS Container? Build the Container Challenges Disadvantages Thank You
• / from the host is mounted at /opt/root
• Zabbix Agent can not log to stdout
• Not all checks are currently working
• The Problem are the kernel namespaces
• No way to disable all kernel namespaces with rkt at the
moment
• The rkt (Rocket) guys working on this.
7. What’s special with CoreOS Container? Build the Container Challenges Disadvantages Thank You
Thank you for your attention
Sources on github.com/f0/rkt-zabbix-agent
Many thanks to #zabbix irc channel – always helpful