Coder Social home page Coder Social logo

zabbix / zabbix-docker Goto Github PK

View Code? Open in Web Editor NEW
2.3K 2.3K 1.4K 34.36 MB

Official Zabbix Dockerfiles

Home Page: https://www.zabbix.com

License: GNU Affero General Public License v3.0

Shell 55.86% PHP 7.70% Dockerfile 34.80% PowerShell 1.63%
docker docker-image monitoring zabbix

zabbix-docker's Introduction

Zabbix logo

An enterprise-class, open-source distributed monitoring solution that’s designed to monitor the performance and availability of network devices, servers, services, and other IT resources. Zabbix is a flexible solution that can monitor anything from a simple, standalone application to a large-scale environment, with features including:

  • Resource discovery: Discover network entities, server resources, and onboard/offboard devices. Use out-of-the-box integrations (templates) to monitor anything form a low-level device to a SAAS service.
  • Metric acquisition: Use an agent or agent-less approach for metric acquisition from any source – devices, sensors, operating systems, virtualization platforms, container platforms like Docker, Kubernetes, cloud infrastructures, databases, webpages, Java ecosystems, application servers, API endpoints, business applications, and many more.
  • Root cause analysis and problem detection: Count on high-performance, real-time problem detection that correlates both existing and incoming problems and performs root cause analyses.
  • Incidents, alerts, and notifications: Receive an alert when an issue is triggered (proactively or post-mortem) in the ecosystem. Use multiple messaging channels (including Slack, JIRA, Microsoft Teams, email or text messages) to get notified about the different types of events occurring in your environment.
  • “Single pane of glass” overview: Visualize collected data and monitoring events in graphs, lists, geomaps, and network topology maps.
  • Multitenancy and distributed monitoring: Enjoy the convenience of one monitoring solution for multiple data centers, departments, and organizations, and monitor remote locations behind firewalls with remote command execution capability.
  • Unparalleled flexibility: Adapt Zabbix to your needs and utilize built-in functionalities, including the ability to stream metrics and events over HTTP, reporting, auditing, security, service SLA calculations, and many more.

Get started

Documentation

Zabbix documentation is available at zabbix.com/documentation

License

Zabbix is distributed under AGPL-3.0-only

zabbix-docker's People

Contributors

avladishev avatar dependabot[bot] avatar dotneft avatar kernbug avatar sokurenko avatar step-security-bot avatar v-zhuravlev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zabbix-docker's Issues

Zabbix server thinks it's out of disk space

I'm not exactly sure where this problem lies. I was running this zabbix setup with docker-compose on an EC2 instance with 10GB of EBS storage. It was running a bit low (< 200MB) so I upped the size to 50GB. df on the server shows that everything was extended properly, but the Zabbix server somehow thinks it's still out of disk space. I have a Zabbix Server dashboard on a Grafana instance on the "Free disk space on / (percentage)" had dropped to below 1%, and now says "N/A".

Unless I am misunderstanding, all the data should pretty much be in the database (postgres in my case), which is in a volume mounted to the host machine.

Nothing in docker system df seems to show any problems with the container size. It's less than 300MB. I tried execing into the running container and checking via df there. It all appears to be fine.

This problem is compounded by the fact that when I start the Zabbix docker image, it starts completely pegging the CPU and making the machine unusable, which makes it hard to debug.

The git version I'm on is 1ced9ed from Dec 1.

Add unixODBC drivers

I use Zabbix to monitor SQL Server via unixODBC, I have my own Dockerfile to add the FreeTDS unixODBC drivers, so I can connect to it.

I think this should be available in this official image, and the ODBC configuration could be injected via volumes (/etc/odbc.ini, /etc/odbcinst.ini).

If the maintainers are OK with this approach, I can work on a PR for this.

Feel free to suggest other approaches to this issue.

Zabbix agent read values wrong

It seems that the agent inside the docker report wrong values,
seems that all the values are wrong.

In particular - disk space, memory, average load

zabbix-web-nginx-mysql: Zabbix API ERROR

After loading graphs for a period of time for about a day or more (in Grafana 4.1.1), I faced Zabbix API ERROR, which seems to be caused by this error in nginx log:

[crit] 33#33: *322 open() "/var/cache/nginx/fastcgi_temp/6/00/0000000006" failed (13: Permission denied) while reading upstream, cli
ent: 10.250.0.21, server: zabbix, request: "POST /api_jsonrpc.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "zabbix.domain.com", referrer: "http://grafana.domain.com:3000/dashboard/db/common?editorTab=Display&from=now-24h&to=now"

Here's some additional info:

:/var/cache# ll
total 24
drwxr-xr-x 11 root root 4096 Jan 30 17:29 ./
drwxr-xr-x 22 root root 4096 Jan 30 17:29 ../
drwxr-xr-x  3 root root 4096 Dec 23 13:01 apt/
drwxr-xr-x  2 root root 4096 Dec 23 13:02 debconf/
drwx------  2 root root 4096 Dec 23 13:03 ldconfig/
drwxr-xr-x 12 root root 4096 Jan 30 17:29 nginx/

:/var/cache# ll /var/cache/nginx/
total 28
drwxr-xr-x 12 root     root 4096 Jan 30 17:29 ./
drwxr-xr-x 11 root     root 4096 Jan 30 17:29 ../
drwx------  2 www-data root 4096 Dec 23 13:02 client_temp/
drwx------  2 www-data root 4096 Dec 23 13:02 fastcgi_temp/
drwx------  2 www-data root 4096 Dec 23 13:02 proxy_temp/
drwx------  2 www-data root 4096 Dec 23 13:02 scgi_temp/
drwx------  2 www-data root 4096 Dec 23 13:02 uwsgi_temp/

# ps aux |grep [n]ginx
root        30  0.0  0.1  41856  5584 ?        S    17:29   0:00 nginx: master process /usr/sbin/nginx -g daemon off; -c /etc/nginx/nginx.conf
www-data    32  0.0  0.1  44468  7924 ?        S    17:29   0:00 nginx: worker process
www-data    33  0.0  0.1  44588  8024 ?        S    17:29   0:00 nginx: worker process
www-data    34  0.0  0.2  46396  9576 ?        S    17:29   0:00 nginx: worker process
www-data    35  0.0  0.1  43992  4948 ?        S    17:29   0:00 nginx: worker process
www-data    36  0.0  0.1  43992  4948 ?        S    17:29   0:00 nginx: worker process
root        61  0.0  0.0  18332  2208 ?        S+   17:39   0:00 grep --color=auto nginx

How can I fix this? Thanks in advance.

Does the zabbix-docker images work with docker engine swarm mode?(1.12+)

Hi!

