Ad Widget

Collapse

Enable libcURL after compile and install

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aderr
    Junior Member
    • Dec 2011
    • 14

    #1

    Enable libcURL after compile and install

    Is there a way to enable cURL after compiling and installing Zabbix 2.0 from source on CentOS 6?

    Originally we were not going to use Zabbix to monitor web sites, but it has proven to be more robust than previously expected, however I get the error " failed: cURL library is required for Web monitoring support" when trying to monitor a web site. I have verified that libcurl is installed already.

    Code:
    Setting up Install Process
    Package curl-7.19.7-26.el6_2.4.x86_64 already installed and latest version
    Nothing to do
    When I compiled the Zabbix server, I did not use the --with-libcurl option.

    Thanks in advance for any help!
  • Stephen Wood
    Member
    • Feb 2012
    • 43

    #2
    You should just be able to compile it again with whatever components you need.

    Comment

    • aderr
      Junior Member
      • Dec 2011
      • 14

      #3
      Awesome, that worked like a charm.

      Thanks!

      Comment

      • mlaurito
        Junior Member
        • Nov 2012
        • 9

        #4
        I need help about this topic.
        I have the same "cURL library is required.." error.
        Initially i've compiled Zabbix without --with-libcurl, but now i need web monitoring to work so i've compiled it again with --with-libcurl an then ran "make install" but still got the same error.
        I use Zabbix 2.0.3 on Ubuntu Server and everything else is working fine.
        Can someone help me?
        Thx in advance and sorry for my english.

        Comment

        • tchjts1
          Senior Member
          • May 2008
          • 1605

          #5
          Did you restart Zabbix server after the install?

          If so, did you look at the binaries timestamp in your Zabbix directory to make sure they went to the right place?

          Comment

          • mlaurito
            Junior Member
            • Nov 2012
            • 9

            #6
            Originally posted by tchjts1
            Did you restart Zabbix server after the install?

            If so, did you look at the binaries timestamp in your Zabbix directory to make sure they went to the right place?
            Yes i've restarted the server after every reinstall.

            Tell me more about how can i check those timestamps and wich files are those binaries... Thanks

            Comment

            • tchjts1
              Senior Member
              • May 2008
              • 1605

              #7
              Originally posted by mlaurito
              Tell me more about how can i check those timestamps and wich files are those binaries... Thanks
              The file in question would be zabbix_server. When you did your compile statement, did you use a "prefix" such as ./configure --prefix=/usr/local... ?

              if you did something like that, the binary would have gone to /usr/local/sbin

              Best thing to do would be to run these commands either as root or as zabbix user (depending on who is the file owner):
              Code:
              find / -name zabbix_server 2>/dev/null
              This will give you a list of all instances of that file. This is what I see when I do that:

              Code:
              /home/zabbix/source/zabbix-2.0.3/src/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/src/zabbix_server/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/misc/init.d/freebsd/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/misc/init.d/fedora/core/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/misc/init.d/fedora/core5/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/misc/init.d/tru64/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/misc/init.d/suse/9.1/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/misc/init.d/suse/9.2/zabbix_server
              /home/zabbix/source/zabbix-2.0.3/misc/init.d/suse/9.3/zabbix_server
              /home/zabbix/source/compile/sbin/zabbix_server
              /usr/local/sbin/zabbix_server
              For me, the one that is in /usr/local/sbin is my production file. you can run the ls- l command on it to get the timestamp such as this:
              Code:
              # ls -l /usr/local/sbin/zabbix_server
              -rwxr-xr-x. 1 zabbix zabbix 2706547 Dec 10 14:45 /usr/local/sbin/zabbix_server

              and for comparison, one of my older files in another directory shows as this:
              Code:
              # ls -l /home/zabbix/source/compile/sbin/zabbix_server
              -rwxr-xr-x. 1 root root 2701296 Oct 10 15:08 /home/zabbix/source/compile/sbin/zabbix_server

              So, basically you need to know 2 things. Where your current file is that is running for zabbix_server, and where is the one that you just recently compiled.

              I suspect that even though you compiled it correctly, it was not put into the correct directory, and you are still running off the one you compiled without libcurl.

              Comment

              • Stephen Wood
                Member
                • Feb 2012
                • 43

                #8
                Run

                Code:
                $ stat `which zabbix_server`
                And you'll be able to see when it was modified. You might have to install the binaries after compiling. I can't remember.

                Comment

                • mlaurito
                  Junior Member
                  • Nov 2012
                  • 9

                  #9
                  It's so odd.
                  I've checked now the timestamp of my production zabbix_server (located as well in /usr/local/sbin/zabbix_server) and it is getting installed overwriting the old one. The timestamp on that file after doing ./configure then "make" then "make install" is showing me the last time i've compiled and installed...
                  But i keep getting "cURL library is required for Web monitoring support" on one simple web scenario that i've created...

                  Comment

                  • Stephen Wood
                    Member
                    • Feb 2012
                    • 43

                    #10
                    Do you have libcurl installed on the box as well? That might be a requirement.

                    Comment

                    • mlaurito
                      Junior Member
                      • Nov 2012
                      • 9

                      #11
                      Originally posted by Stephen Wood
                      Do you have libcurl installed on the box as well? That might be a requirement.
                      Yes i have installed. On the config.log i see various checks about libcurl installed an all of them seems to be ok.
                      This is so strange...

                      This problem is driving me crazy
                      Last edited by mlaurito; 09-01-2013, 16:21.

                      Comment

                      • Stephen Wood
                        Member
                        • Feb 2012
                        • 43

                        #12
                        I would check also for the dev packages for lib curl.

                        Run this:
                        Code:
                        dpkg --get-selections | grep libcurl
                        On my Zabbix server I see the following:
                        Code:
                        libcurl3					install
                        libcurl3-gnutls					install
                        libcurl4-openssl-dev				install
                        Can you give me more information on the type of check you're running that throws this error?

                        Comment

                        • mlaurito
                          Junior Member
                          • Nov 2012
                          • 9

                          #13
                          That dpkg command shows me exactly the same thing that you.

                          libcurl3 install
                          libcurl3-gnutls install
                          libcurl4-openssl-dev install

                          About the check, is the simplest web scenario with only one step that goes to one url and nothing else. It's just a test web scenario. If you need more info just tell me. Thanks a lot.

                          I'll continue in the seek of a solution for this problem....
                          Last edited by mlaurito; 10-01-2013, 14:32.

                          Comment

                          • Stephen Wood
                            Member
                            • Feb 2012
                            • 43

                            #14
                            Well that's quite unfortunate. I'm out of ideas.

                            If worst comes to worst, there's no reason you can do simple HTTP checks using the command line. For example, this will succesfully tell you if a page is up and sends back a 200:

                            Code:
                            (curl --max-time 10 -fs "http://zabbix.com" > /dev/null && echo 0) || echo 1
                            If it's up you'll get a 0, if it's unreachable or times out you'll get a 1. You can set your trigger appropriately.

                            (Note that Zabbix checks must always return a value).

                            Comment

                            • tchjts1
                              Senior Member
                              • May 2008
                              • 1605

                              #15
                              I have one last thought on this.

                              Are you running your ./configure command from the same directory as the previous time you did a compile?

                              If so, you may want to run make clean at that directory to clean up the previous compile files and then run a fresh ./configure statement.

                              And after you run your ./configure command, and before you run make, what are you seeing for "WEB Monitoring" after it finishes?



                              Enable server: yes
                              Server details:
                              With database: MySQL
                              Code:
                                  WEB Monitoring via:    cURL
                              Native Jabber: yes
                              SNMP: net-snmp
                              IPMI: openipmi
                              SSH: no
                              ODBC: no
                              Linker flags: -rdynamic -L/usr/lib64/mysql -L/usr/lib64 -L/usr/lib64 -L/usr/lib -L/usr/lib
                              Libraries: -lm -lrt -lresolv -lmysqlclient -liksemel -lcurl -lnetsnmp -lcrypto -lnetsnmp -lcrypto -lOpenIPMI -lOpenIPMIposix -lldap -llber

                              Enable proxy: no

                              Enable agent: yes
                              Agent details:
                              Linker flags: -rdynamic -L/usr/lib
                              Libraries: -lm -lrt -lresolv -lcurl -lldap -llber

                              Enable Java gateway: no

                              LDAP support: yes
                              IPv6 support: no

                              ************************************************** *********
                              * Now run 'make install' *
                              * *
                              * Thank you for using Zabbix! *
                              * <http://www.zabbix.com> *
                              ************************************************** *********




                              And then when you start zabbix_server, immediately check your zabbix_server.log and see what it says at the head of the file like this:

                              4031:20130110:154814.324 Starting Zabbix Server. Zabbix 2.0.4 (revision 31984).
                              4031:20130110:154814.324 ****** Enabled features ******
                              4031:20130110:154814.324 SNMP monitoring: YES
                              4031:20130110:154814.324 IPMI monitoring: YES
                              Code:
                                4031:20130110:154814.324 WEB monitoring:            YES
                              4031:20130110:154814.324 Jabber notifications: YES
                              4031:20130110:154814.324 Ez Texting notifications: YES
                              4031:20130110:154814.324 ODBC: NO
                              4031:20130110:154814.324 SSH2 support: NO
                              4031:20130110:154814.324 IPv6 support: NO
                              4031:20130110:154814.324 ******************************

                              Comment

                              Working...