{"id":18030423,"url":"https://github.com/endersonmaia/docker-zabbix-server","last_synced_at":"2025-04-04T21:16:21.484Z","repository":{"id":26565154,"uuid":"30019209","full_name":"endersonmaia/docker-zabbix-server","owner":"endersonmaia","description":"Dockerized Zabbix Server daemon","archived":false,"fork":false,"pushed_at":"2015-02-11T18:23:51.000Z","size":260,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T05:43:45.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Tosh11/simulator","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/endersonmaia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-29T12:30:21.000Z","updated_at":"2017-10-17T19:47:49.000Z","dependencies_parsed_at":"2022-08-31T21:33:44.963Z","dependency_job_id":null,"html_url":"https://github.com/endersonmaia/docker-zabbix-server","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endersonmaia%2Fdocker-zabbix-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endersonmaia%2Fdocker-zabbix-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endersonmaia%2Fdocker-zabbix-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endersonmaia%2Fdocker-zabbix-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endersonmaia","download_url":"https://codeload.github.com/endersonmaia/docker-zabbix-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249544,"owners_count":20908212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T09:14:15.965Z","updated_at":"2025-04-04T21:16:21.458Z","avatar_url":"https://github.com/endersonmaia.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerized Zabbix Server daemon\n\nThis is a Zabbix Server Dockerfile base on the [baseimage-docker from phusion](http://phusion.github.io/baseimage-docker/).\n\n**Features** :\n\n* zabbix-server only;\n* [Slack](https://slack.com/) notification script;\n* Links to official [MySQL](https://registry.hub.docker.com/_/mysql/) and [PostgreSQL](https://registry.hub.docker.com/_/postgres/) docker images;\n* Has ODBC and FreeTDS pre-installed for database monitoring;\n\n-----------------------------------------\n\n**Related resources**:\n  [enderson/zabbix-server](https://github.com/endersonmaia/docker-zabbix-server) |\n  [enderson/zabbix-web](https://github.com/endersonmaia/docker-zabbix-web) |\n  [baseimage-docker](https://phusion.github.io/baseimage-docker/) |\n  [Docker registry](https://index.docker.io/u/phusion/baseimage/)\n\n-----------------------------------------\n\n**Table of contents**\n\n * [Introduction](#introduction)\n   * [Version](#version)\n   * [Contributing](#contributing)\n * [Quickstart](#quickstart)\n * [Using MySQL](#using-mysql)\n * [Using PostgreSQL](#using-postgresql)\n * [Starting a Zabbix Web container](#starting-a-zabbix-web-container)\n * [Checking it all](#checking-it-all)\n\n-----------------------------------------\n\n## Introduction\n\nThis is a Zabbix Server Dockerfile base on the [baseimage-docker from phusion](http://phusion.github.io/baseimage-docker/).\n\nFeatures :\n\n* zabbix-server only;\n* [Slack](https://slack.com/) notification script;\n* Links to official [MySQL Dockerfile](https://registry.hub.docker.com/_/mysql/)\n* Has ODBC and FreeTDS for database monitoring;\n\n### Version\n\nThe current version of the zabbix-server daemon is 2.4. I'll try to keep upgrades inside new docker tags.\n\n### Contributing\n\nIf you find this image useful here's how you can help:\n\n- Send a Pull Request with your awesome new features and bug fixes\n- Help new users with [Issues](https://github.com/enderson/docker-zabbix-server/issues) they may encounter\n\n## Quickstart\n\nConsidering you already have a MySQL server configured and running, just pass the correct variables, and zabbix-server will start running.\n\nChange the variable values to your situation.\n\n    $ docker run --name=zabbix-server -it --rm -p 10051:10051 \\\n    -e DB_TYPE=MYSQL\n    -e DB_HOST=169.254.0.1 \\\n    -e DB_NAME=zabbix-database \\\n    -e DB_USER=zabbix \\\n    -e DB_PASS=password \\\n    enderson/zabbix-server:2.4\n\nThe default version tag, is used for MySQL databases, to start a zabbix-server connecting to a PostgreSQL database, you should use VERSION-pgsql tag.\n\nFor example: \n\n    $ docker run enderson/zabbix-server:2.4-pgsql\n\nThe `DB_TYPE` environment variable could be `MYSQL` or `POSTGRESQL`.\n\n## Using MySQL\n\nFollow this instrunctions to setup a complete solution with MySQL, Zabbix Server and Zabbix Web using only Docker containers.\n\nCreate your MySQL database container with a [Data Volume Container](http://docs.docker.com/userguide/dockervolumes/#creating-and-mounting-a-data-volume-container).\n\n    $ docker create -v /dbdata --name zabbix-mysql-data mysql\n    $ docker run -d \\\n      -e MYSQL_ROOT_PASSWORD=zabbix \\\n      -e MYSQL_USER=zabbix \\\n      -e MYSQL_DATABASE=zabbix \\\n      -e MYSQL_PASSWORD=zabbix \\\n      --volumes-from zabbix-mysql-data \\\n      --name zabbix-mysql mysql\n    $ docker ps\n    CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS               NAMES\n    5282337a4056        mysql:5             \"/entrypoint.sh mysq   2 minutes ago       Up 2 minutes        3306/tcp            zabbix-mysql\n\nNow that your MySQL database server is up and runnig, start your Zabbix Server container.\n\n    $ docker run -d \\\n      -p 10051:10051 \\\n      --link zabbix-mysql:mysql \\\n      --name zabbix-server enderson/zabbix-server\n\nIn the previous command, we started a container named `zabbix-server` linked to the `zabbix-mysql` container using `mysql` as internal name, and exposed the port `10051` so you can configure any zabbix-agent do point to your Docker host, and will access the zabbix-server.\n\n## Using PostgreSQL\n\nFollow this instrunctions to setup a complete solution with PostgreSQL, Zabbix Server and Zabbix Web using only Docker containers.\n\nCreate your PostgreSQL database container with a [Data Volume Container](http://docs.docker.com/userguide/dockervolumes/#creating-and-mounting-a-data-volume-container).\n\n    $ docker create -v /dbdata --name zabbix-pgsql-data postgres\n    $ docker run -d \\\n      -e POSTGRES_USER=zabbix \\\n      -e POSTGRES_PASSWORD=zabbix \\\n      --volumes-from zabbix-pgsql-data \\\n      --name zabbix-pgsql postgres\n    $ docker ps\n    CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS               NAMES\n    6eebaa5eeec0        postgres:9          \"/docker-entrypoint.   2 hours ago         Up 2 hours          5432/tcp            postgresql\n\n\nNow that your PostgreSQL database server is up and runnig, start your Zabbix Server container.\n\n    $ docker run -d \\\n      -p 10051:10051 \\\n      --link zabbix-pgsql:postgres \\\n      --name zabbix-server enderson/zabbix-server:2.4-pgsql\n\n## Starting a Zabbix Web container\n\nIn the previous section, we started a container named `zabbix-server` linked to a `zabbix-mysql` or a `zabbix-pgsql` container using `postgres` as internal name, and exposed the port `10051` so you can configure any zabbix-agent do point to your Docker host, and will access the zabbix-server.\n\nNow you can start a [Zabbix Web container](http://github.com/enderson/docker-zabbix-web).\n\n### MySQL\n\nTo link your zabbix-web caontainer to the zabbix-server and MySQL container, use this command:\n\n    $ docker run -d \\\n      -p 80:80 \\\n      --link zabbix-mysql:mysql \\\n      --link zabbix-server:zbx \\\n      -e ZBX_SERVER_NAME=docker-zabbix-server \\\n      --name zabbix-web enderson/zabbix-web\n\n### PostgreSQL\n\nTo link your zabbix-web caontainer to the zabbix-server and PostgreSQL container, use this command:\n\n    $ docker run -d \\\n      -p 80:80 \\\n      --link zabbix-pgsql:postgres \\\n      --link zabbix-server:zbx \\\n      -e ZBX_SERVER_NAME=docker-zabbix-server \\\n      --name zabbix-web enderson/zabbix-web\n\n## Checking it all\n\nIn the previous sections, you linked the `zabbix-web` container woth the `zabbix-server` and `zabbix-mysql` ot `zabbix-pgsql` containers, and defined the `ZBX_SERVER_NAME`.\n\nAfter running all the commands, you should see something like this :\n\n    $ docker ps\n    CONTAINER ID        IMAGE                           COMMAND                CREATED             STATUS              PORTS                      NAMES\n    3654c423f660        enderson/zabbix-web:latest      \"/sbin/my_init\"        11 minutes ago      Up 11 minutes       0.0.0.0:80-\u003e80/tcp         zabbix-web\n    26aca480ae16        enderson/zabbix-server:latest   \"/sbin/my_init\"        14 minutes ago      Up 14 minutes       0.0.0.0:10051-\u003e10051/tcp   zabbix-server\n    3d111777c5fa        mysql:5                         \"/entrypoint.sh mysq   14 minutes ago      Up 14 minutes       3306/tcp                   zabbix-mysql\n\nAnd you should be able to access the Zabbix Web interface via http://DOCKER_HOST_PUBLIC_IP.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendersonmaia%2Fdocker-zabbix-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendersonmaia%2Fdocker-zabbix-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendersonmaia%2Fdocker-zabbix-server/lists"}