We want to use docker's new engine swarm mode (1.12+) and the zabbix images. My docker swarm runs currently:

DockerName : DockerImage : DockerNetwork : publicports
zabbix-postgres : postgres:9.6.1-alpine : zabbix-network : none
zabbix-server : zabbix/zabbix-server-pgsql:alpine-3.2-latest : zabbix-network : none
zabbix-web : zabbix/zabbix-web-nginx-pgsql:alpine-3.2-latest : zabbix-network : 80:80
zabbix-agent : zabbix/zabbix-agent:alpine-3.2-latest : zabbix-network : none

The zabbix-agent has a constraint so that it always run on a special node (the docker swarm manager).

Zabbix-server starts, creates db schema, I can login and add hosts. The fact that the running docker images are all inside the same docker networks also means that they can reach each other via DockerName.

Now I try to add the running zabbix-agent as a host to the zabbix-server (which is the same physical machine btw). Therefore I changed the Agent interface from ip address to dns name zabbix-agent, switched to dns and updated the zabbix-agent host. After enabling the host I get the following error in the web interface.

Received empty response from Zabbix Agent at [zabbix-agent]. Assuming that agent dropped connection because of access permissions.

When printing the zabbix-agent logs I see the following errors:

57:20161128:105614.513 no active checks on server [zabbix-server:10051]: host [5cafc50bc2b6] not found
55:20161128:105652.359 failed to accept an incoming connection: connection from "10.0.0.6" rejected, allowed hosts: "zabbix-server"
54:20161128:105752.426 failed to accept an incoming connection: connection from "10.0.0.6" rejected, allowed hosts: "zabbix-server"
57:20161128:105814.586 no active checks on server [zabbix-server:10051]: host [5cafc50bc2b6] not found
54:20161128:105852.491 failed to accept an incoming connection: connection from "10.0.0.6" rejected, allowed hosts: "zabbix-server"
56:20161128:105952.561 failed to accept an incoming connection: connection from "10.0.0.6" rejected, allowed hosts: "zabbix-server"
57:20161128:110014.660 no active checks on server [zabbix-server:10051]: host [5cafc50bc2b6] not found
55:20161128:110052.632 failed to accept an incoming connection: connection from "10.0.0.6" rejected, allowed hosts: "zabbix-server"
54:20161128:110152.701 failed to accept an incoming connection: connection from "10.0.0.6" rejected, allowed hosts: "zabbix-server"
57:20161128:110214.730 no active checks on server [zabbix-server:10051]: host [5cafc50bc2b6] not found

But here you can see that the host with the container id 5cafc50bc2b6 is running.

image

What am I doing wrong? Any help? Thanks!

zabbix-server cannot ping

Currently the user "zabbix" in the zabbix-server environment cannot ping a host because of permission problems:

$ docker run --rm -it --user=100  zabbix/zabbix-server-mysql -c "ping 8.8.8.8"
  PING 8.8.8.8 (8.8.8.8): 56 data bytes
  ping: permission denied (are you root?)

No - AllowRoot Option

i tried accessing the container to manually update the zabbx_agentd.conf to allowroot=1, and restarted the container with no success.

can we get this configuration option added to the ZBX_ variables?

zabbix-server images: wrong volume path /usr/lib/zabbix/alertscripts, /usr/lib/zabbix/externalscripts

The default values of AlertScriptsPath and ExternalScripts are /usr/share/zabbix/alertscripts and /usr/share/zabbix/externalscripts, but we specify two volumes which path start with /usr/lib/zabbix, it was a mistake.

I thought there are two ways able to fix it:

  1. add option --datadir=/usr/lib to configure.
  2. change volume path to /usr/share/zabbix/alertscripts and /usr/share/zabbix/externalscripts directly.

Any ideas? :-)

server-pgsql always tries to create schema

Table exists check is for table public.dbversion:
https://github.com/zabbix/zabbix-docker/blob/3.2/server-pgsql/alpine/run_zabbix_component.sh#L339

If the table exists the version is retrieved from a table in the wrong schema (zabbix.dbversion):
https://github.com/zabbix/zabbix-docker/blob/3.2/server-pgsql/alpine/run_zabbix_component.sh#L344
'zabbix' being the default database name; but in the query the database name is used as schema name.

Also the comment https://github.com/zabbix/zabbix-docker/blob/3.2/server-pgsql/alpine/run_zabbix_component.sh#L348 is not correct, the schema.sql create script uses the default schema 'public', not a schema with the same name as de database.

Basically the database name is sometimes misused as schema name.

Upgrading from e.g. 2.4 is not straighforward like this. The database is 2.4. Because the version detection fails zabbix-server tries to create a fresh database. Apart from the already exists errors new 3.x tables are created. Afterwards the database upgrade is triggered and fails on already existing tables.

A workaround is to add a pg view 'zabbix.dbversion' to the database, which is 'select * from public.dbversion' before you start the zabbix-server container for the first time.

Fping false response

Any host I register on Zabbix return "is alive":

bash-4.3# fping 10.42.0.31
10.42.0.31 is alive
bash-4.3# fping 10.42.0.32
10.42.0.32 is alive
bash-4.3# fping 10.42.0.33
10.42.0.33 is alive
bash-4.3# fping 10.10.10.10
10.10.10.10 is alive
bash-4.3# fping 1.2.0.9
1.2.0.9 is alive

Image: zabbix/zabbix-server-mysql:latest

zabbix-server-pgsql won't start without POSTGRES_USER set

If POSTGRES_USER is not set, DB_SERVER_ROOT_USER is initialized with postgres default which is not documented in the image description, therefore PG availability check keeps failing forever (see

while [ ! "$(psql -h ${DB_SERVER_HOST} -p ${DB_SERVER_PORT} -U ${DB_SERVER_ROOT_USER} -l -q 2>/dev/null)" ]; do
):

**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...
**** PostgreSQL server is not available. Waiting 5 seconds...

The description of POSTGRES_USER is therefore misleading as it implies that there're defaults which the image can work with.

Setting POSTGRES_USER to zabbix explicitly fixes this.

Encryption

Hello, i'm trying to set up TLS encryption between zabbix server container and several agent instances.
I have CA\Certificates\Keys, and i was test my configuration on virtual environment (without docker). But in production zabbix working in docker. The problem is after the copying certs\keys into exposed volume on host and starting container, zabbix_server.conf file is always clearing by initial script:(/run_zabbix_component.sh). I was tryed to set certs\keys location via variables defined in this script, but without luck.
Please help.

How can I continue to using zabbix images

Hello. I was using zabbix in my docker image this way:

FROM zabbix/zabbix-3.0:latest

But after 2 months I need to rebuild it and getting:

Build failed: Error: image zabbix/zabbix-3.0:latest not found

