Skip to content

🐳 Dockerized Zabbix with slack notifications, https and certificate authentication

License

Notifications You must be signed in to change notification settings

SamyCoenen/zabbix-xxl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is an adaptation on the docker-compose-v2.yml file from the zabbix-xxl repository. Beneath you can see information about the original project.

Usage

The docker-compose file is located in Dockerfile/zabbix-xxl/samy/ So go to the directory

$ git clone https://github.com/SamyCoenen/zabbix-xxl.git && cd zabbix-xxl/Dockerfile/zabbix-xxl/samy

Put your existing certificates for encryption and client authentication in ./certificates. There are already some example certificates available for the zabbix.vikingco.local domain. You will likely see a https if you don't import your own certificate. https

Put all the existing certificatekeys in ./certificatekeys

Change the api keys in the alertscripts/slack.sh script, full zabbix configuration guide for slack can be found on the repository from the original author. It works great. slack

Change the hostname in nginx/nginx.config.

And start everything with docker-compose

$ docker-compose up -d

Now import the client certificate client.p12 in your browser and go to your server IP or localhost. The browser will ask for the certificate .certificate

Self-signed certificates

If you plan to use self-signed certificates, here are some commands that might be usefull

openssl pkcs12 -export -clcerts -in client.crt -inkey client.key -out client.p12

openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 03 -out client.crt

openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out client.crt

openssl req -new -key client.key -out client.csr

openssl genrsa -des3 -out client.key 1024

Zabbix XXL

Zabbix XXL is a standard Zabbix prepared for Docker world. You must install Zabbix package (rpm, deb, ...) in the old world. Similarly you need to pull Zabbix Docker image in the Docker world. This Docker image contains standard Zabbix + additional XXL (community) extensions. Routine tasks such as import of Zabbix DB are automated, so it's prepared for easy deployment.

If you like or use this project, please provide feedback to author - Star it ★.

Overview of Monitoring Artist (dockerized) monitoring ecosystem:

Available Docker images

See README of zabbix-xxl for more details.

Compiled Zabbix (server, proxy, agent, java gateway, snmpd daemon) with almost all features (MySQL support, Java, SNMP, Curl, Ipmi, SSH, fping) and Zabbix web UI based on CentOS 7, Supervisor, Nginx, PHP. Image requires external MySQL/MariDB database (you can run MySQL/MariaDB as a Docker container). Integated XXL extensions: Searcher, Grapher, Zapix, template auto import, API command/script execution.

Zabbix XXL Zabbix searcher

See README of zabbix-db-mariadb for more details.

MariaDB container customized for Zabbix.

2.4 is not supported version - please use 3.0 version.

See README of zabbix-2.4 for more details.

Compiled Zabbix with almost all features (MySQL support, Java, SNMP, Curl, Ipmi, fping) and Zabbix web UI based on CentOS 7, Supervisor, Nginx, PHP. Image requires external MySQL database (you can run MySQL also as Docker container).

Docker troubleshooting

Use docker command to see if all required containers are up and running:

$ docker ps -f

Check online logs of Zabbix container:

$ docker logs zabbix

Sometimes you might just want to review how things are deployed inside a running container, you can do this by executing a bash shell through docker's exec command:

docker exec -ti zabbix /bin/bash

History of an image and size of layers:

docker history --no-trunc=true monitoringartist/zabbix-xxl | tr -s ' ' | tail -n+2 | awk -F " ago " '{print $2}'

Run specific Zabbix version, e.g. 3.0.0 - just specify 3.0.0 tag for image:

	docker run \
		-d \
		--name zabbix \
		-p 80:80 \
		-p 10051:10051 \
    	-v /etc/localtime:/etc/localtime:ro \
		--env="ZS_DBHost=database_ip" \
		--env="ZS_DBUser=username" \
		--env="ZS_DBPassword=my_password" \
		monitoringartist/zabbix-xxl:3.0.3

Customized Zabbix Docker images

Recommended example how to build custom Zabbix server on top of base image is million12/docker-zabbix-server. It provides custom features, such as Push notification, Slack and SMTP auth.

Support

Public Docker image monitoringartist/zabbix-xxl has best effort support. Please contact [email protected] for commercial support.

Security issues

Our Docker images are security scanned regularly. All detected vulnerabilities are fixed*:

  • Critical vulnerabilities - within 72 hours of notification
  • Major vulnerabilities - within 7 days of notification

*except Zabbix security issues, which will be reported directly to Zabbix vendor

Related Zabbix Docker projects

About Docker

Author

Devops Monitoring Expert, who loves monitoring systems and cutting/bleeding edge technologies: Docker, Kubernetes, ECS, AWS, Google GCP, Terraform, Lambda, Zabbix, Grafana, Elasticsearch, Kibana, Prometheus, Sysdig, ...

Summary:

Professional devops / monitoring / consulting services:

Monitoring Artist

About

🐳 Dockerized Zabbix with slack notifications, https and certificate authentication

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 55.5%
  • Shell 26.5%
  • PHP 11.1%
  • CSS 5.0%
  • Nginx 1.6%
  • Python 0.3%