Ad Widget

Collapse

Docker Image with Zabbix server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • polinux
    Junior Member
    • May 2015
    • 13

    #1

    Docker Image with Zabbix server

    Hi Guys,

    I was thinking that maybe for some people who want to try easily Zabbix they could use Docker image I have prepared for very easy deployment.

    It comes with SMTP authentication scripts, Push notifications and Slack integration. If you like it you could pin it somewhere in the forum section so everyone can have a look.

    You can find it on Docker Hub under this link.

    Project page is here.
    If anyone wantsto join developing it please do.. We can do much more together.

    Hope you like guys.
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by polinux
    Hi Guys,

    I was thinking that maybe for some people who want to try easily Zabbix they could use Docker image I have prepared for very easy deployment.
    Just first sentence from https://www.docker.com/whatisdocker/

    "Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications"

    Zabbix services like server and proxy are not distributed services.
    As well "very easy" term has meaning only on fuzzy logic background and as all of this type terms it has exact meaning only in exact context (what is "very easy" for you may be not easy for you and vice versa).
    Last edited by kloczek; 18-05-2015, 13:19.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • polinux
      Junior Member
      • May 2015
      • 13

      #3
      Dear Kloczek,

      You just welcome you know . There is really no need for you to like it or not. And after reading your post I'm quite sure that to some extent you are an ignorant to technologies like Docker, since you have to quote their page to someone who is working with it since it's beginning .

      PS. Sometimes it's better to drop this "Polish mind set" and appreciate some other peoples work rather then criticising it.
      Last edited by polinux; 19-05-2015, 19:02. Reason: no reason

      Comment

      • bbrendon
        Senior Member
        • Sep 2005
        • 870

        #4
        Originally posted by polinux
        Hi Guys,

        I was thinking that maybe for some people who want to try easily Zabbix they could use Docker image I have prepared for very easy deployment.

        It comes with SMTP authentication scripts, Push notifications and Slack integration. If you like it you could pin it somewhere in the forum section so everyone can have a look.

        You can find it on Docker Hub under this link.

        Project page is here.
        If anyone wantsto join developing it please do.. We can do much more together.

        Hope you like guys.
        Well done, good idea.
        Unofficial Zabbix Expert
        Blog, Corporate Site

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Originally posted by polinux
          Dear Kloczek,

          You just welcome you know . There is really no need for you to like it or not.
          No I don't know and I did not wrote anything which says something about my private opinion about any technology. You are reading my reply between the lines. Try to read it straight first.

          And after reading your post I'm quite sure that to some extent you are an ignorant to technologies like Docker, since you have to quote their page to someone who is working with it since it's beginning .

          PS. Sometimes it's better to drop this "Polish mind set" and appreciate some other peoples work rather then criticising it.
          Sorry to say this but I don't see even single argument which is relevant to my reply, docker or zabbix. Instead proper argumentation you started writing about me.

          Secondly: As you mention I've only quote first sentence from one page of main docker site. I'm not the author of the quoted text so this is not my private opinion.
          In other words I really don't understand what you just wrote .. do you want to say that docker documentation needs to be updated or zabbix as service is distributed service?

          PS. Instead replaying ad persona (which is very rude) if you are still interested subject (which you started) one more time you can try to write something about docker and zabbix.
          Last edited by kloczek; 21-05-2015, 11:09.
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          • polinux
            Junior Member
            • May 2015
            • 13

            #6
            Dear Kloczek,

            I think after so many years of experience in sysadmin field you should already know that it's always better to ask questions directly rather than quoting some other pages text's. That would save you misunderstanding with other people.

            I will not carry on this conversation other than about docker or zabbix.

            So if you ahve any questions please make them clear and I'l, try to answer you if it happens that I know the answer.

            As for Docker and distributed applications:
            Have you ever used LXC? if yes then Docker is actually replacing that old limited technology. What it does it's running another layer with another os sharing the same kernel. It's very easy then to deploy an application without configuring your system ever again - automating the process. So instead of playing with configuration you have your docker image that is already configured and run whole process with single command.

            Comment

            • jan.garaj
              Senior Member
              Zabbix Certified Specialist
              • Jan 2010
              • 506

              #7
              This project is distributed application - so yes, docker is the right tool.

              Unfortunately all zabbix server docker images (this one included) available in official docker registry are hardcoded with some specific zabbix version and they are outdated now.
              Best practice is to create new docker image layer with updated app version and tag this layer by using used app version. I didn't find any public docker image, which follows this concept.

              Real problem of any docker image is configuration. My desired configuration is always different of used author's configuration. Sorry, I don't want to use Slack, Push, SMTP auth, but I need many SNMP/http workers, .... Now what? You can use some docker management/orchestration tool (e.g. http://controlcenter.io/), which is able to handle custom configs or you must to build your own docker image.

              However people are lazy or they don't have knowledge how to build your own docker image. Public docker image will be probably the easiest way for deploying zabbix server for them.
              But I recommend to build own docker images with custom config for standard administrators. https://github.com/million12/docker-zabbix-server is perfect "inspiration" how to build own image (Dockerfile is optimized and pretty structured).

              Immutable infrastructure with Docker and containers is nice concept (and big hype now). But don't be lazy and do it properly.

              Note: Author of this post has spent last ~6 months on Docker enterprise project and he is developing also Zabbix Docker module https://github.com/jangaraj/Zabbix-Docker-Monitoring. Hopefully, he knows what he is saying
              Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
              My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

              Comment

              • polinux
                Junior Member
                • May 2015
                • 13

                #8
                Originally posted by jan.garaj
                Real problem of any docker image is configuration. My desired configuration is always different of used author's configuration. Sorry, I don't want to use Slack, Push, SMTP auth, but I need many SNMP/http workers, .... Now what? You can use some docker management/orchestration tool (e.g. http://controlcenter.io/), which is able to handle custom configs or you must to build your own docker image.
                Jan thanks for the comment and ideas on how to do this better. I have taken it on board and edited the image to match at least for now two versions.
                So now we have image called "base" which is pure installation of latest version of Zabbix, and version called "featured" build on top of "base" image with fancy stuff I thought would be appropriate. Still this is my choice and might not be what other users would like. By having it this way users can build their own images from "base" image and add whatever they like into it.

                Next stage would be to add some way to determine which version of Zabbix is the latest one and build the image on that version. For now I have updated the "base" image with 2.4.5.

                If you have an idea how to fetch info about which is the latest version into this "base" image please feel free to point me out or send me a PR on GitHub so we can merge the changes.

                Comment

                • jan.garaj
                  Senior Member
                  Zabbix Certified Specialist
                  • Jan 2010
                  • 506

                  #9
                  IMHO it's not the best solution. You don't have base image, you have created only base layer.

                  I recommend you to create 2 images (= 2 docker hub repositories - it can be just one github repo with 2 dockerfiles):
                  - zabbix-server-base with default config
                  new version will be always new tagged layer (see example of version tagging https://registry.hub.docker.com/u/ze...s/tags/manage/)
                  - your featured image zabbix-server-million12, which will provide your custom functionality on top of base image (FROM million12/zabbix-server-base)

                  With this config anyone can use base image for own custom image + you provide also your customized zabbix with your enhancements.
                  + you can start also older zabbix version anytime by specifying right layer tag.

                  For layer tagging and version use svn tags https://www.zabbix.org/websvn/wsvn/z...a0ff9fd26a5c26 if new is added -> then create new layer with the name of new tag. You will be able to release also RC releases/layer with this concept.

                  I can imagine also full automation of creation process:
                  Webhook from from https://github.com/zabbix/zabbix will touch your repo -> touch will trigger your build script on https://drone.io and if build script detect new svn tag, then it will build layer and it will push new layer to public docker registry. Job done - no human touch and error.

                  If you are able to do it and you don't mind, then I can push this project (base version, without enhancements only) as official community zabbix (server/agent/proxy) docker image - it'll be part of https://github.com/zabbix and https://registry.hub.docker.com/repos/zabbix/
                  Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
                  My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

                  Comment

                  • kloczek
                    Senior Member
                    • Jun 2006
                    • 1771

                    #10
                    Originally posted by polinux
                    What it does it's running another layer with another os sharing the same kernel.
                    Because day has only 24h and everyone of us has only limited time time to live on Earth sometimes sometimes are thinking that what they know it is all what exist.
                    FYI: few months ago was 10 years anniversary of public release Solaris zones. What was released 10 years ago still in many areas is way ahead of docker.

                    If you are thinking that docker it is something new you are 100% right .. you are only thinking that it is true.
                    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                    https://kloczek.wordpress.com/
                    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                    My zabbix templates https://github.com/kloczek/zabbix-templates

                    Comment

                    • kloczek
                      Senior Member
                      • Jun 2006
                      • 1771

                      #11
                      Originally posted by jan.garaj
                      With this config anyone can use base image for own custom image + you provide also your customized zabbix with your enhancements.
                      Cannot find any description how can I generate those images.
                      Could you please point on resources which can be used assemble these images from scratch?
                      (In some environments downloading and running straight publicly available resources is not allowed)
                      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                      https://kloczek.wordpress.com/
                      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                      My zabbix templates https://github.com/kloczek/zabbix-templates

                      Comment

                      • polinux
                        Junior Member
                        • May 2015
                        • 13

                        #12
                        Originally posted by jan.garaj
                        IMHO it's not the best solution. You don't have base image, you have created only base layer.

                        I recommend you to create 2 images (= 2 docker hub repositories - it can be just one github repo with 2 dockerfiles):
                        - zabbix-server-base with default config
                        new version will be always new tagged layer (see example of version tagging https://registry.hub.docker.com/u/ze...s/tags/manage/)
                        - your featured image zabbix-server-million12, which will provide your custom functionality on top of base image (FROM million12/zabbix-server-base)

                        With this config anyone can use base image for own custom image + you provide also your customized zabbix with your enhancements.
                        + you can start also older zabbix version anytime by specifying right layer tag.

                        For layer tagging and version use svn tags https://www.zabbix.org/websvn/wsvn/z...a0ff9fd26a5c26 if new is added -> then create new layer with the name of new tag. You will be able to release also RC releases/layer with this concept.

                        I can imagine also full automation of creation process:
                        Webhook from from https://github.com/zabbix/zabbix will touch your repo -> touch will trigger your build script on https://drone.io and if build script detect new svn tag, then it will build layer and it will push new layer to public docker registry. Job done - no human touch and error.

                        If you are able to do it and you don't mind, then I can push this project (base version, without enhancements only) as official community zabbix (server/agent/proxy) docker image - it'll be part of https://github.com/zabbix and https://registry.hub.docker.com/repos/zabbix/
                        I'm working on it now. When finished will let you guys know. Thanks for sharing the idea. I will build it that way.

                        Kloczek, please wait until the images are redesign so you can pull them from docker registry. Unless you want to build them yourself. Just pull repo from GitHub and run `docker build` command..
                        Last edited by polinux; 25-05-2015, 15:08.

                        Comment

                        • kloczek
                          Senior Member
                          • Jun 2006
                          • 1771

                          #13
                          Originally posted by polinux
                          Kloczek, please wait until the images are redesign so you can pull them from docker registry. Unless you want to build them yourself. Just pull repo from git hum and run `docker build` command..
                          Sorry for people like me binary images as resource is not acceptable.
                          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                          https://kloczek.wordpress.com/
                          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                          My zabbix templates https://github.com/kloczek/zabbix-templates

                          Comment

                          • polinux
                            Junior Member
                            • May 2015
                            • 13

                            #14
                            Originally posted by kloczek
                            Cannot find any description how can I generate those images.
                            Could you please point on resources which can be used assemble these images from scratch?
                            Sure thing.
                            Docker documentation

                            Comment

                            • kloczek
                              Senior Member
                              • Jun 2006
                              • 1771

                              #15
                              Originally posted by polinux
                              Please. I'm not looking for generic documentation but something which describes assembly process of exact image.
                              http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                              https://kloczek.wordpress.com/
                              zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                              My zabbix templates https://github.com/kloczek/zabbix-templates

                              Comment

                              Working...