Is there any howto for migrating to new docker images from old ones?

zabbix-web-nginx-mysql works with non-root path?

I'm trying to use a haproxy in front of zabbix-web-nginx-mysql container. My intention is to access zabbix webui through this address: http://i.sb/mon/admin. This is my haproxy.cfg:

global
    pidfile /var/run/haproxy.pid
    tune.ssl.default-dh-param 2048

    # disable sslv3, prefer modern ciphers
    ssl-default-bind-options no-sslv3
    ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS

    ssl-default-server-options no-sslv3
    ssl-default-server-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS

resolvers docker
    nameserver dns 127.0.0.11:53

defaults
    mode    http
    balance roundrobin

    option  dontlognull
    option  dontlog-normal
    option  http-keep-alive
    option  forwardfor
    option  redispatch

    errorfile 400 /errorfiles/400.http
    errorfile 403 /errorfiles/403.http
    errorfile 405 /errorfiles/405.http
    errorfile 408 /errorfiles/408.http
    errorfile 429 /errorfiles/429.http
    errorfile 500 /errorfiles/500.http
    errorfile 502 /errorfiles/502.http
    errorfile 503 /errorfiles/503.http
    errorfile 504 /errorfiles/504.http

    maxconn 5000
    timeout connect 5s
    timeout client  20s
    timeout server  20s
    timeout queue   30s
    timeout tunnel  3600s
    timeout http-request 5s
    timeout http-keep-alive 15s


frontend services
    bind *:80
    bind *:443 ssl crt-list /cfg/crt-list.txt
    mode http

    acl url_mon_zabbix-web80 path_dir /mon/admin
    use_backend mon_zabbix-web-be80 if url_mon_zabbix-web80


backend mon_zabbix-web-be80
    mode http
    server mon_zabbix-web mon_zabbix-web:80

mon_zabbix-web is the DNS name of zabbix-web-nginx-mysql service. I'm running it in a swarm cluster environment.

When I access http://i.sb/mon/admin from web browser, the ui is trying to acess the static content (css,assets,js, etc...) in http://i.sb/mon, causing an error:

image

Am I making a mistake in haproxy.cfg? How could I make this proxy configuration works as I want?

PostgreSQL server is not available. Waiting 5 seconds

Hello,

