ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Zabbix Server Installation Scripts

    IT Discussion
    zabbix how to script ubuntu
    5
    15
    3.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dafyreD
      dafyre
      last edited by dafyre

      Hi All,

      A brave soul known as @DustinB3403 around these parts started asking me some questions about setting up a Zabbix server.

      I call him a brave soul because Scripting in LInux is not really one of my strong suits (sorry @DustinB3403 , I forgot to mention that when we started).

      The result of working with him are a set of scripts to manage installing a Zabbix Server on Ubuntu 16.04, and a separate script to manage installing the Zabbix Agent on various Linux distros...

      You can find a little more details and documentation for the zabbix-server-install and zabbix-agent-installer scripts at

      https://gitlab.wellston.biz/dafyre/zabbix-utils/tree/master

      zabbix-server-install

      For this script to work, it is recommended to be used on Ubuntu 16.04, the sytem needs to have a working LAMP setup installed already. If you are running a fresh install, it is recommended to select LAMP and openSSH Server during the installatoin process. If you are doing this post-installation, then you may be able to install Apache, MySQL (MariaDB) and PHP using the tasksel command line.

      This script should be run as root, or with sudo.

      It will prompt you for your root password for the MySQL server and will configure the Zabbix database according to the username specified in the script.

      The Zabbix source files will be downloaded (Zabbix 3.0.3 at the time of writing) from the URL given in the script. (This can be self-hosted on your own web servers as well)

      please be sure to edit this script and set a strong password for the zabbix databsae

      sudo su
      bash ./zabbix-server-install
      will begin the process

      After the process has completed, you should be able to access the Zabbix web pages at http://ip.add.ress/zabbix

      The default username is Admin (with a capital A), and the default password is zabbix

      If anyone has any problems with the script, let me know.

      1 Reply Last reply Reply Quote 2
      • A
        Alex Sage
        last edited by

        Nice Work! Any pointers to get this working with Windows clients as well?

        dafyreD 2 Replies Last reply Reply Quote 0
        • dafyreD
          dafyre @Alex Sage
          last edited by

          @aaronstuder said in Zabbix Server Installation Scripts:

          Nice Work! Any pointers to get this working with Windows clients as well?

          Working on that as we speak. I hope to have something posted in a couple of hours. I'll post it in the Zabbix Agent installer thread. 🙂

          1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403
            last edited by

            Windows is functional as well, @dafyre will get something posted about it shortly.

            1 Reply Last reply Reply Quote 0
            • A
              Alex Sage
              last edited by Alex Sage

              Thanks! Hopefully I can test tonight.

              1 Reply Last reply Reply Quote 0
              • dafyreD
                dafyre @Alex Sage
                last edited by

                @aaronstuder said in Zabbix Server Installation Scripts:

                Nice Work! Any pointers to get this working with Windows clients as well?

                Windows Agents posted in the other thread... https://www.mangolassi.it/topic/9478/zabbix-agent-install-script

                1 Reply Last reply Reply Quote 1
                • dafyreD
                  dafyre
                  last edited by

                  At least one recommended thing to do after you have the Zabbix Server up and running is to set up auto registration so you can install the agents on your other systems and have them automatically assign templates and items and such right off the bat.

                  1. Log in to your system, and go to Confiuration -> Actions, and then make sure the Event source is set to Auto Registration.
                    0_1465920820415_upload-fa809776-e9af-4998-888f-ffd06f7daa13

                  2. Afterwards, click "Create Action"
                    For name use something like Register Windows or whatever you want to call it.

                  0_1465920921209_upload-7e24cc8e-12bb-436b-8b79-12c82b28b2ff

                  1. Then click the Conditions tab. In the "New condition" area, change the first drop down to Host metadata, the second one should remain Like, and in the third box, type Windows, and then click the 'Add' link (the blue text, not the blue button with white text!)... If done correctly, your screen should change to...

                  0_1465921085802_upload-8e9fb4f2-140f-4268-97db-876a5d725f3c

                  1. Click on the Operations Tab.

                  2. Under Action operations... Click on the 'New' link. In the Operation type dropdown, choose Add host, and then click the 'Add' link (again, not the blue button!).

                  3. You should see the 'New' link return. Click 'New' again,, and change Operation type to Add host to group.

                  4. To the right of the Host Groups textbox, there should be a white button that says 'Select'. Click that button and then place a check next to Discovered Hosts, and then click the blue 'Select' button. Again, click the 'Add' link.

                  5. Click the New link again and change the Operation type to "Link to Template"
                    in the "Templates" textbox, type Windows, and make sure to select the one that says "Template OS Windows"

                  0_1465921373121_upload-d8413cfc-fbca-4ca2-b36a-e40a2cbb02a8

                  1. Once again, click the 'Add' link, and your screen should look like.. .

                  0_1465921412485_upload-1633ae4b-f02f-49d7-878d-e38f43fd81f0

                  1. Finally, you can click the 'Add' button, and you should see the name of your new action on the Actions screen.

                  Go through this process again if you want to set up Linux hosts to auto register as well. (Just change Windows to Linux).

                  S 1 Reply Last reply Reply Quote 1
                  • S
                    Sparkum @dafyre
                    last edited by

                    @dafyre
                    Hey!

                    Is this still available?

                    JaredBuschJ dafyreD 2 Replies Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @Sparkum
                      last edited by

                      @Sparkum said in Zabbix Server Installation Scripts:

                      @dafyre
                      Hey!

                      Is this still available?

                      Zabbix is in the repos. No need for s complicated build it yourself script.

                      S 1 Reply Last reply Reply Quote 1
                      • dafyreD
                        dafyre @Sparkum
                        last edited by

                        @Sparkum said in Zabbix Server Installation Scripts:

                        @dafyre
                        Hey!

                        Is this still available?

                        @JaredBusch is right. There was a reason why I did the scripts, and cannot for the life of me remember why now, lol.

                        I've been writing up a how to for CentOS 7... located at: http://blog.wellston.biz/post/zabbix-part-1/

                        That's probably not going to be the final home for that article series, but that's where it's at now until I get a few folks to test it for me (hint, hint).

                        Look it over (try it out if you want) and let me know what you think. My install scripts work on Ubuntu 16.04 if you're more comfortable with that.

                        1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch
                          last edited by JaredBusch

                          @Sparkum I was driving home at 2am and not able to reply in detial.

                          But the instructions on the Zabbix website are pretty bad actually. I can type up what I did on CentOS 7 later today if I have time.

                          It is not hard. I still have to turn off SELinux because I haven't had time to check all the directories.

                          My install has no outside access so I am not worried for the short term.

                          1 Reply Last reply Reply Quote 1
                          • S
                            Sparkum @JaredBusch
                            last edited by

                            @JaredBusch

                            Sorry I'm currently tasking myself with learning Linux so I hope this isnt a dumb question.

                            By repos do you mean docker?

                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch @Sparkum
                              last edited by

                              @Sparkum said in Zabbix Server Installation Scripts:

                              @JaredBusch

                              Sorry I'm currently tasking myself with learning Linux so I hope this isnt a dumb question.

                              By repos do you mean docker?

                              Repositories. For CentOS that means you can yum install.

                              https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages

                              These instructions assume a lot of things.

                              S 1 Reply Last reply Reply Quote 1
                              • S
                                Sparkum @JaredBusch
                                last edited by Sparkum

                                @JaredBusch

                                Ah gotcha, okay I was actually following those instructions, as well as ones from DO, as well as from everywhere and anywhere.

                                Multiple times I got to different places, I was able to stand it up a few times, was even graphing itself once, but for the life of me could not get communication from my agents to the server, ports 10050 and 10051 showed open in uh...I think it was ufw? but I couldnt telnet into them, so not sure if it was my install or what was up.

                                JaredBuschJ 1 Reply Last reply Reply Quote 0
                                • JaredBuschJ
                                  JaredBusch @Sparkum
                                  last edited by

                                  @Sparkum said in Zabbix Server Installation Scripts:

                                  @JaredBusch

                                  Ah gotcha, okay I was actually following those instructions, as well as ones from DO, as well as from everywhere and anywhere.

                                  Multiple times I got to different places, I was able to stand it up a few times, was even graphing itself once, but for the life of me could not get communication from my agents to the server, ports 10050 and 10051 showed open in uh...I think it was ufw? but I couldnt telnet into them, so not sure if it was my install or what was up.

                                  Here you go.
                                  https://mangolassi.it/topic/10373/install-zabbix-on-centos-7

                                  1 Reply Last reply Reply Quote 2
                                  • 1 / 1
                                  • First post
                                    Last post