Ad Widget

Collapse

Zabbix on FreeBSD 8.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kooper
    Junior Member
    • Mar 2010
    • 13

    #1

    Zabbix on FreeBSD 8.0

    Hi all


    I've been playing around with getting Zabbix up and running on FreeBSD 8.0 (original plan was CentOS, but too many issues with VMWare ESX).

    I've come as far as getting the front-end up and running, but quite a few checks failed.

    I'm now planning on starting again from scratch, short version of what I want to do:

    1) Configure PHP with DB support
    2) Get my paws on Zabbix Server 1.8.1 (or the latest one) by means of the ports
    3) Configure MySQL
    4) Get Zabbix front-end (again, via the ports)
    5) Configure some monitors


    The big thing for me is to get Zabbix configured to be able to perform agentless SSH checks on a couple of Nix machines. I prefer this as we're currently running a proprietary monitoring software suit (used to be Sitescope, now Indicative) that has these checks in place, the Nix machines containing custom SSH scripts.

    These monitors would then be accessed by means of a web front-end.


    Has anyone perhaps done this before? If you can give me any pointers or things to look out for, it would be much appreciated.


    Thanks,
    kooper


    EDIT: I forgot to add that if you recommend I switch to another OS, please do as well as which OS you'd recommend. I'm going for completely OSS.
    Last edited by kooper; 14-03-2010, 16:08.
  • kooper
    Junior Member
    • Mar 2010
    • 13

    #2
    OK, I'm officially lost now.

    I've tried installing Zabbix on my FreeBSD8 box with the source code and via FreeBSD's ports, neither one giving SSH2 support...


    Here's the latest log entry:

    27816:20100315:203328.685 Starting zabbix_server. Zabbix 1.8.1 (revision 9702).
    27816:20100315:203328.686 **** Enabled features ****
    27816:20100315:203328.686 SNMP monitoring: YES
    27816:20100315:203328.686 IPMI monitoring: NO
    27816:20100315:203328.686 WEB monitoring: YES
    27816:20100315:203328.686 Jabber notifications: NO
    27816:20100315:203328.686 ODBC: NO
    27816:20100315:203328.686 SSH2 support: NO
    27816:20100315:203328.687 IPv6 support: NO
    27816:20100315:203328.687 **************************
    27816:20100315:203328.723 server #0 started [Watchdog]
    27817:20100315:203328.724 server #1 started [DB Cache]
    27818:20100315:203328.780 server #2 started [Poller. SNMP:YES]
    27822:20100315:203328.837 server #6 started [Poller. SNMP:YES]
    27823:20100315:203328.839 server #7 started [Trapper]
    27824:20100315:203328.845 server #8 started [Trapper]
    27826:20100315:203328.851 server #10 started [Trapper]
    27827:20100315:203328.856 server #11 started [Trapper]
    27828:20100315:203328.858 server #12 started [ICMP pinger]
    27829:20100315:203328.863 server #13 started [Alerter]
    27830:20100315:203328.866 server #14 started [Housekeeper]
    27830:20100315:203328.868 Executing housekeeper
    27833:20100315:203328.891 server #17 started [Node watcher. Node ID:0]
    27834:20100315:203328.896 server #18 started [HTTP Poller]
    27836:20100315:203328.903 server #20 started [HTTP Poller]
    27838:20100315:203328.911 server #22 started [HTTP Poller]
    27840:20100315:203328.918 server #24 started [HTTP Poller]
    27841:20100315:203328.925 server #25 started [HTTP Poller]
    27843:20100315:203328.933 server #27 started [HTTP Poller]
    27845:20100315:203328.941 server #29 started [DB Syncer]
    27846:20100315:203328.947 server #30 started [Escalator]
    27819:20100315:203328.992 server #3 started [Poller. SNMP:YES]
    27820:20100315:203329.024 server #4 started [Poller. SNMP:YES]
    27821:20100315:203329.064 server #5 started [Poller. SNMP:YES]
    27825:20100315:203329.068 server #9 started [Trapper]
    27831:20100315:203329.079 server #15 started [Timer]
    27832:20100315:203329.127 server #16 started [Poller for unreachable hosts. SNMP:YES]
    27835:20100315:203329.129 server #19 started [HTTP Poller]
    27837:20100315:203328.908 server #21 started [HTTP Poller]
    27839:20100315:203329.142 server #23 started [HTTP Poller]
    27842:20100315:203329.145 server #26 started [HTTP Poller]
    27844:20100315:203329.187 server #28 started [Discoverer. SNMP:YES]
    27830:20100315:203338.635 Deleted 0 records from history and trends

    I definitely made sure that the last configure I tried has SSH2 specified. Here's what I ran after getting the package via the ports:

    [root@TSG-BSD /usr/ports/net-mgmt/zabbix-server/work/zabbix-1.8.1]# ./configure --enable-server --with-mysql --with-net-snmp --with-ssh2 --with-libcurl


    Here's the config.log after installing:

    $ ./configure --enable-server --with-mysql --with-net-snmp --with-ssh2 --with-libcurl
    bla
    bla
    bla
    bla
    bla

    PROXY_LDFLAGS=' -L/usr/local/lib/mysql -L/usr/local/lib -lcurl -lssl -lcrypto -lz -L/usr/local/lib -lnetsnmp -lelf -lm -lkvm -ldevstat -lcrypto -L/usr
    /local/lib -lnetsnmp -lelf -lm -lkvm -ldevstat -lcrypto -L$/usr/local/lib'
    PROXY_LIBS=' -lmysqlclient -lcurl -lnetsnmp -lssh2'

    bla
    bla
    bla
    bla
    bla

    SERVER_LDFLAGS=' -L/usr/local/lib/mysql -L/usr/local/lib -lcurl -lssl -lcrypto -lz -L/usr/local/lib -lnetsnmp -lelf -lm -lkvm -ldevstat -lcrypto -L/u
    sr/local/lib -lnetsnmp -lelf -lm -lkvm -ldevstat -lcrypto -L$/usr/local/lib'
    SERVER_LIBS=' -lmysqlclient -lcurl -lnetsnmp -lssh2'

    bla
    bla
    bla
    bla
    bla

    SSH2_CFLAGS='-I$/usr/local/include'
    SSH2_LDFLAGS='-L$/usr/local/lib'
    SSH2_LIBS='-lssh2'

    Starting the Zabbix server afterwards and lo and behold:

    45455:20100315:204422.413 SNMP monitoring: YES
    45455:20100315:204422.413 IPMI monitoring: NO
    45455:20100315:204422.413 WEB monitoring: YES
    45455:20100315:204422.413 Jabber notifications: NO
    45455:20100315:204422.413 ODBC: NO
    45455:20100315:204422.413 SSH2 support: NO
    45455:20100315:204422.413 IPv6 support: NO

    Any ideas? Please?

    Comment

    • kooper
      Junior Member
      • Mar 2010
      • 13

      #3
      Logfile now giving the following as well:

      error: Support of SSH parameters was not compiled in

      Clearly it WAS compiled with SSH2 (I've since, again, tried recompiling it):

      ./configure --enable-server --with-ssh2 --with-net-snmp --with-mysql --with-jabber --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=i386

      Comment

      • kooper
        Junior Member
        • Mar 2010
        • 13

        #4
        I've just about given up. Is there a place I can maybe log this as a bug? Doubt it's with Zabbix but maybe more FreeBSD, though I cannot be all too sure.

        Comment

        • rincewind
          Member
          • Oct 2009
          • 47

          #5
          Originally posted by kooper
          I've just about given up. Is there a place I can maybe log this as a bug? Doubt it's with Zabbix but maybe more FreeBSD, though I cannot be all too sure.
          Finally, I found the problem - it is in wrong configure script of Zabbix. As a dirty patch I upload fixes configure script (it produce a lot of debug, don't look at this) and I'll try to fix configure.in script to give it for developers.
          Attached Files
          Last edited by rincewind; 17-03-2010, 12:29. Reason: my bad English

          Comment

          • kooper
            Junior Member
            • Mar 2010
            • 13

            #6
            Originally posted by rincewind
            Finally, I found the problem - it is in wrong configure script of Zabbix. As a dirty patch I upload fixes configure script (it produce a lot of debug, don't look at this) and I'll try to fix configure.in script to give it for developers.
            Rincewind, thank you very very much!

            I'm going to give this a quick try and will let you know if that solved my issue.

            Comment

            • kooper
              Junior Member
              • Mar 2010
              • 13

              #7
              Still no luck I'm afraid

              Code:
               58951:20100317:134629.390 **** Enabled features ****
               58951:20100317:134629.390 SNMP monitoring:       YES
               58951:20100317:134629.390 IPMI monitoring:        NO
               58951:20100317:134629.392 WEB monitoring:        YES
               58951:20100317:134629.392 Jabber notifications:  YES
               58951:20100317:134629.392 ODBC:                   NO
               58951:20100317:134629.392 SSH2 support:           NO
               58951:20100317:134629.392 IPv6 support:           NO
               58951:20100317:134629.392 **************************

              Not sure if I did it correctly though. Overwrote the configure script in /usr/ports/net-mgmt/zabbix-server/work/zabbix-1.8.1, then went to /usr/ports/net-mgmt/zabbix-server and did this (after first shutting down my running Zabbix server):

              Code:
              make deinstall
              make install
              The config.log file shows:

              Code:
                $ ./configure --enable-server --with-net-snmp --with-ssh2 --with-mysql --with-jabber --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/
               --build=i386-portbld-freebsd8.0 build_alias=i386-portbld-freebsd8.0 CC=cc CFLAGS=-O2 -pipe -fno-strict-aliasing CPPFLAGS=-I/usr/local/include --no-create --
              no-recursion

              Comment

              • rincewind
                Member
                • Oct 2009
                • 47

                #8
                Can you mail me or quote a part of configure output?

                Comment

                • rincewind
                  Member
                  • Oct 2009
                  • 47

                  #9
                  Anyway, here is fixed .m4 libssh2 file, put it into zabbix source root subfolder m4 and then exec autoconf in zabbix source tree.
                  Attached Files

                  Comment

                  • kooper
                    Junior Member
                    • Mar 2010
                    • 13

                    #10
                    Hi Rincewind


                    Sure, output file attached. Thanks for the help so far as well, really appreciate it.


                    Cheers,
                    kooper
                    Attached Files

                    Comment

                    • rincewind
                      Member
                      • Oct 2009
                      • 47

                      #11
                      Originally posted by kooper
                      Not sure if I did it correctly though. Overwrote the configure script in /usr/ports/net-mgmt/zabbix-server/work/zabbix-1.8.1, then went to /usr/ports/net-mgmt/zabbix-server and did this (after first shutting down my running Zabbix server):
                      Code:
                      make deinstall
                      make install
                      try to do
                      Code:
                      make deinstall
                      make configure
                      make
                      make install

                      Comment

                      • rincewind
                        Member
                        • Oct 2009
                        • 47

                        #12
                        Originally posted by kooper
                        Hi Rincewind


                        Sure, output file attached. Thanks for the help so far as well, really appreciate it.


                        Cheers,
                        kooper
                        It seemes that configure is not run on this try. Try to use commands as I wrote before.

                        Comment

                        • kooper
                          Junior Member
                          • Mar 2010
                          • 13

                          #13
                          Giving this a go quick with the files you provided, will let you know in a bit how it turned out.

                          Comment

                          • kooper
                            Junior Member
                            • Mar 2010
                            • 13

                            #14
                            Originally posted by rincewind
                            It seemes that configure is not run on this try. Try to use commands as I wrote before.
                            Rincewind, I owe you big time, it works!

                            Code:
                             72977:20100317:142958.439 **** Enabled features ****
                             72977:20100317:142958.439 SNMP monitoring:       YES
                             72977:20100317:142958.439 IPMI monitoring:        NO
                             72977:20100317:142958.441 WEB monitoring:        YES
                             72977:20100317:142958.441 Jabber notifications:  YES
                             72977:20100317:142958.441 ODBC:                   NO
                             72977:20100317:142958.441 SSH2 support:          YES
                             72977:20100317:142958.441 IPv6 support:           NO
                             72977:20100317:142958.441 **************************

                            Comment

                            • richlv
                              Senior Member
                              Zabbix Certified Trainer
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Oct 2005
                              • 3112

                              #15
                              it looks to me like this problem has not been reported on the tracker - could you please do so ?
                              thanks.
                              Zabbix 3.0 Network Monitoring book

                              Comment

                              Working...