I have a postgres container running that allows outside communications with it on port 5432. I can connect with my pgadmin client into it with user zabbix and password (let's say) zabbix. I can also connect to it from another bash container without issues.

When I run my zabbix-server-pgsql docker with the following code:
docker run --name zabbix-server-pgsql -e DB_SERVER_HOST="127.0.0.1" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -d zabbix/zabbix-server-pgsql:alpine-3.2.6

I get logs such as these:
`** Deploying Zabbix server with postgresql database
** Preparing the system
** Preparing Zabbix server


  • DB_SERVER_HOST: 127.0.0.1
  • DB_SERVER_PORT: 5432
  • DB_SERVER_DBNAME: zabbix
  • DB_SERVER_ZBX_USER: zabbix
  • DB_SERVER_ZBX_PASS: zabbix

**** PostgreSQL server is not available. Waiting 5 seconds...
`

I've searched Google for the above 5 seconds message to find nothing but an unrelated issue ion this forum involving an agent.

Can anyone nudge me in the right direction please?

Regards.

Marc.

zabbix-agent reject connection from zabbix-server

zabbix-agent:log

zabbix-server_zabbix-agent_1 | 2016-12-01T05:38:14.639350807Z  29807:20161201:133814.638 failed to accept an incoming connection: connection from "172.18.1.5" rejected, allowed hosts: "zabbix-server"
zabbix-server_zabbix-agent_1 | 2016-12-01T05:39:14.654746331Z  29809:20161201:133914.654 failed to accept an incoming connection: connection from "172.18.1.5" rejected, allowed hosts: "zabbix-server"

docker-compose.yml

zabbix-server:
  image: zabbix/zabbix-server-mysql:alpine-3.2-latest
  ports:
   - "10051:10051"
  volumes:
   - /etc/localtime:/etc/localtime:ro
   - /etc/timezone:/etc/timezone:ro
   - /data/docker/zabbix/server/alertscripts:/usr/lib/zabbix/alertscripts
   - /data/docker/zabbix/server/externalscripts:/usr/lib/zabbix/externalscripts:ro
   - /data/docker/zabbix/server/modules:/var/lib/zabbix/modules:ro
   - /data/docker/zabbix/server/enc:/var/lib/zabbix/enc:ro
   - /data/docker/zabbix/server/ssh_keys:/var/lib/zabbix/ssh_keys:ro
   - /data/docker/zabbix/server/mibs:/var/lib/zabbix/mibs:ro
  links:
   - mysql-server:mysql-server
   - zabbix-agent:zabbix-agent
  ulimits:
   nproc: 65535
   nofile:
    soft: 20000
    hard: 40000
   mem_limit: 512m
  environment:
    #- .env_db_mysql
    #- .env_srv

    - MYSQL_USER=zabbix
    # MYSQL_PASSWORD=zabbix
    - MYSQL_PASSWORD=password
    # MYSQL_ROOT_PASSWORD=
    - MYSQL_ROOT_PASSWORD=password
    # MYSQL_ALLOW_EMPTY_PASSWORD=false
    # MYSQL_DATABASE=zabbix
    - MYSQL_DATABASE=zabbix
  user: root
  # networks:
  #   zbx_net:
  #     aliases:
  #      - zabbix-server
  #      - zabbix-server-mysql
  #      - zabbix-server-alpine-mysql
  #      - zabbix-server-mysql-alpine
zabbix-web-nginx-mysql:
  image: 'zabbix/zabbix-web-nginx-mysql:alpine-3.2-latest'
  ports:
   - "8081:80"
   #- "8443:443"
  links:
   - mysql-server:mysql-server
   - zabbix-server:zabbix-server
  mem_limit: 512m
  volumes:
   - /etc/localtime:/etc/localtime:ro
   - /etc/timezone:/etc/timezone:ro
   - /data/docker/zabbix/web/ssl/nginx:/etc/ssl/nginx:ro
   - /data/docker/zabbix/web/simhei.ttf:/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf:ro
  environment:
  #  - .env_db_mysql
  #  - .env_web
    - TZ=Asia/Shanghai
    - MYSQL_USER=zabbix
    # MYSQL_PASSWORD=zabbix
    - MYSQL_PASSWORD=password
    # MYSQL_ROOT_PASSWORD=
    - MYSQL_ROOT_PASSWORD=password
    # MYSQL_ALLOW_EMPTY_PASSWORD=false
    # MYSQL_DATABASE=zabbix
    - MYSQL_DATABASE=zabbix
  user: root
  # networks:
  #   zbx_net:
  #     aliases:
  #      - zabbix-web-nginx-mysql
  #      - zabbix-web-nginx-alpine-mysql
  #      - zabbix-web-nginx-mysql-alpine 
mysql-server:
  image: mysql:5.7
  volumes:
    - /data/docker/zabbix/mysql/data:/var/lib/mysql
    - /data/docker/zabbix/mysql/docker.cnf:/etc/mysql/conf.d/docker.cnf
  ports:
    - "6033:3306"
  environment:
  #  - .env_db_mysql
    - MYSQL_USER=zabbix
    # MYSQL_PASSWORD=zabbix
    - MYSQL_PASSWORD=password
    # MYSQL_ROOT_PASSWORD=
    - MYSQL_ROOT_PASSWORD=password
    # MYSQL_ALLOW_EMPTY_PASSWORD=false
    # MYSQL_DATABASE=zabbix
    - MYSQL_DATABASE=zabbix
  user: root
#   networks:
#     zbx_net:
#       aliases:
#        - mysql-server
#        - zabbix-database
#        - mysql-database
zabbix-agent:
  image: zabbix/zabbix-agent:alpine-3.2-latest
  environment:
   #- ZBX_HOSTNAME=zabbix-server
   #- ZBX_SERVER_HOST=192.168.0.11
  ports:
   - "10050:10050"
  volumes:
   - /etc/localtime:/etc/localtime:ro
   - /etc/timezone:/etc/timezone:ro
   - /data/docker/zabbix/agent/zabbix_agentd.d:/etc/zabbix/zabbix_agentd.d:ro
   - /data/docker/zabbix/agent/modules:/var/lib/zabbix/modules:ro
   - /data/docker/zabbix/agent/enc:/var/lib/zabbix/enc:ro
   - /data/docker/zabbix/agent/ssh_keys:/var/lib/zabbix/ssh_keys:ro
  links:
   #- zabbix-server:zabbix-server
  user: root
  privileged: true
  pid: "host"
  # networks:
  #   zbx_net:
  #     aliases:
  #      - zabbix-agent
  #      - zabbix-agent-passive
  #      - zabbix-agent-alpine

disk space usage statistics on host

Hi all! I'm trying to use zabbix-agent on CoreOS and see mostly statistics inside docker container. What I need to mount into zabbix-agent to see volume stats of the host?

Database Error: Unable to select configuration.

Hi,

I used docker-compose_v2_ubuntu_mysql_latest.yaml and this error is displayed:

Database Error: Unable to select configuration.

I see at log that zabbix-proxy-mysql_1 and zabbix-proxy-sqlite3_1 are unable to connect to server zabbix-server.

Wrong fping and fping6 path in alpine-images

Fping's in alpine images located at /usr/sbin/ but in run_zabbix_component.shused /usr/bin/

update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping"
update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6"

should be

update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6"

zabbix-web-nginx-pgsql:alpine-latest does not appear to have been updated to 3.4.0

zabbix-web-nginx-pgsql does not appear to have been updated to 3.4.0. Installing zabbix-server-pgsql:latest and letting it upgrade the database causes zabbix-web-nginx-pgsql:alpine-latest to fail with the following error:

Database error
The frontend does not match Zabbix database. Current database version (mandatory/optional): 3040000/3040000. Required mandatory version: 3020000. Contact your system administrator.

Entering the container and changing define('ZABBIX_DB_VERSION', 3020000); to define('ZABBIX_DB_VERSION', 3040000); allows me to log in but then many SQL errors displayed in place of every widget and the version at the bottom of the screen is 'Zabbix 3.2.6. © 2001–2017, Zabbix SIA'

docker-compose error "cannot use database "zabbix": Zabbix server cannot work with a Zabbix proxy database"

I cleaned up the docker-compose_v2_ubuntu_mysql_latest.yaml to my needs. Then just fired a docker-compose up but always getting this error. I can't find the cause for.

already removed all containers and zbx_env multible times.

`version: '2'

services:
zabbix-server:
image: zabbix/zabbix-server-mysql:ubuntu-3.4-latest
ports:

  • "10051:10051"
    volumes:
  • /etc/localtime:/etc/localtime:ro
  • /etc/timezone:/etc/timezone:ro
  • ./zbx_env/usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts:ro
  • ./zbx_env/usr/lib/zabbix/externalscripts:/usr/lib/zabbix/externalscripts:ro
  • ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro
  • ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
  • ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
  • ./zbx_env/var/lib/zabbix/mibs:/var/lib/zabbix/mibs:ro
    volumes_from:
  • zabbix-snmptraps:ro
    links:
  • mysql-server:mysql-server
  • zabbix-java-gateway:zabbix-java-gateway
  • zabbix-snmptraps:zabbix-snmptraps
    ulimits:
    nproc: 65535
    nofile:
    soft: 20000
    hard: 40000
    mem_limit: 512m
    env_file:
  • .env_db_mysql
  • .env_srv
    user: root
    networks:
    zbx_net:
    aliases:
    • zabbix-server
    • zabbix-server-mysql
    • zabbix-server-ubuntu-mysql
    • zabbix-server-mysql-ubuntu
      labels:
      com.zabbix.description: "Zabbix server with MySQL database support"
      com.zabbix.company: "Zabbix SIA"
      com.zabbix.component: "zabbix-server"
      com.zabbix.dbtype: "mysql"
      com.zabbix.os: "ubuntu"

zabbix-web-nginx-mysql:
image: zabbix/zabbix-web-nginx-mysql:ubuntu-3.4-latest
ports:

  • "8081:80"
  • "8443:443"
    links:
  • mysql-server:mysql-server
  • zabbix-server:zabbix-server
    mem_limit: 512m
    volumes:
  • /etc/localtime:/etc/localtime:ro
  • /etc/timezone:/etc/timezone:ro
  • ./zbx_env/etc/ssl/nginx:/etc/ssl/nginx:ro
    env_file:
  • .env_db_mysql
  • .env_web
    user: root
    networks:
    zbx_net:
    aliases:
    • zabbix-web-nginx-mysql
    • zabbix-web-nginx-ubuntu-mysql
    • zabbix-web-nginx-mysql-ubuntu
      labels:
      com.zabbix.description: "Zabbix frontend on Nginx web-server with MySQL database support"
      com.zabbix.company: "Zabbix SIA"
      com.zabbix.component: "zabbix-frontend"
      com.zabbix.webserver: "nginx"
      com.zabbix.dbtype: "mysql"
      com.zabbix.os: "ubuntu"

zabbix-agent:
image: zabbix/zabbix-agent:ubuntu-3.4-latest
ports:

  • "10050:10050"
    volumes:
  • /etc/localtime:/etc/localtime:ro
  • /etc/timezone:/etc/timezone:ro
  • ./zbx_env/etc/zabbix/zabbix_agentd.d:/etc/zabbix/zabbix_agentd.d:ro
  • ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro
  • ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
  • ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
    links:
  • zabbix-server:zabbix-server
    env_file:
  • .env_agent
    user: root
    privileged: true
    pid: "host"
    networks:
    zbx_net:
    aliases:
    • zabbix-agent
    • zabbix-agent-passive
    • zabbix-agent-ubuntu
      labels:
      com.zabbix.description: "Zabbix agent"
      com.zabbix.company: "Zabbix SIA"
      com.zabbix.component: "zabbix-agentd"
      com.zabbix.os: "ubuntu"

zabbix-java-gateway:
image: zabbix/zabbix-java-gateway:ubuntu-3.4-latest
ports:

  • "10052:10052"
    env_file:
  • .env_java
    user: root
    networks:
    zbx_net:
    aliases:
    • zabbix-java-gateway
    • zabbix-java-gateway-ubuntu
      labels:
      com.zabbix.description: "Zabbix Java Gateway"
      com.zabbix.company: "Zabbix SIA"
      com.zabbix.component: "java-gateway"
      com.zabbix.os: "ubuntu"

zabbix-snmptraps:
image: zabbix/zabbix-snmptraps:ubuntu-3.4-latest
ports:

  • "162:162/udp"
    volumes:
  • ./zbx_env/var/lib/zabbix/snmptraps:/var/lib/zabbix/snmptraps:rw
    user: root
    networks:
    zbx_net:
    aliases:
    • zabbix-snmptraps
      labels:
      com.zabbix.description: "Zabbix snmptraps"
      com.zabbix.company: "Zabbix SIA"
      com.zabbix.component: "snmptraps"
      com.zabbix.os: "ubuntu"

mysql-server:
image: mysql:5.7
volumes_from:
- db_data_mysql
volume_driver: local
env_file:

  • .env_db_mysql
    user: root
    networks:
    zbx_net:
    aliases:
    • mysql-server
    • zabbix-database
    • mysql-database

db_data_mysql:
image: busybox
volumes:
- ./zbx_env/var/lib/mysql:/var/lib/mysql:rw

networks:
zbx_net:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
gateway: 172.16.238.1

- subnet: 2001:3984:3989::/64

gateway: 2001:3984:3989::1

`

Container discovery and monitoring

Hello,

Any immediate plans to support discovery of containers in the agent, as well as monitoring some key metrics from each container?

Cannot start service zabbix-server: invalid header field value "oci runtime error: container_linux.go:247

cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

docker info
Containers: 11
Running: 4
Paused: 0
Stopped: 7
Images: 16
Server Version: 1.12.5
Storage Driver: devicemapper
Pool Name: docker-8:2-538046865-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 2.379 GB
Data Space Total: 107.4 GB
Data Space Available: 105 GB
Metadata Space Used: 6.087 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.141 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use --storage-opt dm.thinpooldev to specify a custom block storage device.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.135-RHEL7 (2016-09-28)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 3.10.0-514.2.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 3
Total Memory: 15.02 GiB
Name: zabbix.local
ID: 3YMA:L65F:P7N3:WLOE:CZUW:JFLW:KKPT:AQ72:M3QW:BT7C:DKCB:XGQR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8

cd zabbix-docker
docker-compose -f ./docker-compose_v2_ubuntu_pgsql_latest.yaml up -d

ERROR: for zabbix-server Cannot start service zabbix-server: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:53: mounting \\\"/etc/timezone\\\" to rootfs \\\"/var/lib/docker/devicemapper/mnt/6ef9fd12f3485ea8ecdebbca6e8e025afb7ca418035ff02b0362b8294888ae26/rootfs\\\" at \\\"/var/lib/docker/devicemapper/mnt/6ef9fd12f3485ea8ecdebbca6e8e025afb7ca418035ff02b0362b8294888ae26/rootfs/etc/timezone\\\" caused \\\"not a directory\\\"\""\n"
ERROR: Encountered errors while bringing up the project.

Could not work by using image zabbix-web-*-mysql when using overlay storage driver

Here is my test environment:

key value
OS CentOS 7.2.1511 (Core)
Kernel 3.10.0-327.3.1.el7.x86_64
Docker 1.13.0, build 49bf474
Storage Driver overlay

I think the root cause may the storage driver, and I change the driver to devicemapper, these problems are gone. Maybe related to moby/moby#12327 , consider update kernel to resolve it.

Only these 4 images I tested, others are not tested.

Time is 2017-02-07
Image tag is latest, 55 MB, 17 days ago

REPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE
zabbix/zabbix-web-apache-mysql   latest              8b6a65b030b6        2 weeks ago         178 MB
zabbix/zabbix-web-nginx-mysql    latest              863b950a6ade        2 weeks ago         176 MB
zabbix/zabbix-web-apache-mysql   ubuntu-latest       12462fde1eec        2 weeks ago         336 MB
zabbix/zabbix-web-nginx-mysql    ubuntu-latest       68ce36486a28        2 weeks ago         336 MB
  1. zabbix web alpine apache mysql could not create pid file to directory /run/apache2/ because this is no directory in /run.
docker run --name zabbix-web-apache-mysql --link zabbix-db-mysql --link zabbix-server -e DB_SERVER_HOST="zabbix-db-mysql" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix" -e ZBX_SERVER_HOST="zabbix-server" -e TZ="Asia/Shanghai" -d zabbix/zabbix-web-apache-mysql:latest

docker logs zabbix-web-apache-mysql
[Tue Feb 07 07:32:49.252624 2017] [core:error] [pid 30] (2)No such file or directory: AH00099: could not create /run/apache2/httpd.pid
[Tue Feb 07 07:32:49.252653 2017] [core:error] [pid 30] AH00100: httpd: could not log pid to file /run/apache2/httpd.pid
2017-02-07 07:32:49,253 INFO exited: apache2 (exit status 1; not expected)
2017-02-07 07:32:49,253 INFO exited: apache2 (exit status 1; not expected)
2017-02-07 07:32:50,255 INFO spawned: 'apache2' with pid 31
2017-02-07 07:32:50,255 INFO spawned: 'apache2' with pid 31
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.5. Set the 'ServerName' directive globally to suppress this message
[Tue Feb 07 07:32:50.283722 2017] [core:error] [pid 31] (2)No such file or directory: AH00099: could not create /run/apache2/httpd.pid
[Tue Feb 07 07:32:50.283746 2017] [core:error] [pid 31] AH00100: httpd: could not log pid to file /run/apache2/httpd.pid
2017-02-07 07:32:50,284 INFO exited: apache2 (exit status 1; not expected)
2017-02-07 07:32:50,284 INFO exited: apache2 (exit status 1; not expected)

# docker exec -it zabbix-web-apache-mysql bash

bash-4.3# ls /var/run/
supervisor.sock  supervisord.pid
bash-4.3# ls /run
bash-4.3# 
  1. zabbix web apache mysql ubuntu

Default shows "It works", and access via hostname does not work. I create a soft link in the container by using ln -s /usr/share/zabbix/ /var/www/zabbix, so I can accress zabbix web by http://zabbix/zabbix

docker run -p 80:80 --name zabbix-web-apache-mysql-ubuntu --link zabbix-server --link zabbix-db-mysql -e DB_SERVER_HOST="zabbix-db-mysql" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix" -e ZBX_SERVER_HOST="zabbix-server" -e TZ="Asia/Shanghai" -d zabbix/zabbix-web-apache-mysql:ubuntu-latest
  1. zabbix web nginx mysql ubuntu can use out of box

  2. zabbix web nginx mysql alpine

Something wrong with /etc/nginx/conf.d/default.conf

docker run -p 80:80 --name zabbix-web-apache-nginx-alpine --link zabbix-server --link zabbix-db-mysql -e DB_SERVER_HOST="zabbix-db-mysql" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix" -e ZBX_SERVER_HOST="zabbix-server" -e TZ="Asia/Shanghai" -d zabbix/zabbix-web-nginx-mysql:latest

docker logs zabbix-web-nginx-mysql-alpine

2017/02/13 10:22:55 [emerg] 34#34: open() "/etc/nginx/conf.d/default.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
nginx: [emerg] open() "/etc/nginx/conf.d/default.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
2017-02-13 10:22:55,581 INFO exited: nginx (exit status 1; not expected)
2017-02-13 10:22:55,581 INFO exited: nginx (exit status 1; not expected)
2017-02-13 10:22:56,582 INFO gave up: nginx entered FATAL state, too many start retries too quickly
2017-02-13 10:22:56,582 INFO gave up: nginx entered FATAL state, too many start retries too quickly

docker exec -it zabbix-web-apache-nginx-alpine bash
bash-4.3# ls -al /etc/nginx/conf.d/
ls: /etc/nginx/conf.d/default.conf: No such file or directory
total 0
drwxr-xr-x    1 root     root            42 Feb 13 10:22 .
drwxr-xr-x    1 root     root            19 Feb  7 01:42 ..
lrwxrwxrwx    1 root     root            22 Feb 13 10:22 nginx.conf -> /etc/zabbix/nginx.conf
bash-4.3# rm /etc/nginx/conf.d/default.conf 
rm: can't remove '/etc/nginx/conf.d/default.conf': No such file or directory

These are my docker info output

Containers: 6
 Running: 5
 Paused: 0
 Stopped: 1
Images: 32
Server Version: 1.13.0
Storage Driver: overlay
 Backing Filesystem: xfs
 Supports d_type: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-327.3.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.702 GiB
Name: docker
ID: xxx
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Experimental: false
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 http://xxx
Live Restore Enabled: false

Long container stop via "docker stop ... "

When docker stops container it sends SIGTERM signal to PID 1 (/bin/bash), but bash ignores this signal and dont propogate it to its child (/usr/bin/supervisord). This leads to long waiting (10 seconds) before docker send KILL signal.
Maybe in run_zabbix_component.sh you should change

/usr/bin/supervisord -c /etc/supervisor/supervisord.conf

to

exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf

then supervisord will replace bash process and become PID 1. After that supervisord can catch the SIGTERM signall and shutdowns normaly.

import template got 500 error

Hi, while import an template xml file (48KB) use web-ui, nginx returned 500 error
nginx error log:
open() "/var/cache/nginx/client_temp/0000000001" failed (13: Permission denied)

Then I add "client_body_buffer_size 256k;" into nginx.conf, import successful.

Can We set an suitable value for this parameter as default ?

cannot use database "zabbix": Zabbix server cannot work with a Zabbix proxy database

ubuntu 14.04 x86_64

I have a problems,please help
such as
First install mysql
docker run --name zabbix-mysql-server --hostname zabbix-mysql-server
-e MYSQL_ROOT_PASSWORD="123456"
-e MYSQL_USER="zabbix"
-e MYSQL_PASSWORD="123456"
-e MYSQL_DATABASE="zabbix"
--restart="always"
-p 3306:3306
-d
mysql

Second install zabbix-server
docker run --name zabbix-server-mysql --hostname zabbix-server-mysql
--link zabbix-mysql-server:mysql
-e DB_SERVER_HOST="mysql"
-e MYSQL_USER="zabbix"
-e MYSQL_DATABASE="zabbix"
-e MYSQL_PASSWORD="123456"
-p 10051:10051
-d
zabbix/zabbix-server-mysql

Last install zabbix-web-nginx
docker run --name zabbix-web-nginx-mysql --hostname zabbix-web-nginx-mysql
--link zabbix-mysql-server:mysql
--link zabbix-server-mysql:zabbix-server
-e DB_SERVER_HOST="mysql"
-e MYSQL_USER="zabbix"
-e MYSQL_PASSWORD="123456"
-e MYSQL_DATABASE="zabbix"
-e ZBX_SERVER_HOST="zabbix-server"
-e PHP_TZ="Asia/Shanghai"
-p 8000:80
-p 8443:443
-d
zabbix/zabbix-web-nginx-mysql

but i failed
docker logs zabbix-server-mysql
Press Ctrl+C to exit.

111:20170911:021729.804 Starting Zabbix Server. Zabbix 3.4.1 (revision 71734).
111:20170911:021729.805 ****** Enabled features ******
111:20170911:021729.805 SNMP monitoring: YES
111:20170911:021729.806 IPMI monitoring: YES
111:20170911:021729.806 Web monitoring: YES
111:20170911:021729.807 VMware monitoring: YES
111:20170911:021729.807 SMTP authentication: YES
111:20170911:021729.807 Jabber notifications: NO
111:20170911:021729.807 Ez Texting notifications: YES
111:20170911:021729.807 ODBC: YES
111:20170911:021729.807 SSH2 support: YES
111:20170911:021729.807 IPv6 support: YES
111:20170911:021729.807 TLS support: YES
111:20170911:021729.807 ******************************
111:20170911:021729.807 using configuration file: /etc/zabbix/zabbix_server.conf
111:20170911:021729.817 cannot use database "zabbix": Zabbix server cannot work with a Zabbix proxy database
2017-09-11 02:17:29,818 INFO exited: zabbix-server (exit status 1; not expected)
2017-09-11 02:17:29,818 INFO exited: zabbix-server (exit status 1; not expected)
2017-09-11 02:17:30,821 INFO gave up: zabbix-server entered FATAL state, too many start retries too quickly
2017-09-11 02:17:30,821 INFO gave up: zabbix-server entered FATAL state, too many start retries too quickly

In web
image

please help

php.ini timezone

Modify timezone in the /etc/php5/php.ini does not take effect,
I will be grateful if it work.

[program:php-fpm]
command = /usr/bin/php-fpm -F -c /etc/php5/php.ini -y /etc/php5/php-fpm.conf
auto_start = true
autorestart = true

Error in Example 2

Error:

docker: 
Error response from daemon: create ./zbx_instance/snmptraps: "./zbx_instance/snmptraps" includes 
invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed.

From documentation (https://www.zabbix.com/documentation/3.2/manual/installation/containers#usage)

Example 2

The example demonstrates how to run Zabbix server with PostgreSQL database support, Zabbix web interface based on the Nginx web server and SNMP trap feature.

My actions:

user@ubuntuserver16041:~$ sudo -s

root@ubuntuserver16041:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

root@ubuntuserver16041:~# docker --version
Docker version 1.12.1, build 23cf638
root@ubuntuserver16041:~# docker run --name postgres-server -t \
>       -e POSTGRES_USER="zabbix" \
>       -e POSTGRES_PASSWORD="zabbix" \
>       -e POSTGRES_DB="zabbix_pwd" \
>       -d postgres:latest
Unable to find image 'postgres:latest' locally
latest: Pulling from library/postgres

6a5a5368e0c2: Pull complete
193f770cec44: Pull complete
33647077f2ee: Pull complete
53bc65f84840: Pull complete
a4d3b0f1c16a: Pull complete
bdbe3c2ddbbd: Pull complete
8f08971388d1: Pull complete
f80ab5df227d: Pull complete
7e724cee4193: Pull complete
fb0a1ee64973: Pull complete
484ac0d6f901: Pull complete
Digest: sha256:924650288891ce2e603c4bbe8491e7fa28d43a3fc792e302222a938ff4e6a349
Status: Downloaded newer image for postgres:latest
21236cbbd89fee2bfa1a867dc340c0199aff50c25b966a3921cc240d145ad165

root@ubuntuserver16041:~# docker run --name zabbix-snmptraps -t \
>       -v ./zbx_instance/snmptraps:/var/lib/zabbix/snmptraps:rw \
>       -v /var/lib/zabbix/mibs:/usr/share/snmp/mibs:ro \
>       -p 162:162/udp \
>       -d zabbix/zabbix-snmptraps:latest
Unable to find image 'zabbix/zabbix-snmptraps:latest' locally
latest: Pulling from zabbix/zabbix-snmptraps

04c996abc244: Pull complete
d394d3da86fe: Pull complete
bac77aae22d4: Pull complete
b48b86b78e97: Pull complete
09b3dd842bf5: Pull complete
df083cf55a57: Pull complete
a645192b78fa: Pull complete
20d4a0f91e8a: Pull complete
e2d1e537c4b9: Pull complete
Digest: sha256:5e9b3ff13cf13bd363f64b8e707d5f93cfcaf3076cc922cccc4c90cd49507d7d
Status: Downloaded newer image for zabbix/zabbix-snmptraps:latest
docker: Error response from daemon: create ./zbx_instance/snmptraps: "./zbx_instance/snmptraps" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed.
See 'docker run --help'.

Zabbix agent on Zabbix server is unreachable

It looks like zabbix-server-mysql does not have support for agent.
When I enabled monitoring for zabbix-server itself zabbix triggers an alert and I'm not able to get metrics from it

Alpine image of server has problem with Web monitoring

I've setup Alpine env for my monitoring and I found out some error in web testing. When I changed server for ubuntu everything is working well. So.. lets describe it :)

  1. setup up alpine env
  2. create host
  3. prepare web scenario
  4. as step load some page and check status code to 200
  5. check graph after.. 2 - 3 hours :)

When I have Alpine as server I have following graph (showing hours as response?) -
zabbix_webtest

But when I changed server to Ubuntu, everything is normal and working well:
ubuntu_webtest.

I wrote this also to Zabbix Forum, but I think here is the right place to put it. I dont know how Zabbix is checking response from the server, but Alpine has some things different which I find out when I want to put there also SSL checking (date is from busybox [this can be solved by installing coreutils], time command has a bit different output also). So maybe its problem with some parsing somewhere?

Monitoring host networks

How I can monitor host networks without using network_mode: host? I don't want to publish any zabbix ports and communicate with zabbix server by docker overlay network. Please help.

Command docker exec error in doc

Command should be docker exec -ti some-zabbix-* /bin/bash, not bin/bash/

grep -rn "/bin/bash/" .
./agent/alpine/README.md:58:$ docker exec -ti some-zabbix-agent /bin/bash/
./agent/ubuntu/README.md:58:$ docker exec -ti some-zabbix-agent /bin/bash/
./java-gateway/alpine/README.md:46:$ docker exec -ti some-zabbix-java-gateway /bin/bash/
./java-gateway/ubuntu/README.md:46:$ docker exec -ti some-zabbix-java-gateway /bin/bash/
./proxy-mysql/alpine/README.md:64:$ docker exec -ti some-zabbix-proxy-mysql /bin/bash/
./proxy-mysql/ubuntu/README.md:64:$ docker exec -ti some-zabbix-proxy-mysql /bin/bash/
./proxy-sqlite3/alpine/README.md:60:$ docker exec -ti some-zabbix-proxy-sqlite3 /bin/bash/
./proxy-sqlite3/ubuntu/README.md:60:$ docker exec -ti some-zabbix-proxy-sqlite3 /bin/bash/
./server-mysql/alpine/README.md:50:$ docker exec -ti some-zabbix-server-mysql /bin/bash/
./server-mysql/ubuntu/README.md:50:$ docker exec -ti some-zabbix-server-mysql /bin/bash/
./server-pgsql/alpine/README.md:49:$ docker exec -ti some-zabbix-server-pgsql /bin/bash/
./server-pgsql/ubuntu/README.md:49:$ docker exec -ti some-zabbix-server-pgsql /bin/bash/
./snmptraps/ubuntu/README.md:46:$ docker exec -ti some-zabbix-snmptraps /bin/bash/
./web-apache-mysql/alpine/README.md:58:$ docker exec -ti some-zabbix-web-apache-mysql /bin/bash/
./web-apache-mysql/ubuntu/README.md:58:$ docker exec -ti some-zabbix-web-apache-mysql /bin/bash/
./web-apache-pgsql/alpine/README.md:58:$ docker exec -ti some-zabbix-web-apache-pgsql /bin/bash/
./web-apache-pgsql/ubuntu/README.md:58:$ docker exec -ti some-zabbix-web-apache-pgsql /bin/bash/
./web-nginx-mysql/alpine/README.md:58:$ docker exec -ti some-zabbix-web-nginx-mysql /bin/bash/
./web-nginx-mysql/ubuntu/README.md:58:$ docker exec -ti some-zabbix-web-nginx-mysql /bin/bash/
./web-nginx-pgsql/alpine/README.md:58:$ docker exec -ti some-zabbix-web-nginx-pgsql /bin/bash/
./web-nginx-pgsql/ubuntu/README.md:58:$ docker exec -ti some-zabbix-web-nginx-pgsql /bin/bash/

Docker build failing for server trunk

The docker builds for trunk are failing in the server project. But because the builds are successful for the web front-end we now face the issue that pulling trunk images for both web and server causes a mismatch in database schema version.

No documentation for linking server with a postgres running in a container

I am trying to set up a prototype environment to get an understanding of zabbix. I'm following the documentation for the server-pgsql and the web-nginx-pgsql and see a command line to link the web server to the database but not the server. Is this an oversight or is this not going to work, and the database has to be running on a host (i.e., not a container)?

[Request] zabbix-sender for server and proxy

On traditional installs it's common that an agent is installed along a server or proxy. As that isn't the case in containers it's not possible for external scripts to use that feature for efficiently send data.

Would be great to include zabbix sender in the server and proxy containers.

Permissions '/var/cache/nginx/client_temp/'

I can't import template.

After import xml-file I see '500 Internal Server Error':

docker logs zabbix-web
2017/02/14 11:49:51 [crit] 85#85: *68 open() "/var/cache/nginx/client_temp/0000000004" 
failed (13: Permission denied), client: 172.16.0.10, 
server: zabbix, request: "POST /conf.import.php HTTP/1.1", 
host: "mon.example.com", 
referrer: "http://mon.example.com/conf.import.php?rules_preset=template&sid=644907fc1537bb20"

zabbix-web-nginx-mysql:ubuntu images: session_start() permission denied

Intermittent error message appear in web interface:
session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->__construct() → CSession::start() → session_start() in include/classes/core/CSession.php:49]

root@dc3bb0cd8f42:/usr/share/zabbix# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Oct08 ?        00:00:00 /bin/bash /data/run_zabbix_component.sh frontend mysql nginx
root        28     1  0 Oct08 ?        00:00:50 /usr/bin/python /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
root        31    28  0 Oct08 ?        00:00:00 nginx: master process /usr/sbin/nginx -g daemon off; -c /etc/nginx/nginx.conf
root        32    28  0 Oct08 ?        00:00:06 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data    33    31  0 Oct08 ?        00:00:15 nginx: worker process
www-data    34    31  0 Oct08 ?        00:00:15 nginx: worker process
www-data    35    31  0 Oct08 ?        00:00:15 nginx: worker process
www-data    36    31  0 Oct08 ?        00:00:15 nginx: worker process
www-data    37    31  0 Oct08 ?        00:00:17 nginx: worker process
www-data   641    32  0 16:54 ?        00:00:00 php-fpm: pool www
www-data   642    32  0 16:54 ?        00:00:00 php-fpm: pool www
www-data   643    32  0 16:56 ?        00:00:00 php-fpm: pool www
root       644     0  0 16:57 ?        00:00:00 bash
root       659   644  0 16:57 ?        00:00:00 ps -ef
root@dc3bb0cd8f42:/var/lib/php5# sudo -u www-data ls /var/lib/php5
ls: cannot open directory /var/lib/php5: Permission denied
root@dc3bb0cd8f42:/var/lib/php5# ll /var/lib/php5/
total 12
drwx-wx-wt  3 root     root      102 Oct  9 10:44 ./
drwxr-xr-x 25 root     root     4096 Aug  4 06:54 ../
drwxr-xr-x  4 root     root       31 Aug  4 06:54 modules/
-rw-------  1 www-data www-data   51 Oct  9 15:44 sess_xxxxxxxxxxxxxxxxxxxxxxx

So, we should grant read permission to user www-data in Dockerfile.

Error in documentation

Following the steps in Connects from Zabbix server or Zabbix proxy in other containers (Passive checks)

$ docker run --name some-zabbix-server --link some-zabbix-agent:zabbix-agent -d zabbix/zabbix-server:latest results in Repository zabbix/zabbix-server not found: does not exist or no pull access.

$ docker run --name some-zabbix-server --link some-zabbix-agent:zabbix-agent -d zabbix/zabbix-server:latest
Unable to find image 'zabbix/zabbix-server:latest' locally
docker: Error response from daemon: repository zabbix/zabbix-server not found: does not exist or no pull access.
See 'docker run --help'.

returned a non-zero code: 1

root@baoxx-VirtualBox:/home/baoxx/mygit/zabbix-docker/server-mysql/ubuntu# ./build.sh
Sending build context to Docker daemon 60.93 kB
Step 1 : FROM ubuntu:trusty
---> 3f755ca42730
Step 2 : MAINTAINER Alexey Pustovalov [email protected]
---> Using cache
---> e793dd4c6133
Step 3 : ARG APT_FLAGS_COMMON="-qq -y"
---> Using cache
---> 45423a4b85ac
Step 4 : ARG APT_FLAGS_PERSISTANT="${APT_FLAGS_COMMON} --no-install-recommends"
---> Using cache
---> a3a189e48aeb
Step 5 : ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
---> Using cache
---> b0658dac8e77
Step 6 : ARG DB_TYPE=mysql
---> Using cache
---> 750765548222
Step 7 : ENV MIBDIRS /usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS +ALL
---> Using cache
---> 30e447bed5e1
Step 8 : RUN echo -e '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
---> Running in 119bd75ff72d
write pipe: bad file descriptor
The command '/bin/sh -c echo -e '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d' returned a non-zero code: 1

and Dockerfile~~~~~~~~~~~~~~~~~
root@baoxx-VirtualBox:/home/baoxx/mygit/zabbix-docker/server-mysql/ubuntu# cat Dockerfile
FROM ubuntu:trusty
MAINTAINER Alexey Pustovalov [email protected]

ARG APT_FLAGS_COMMON="-qq -y"
ARG APT_FLAGS_PERSISTANT="${APT_FLAGS_COMMON} --no-install-recommends"
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
ARG DB_TYPE=mysql
#ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm
ENV MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL

#RUN locale-gen $LC_ALL
RUN echo -e '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
RUN addgroup --system --quiet zabbix && \

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.