Ad Widget

Collapse

Zabcon is now easier to install!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #1

    Zabcon is now easier to install!

    Zabcon just got easier to install. Just be sure you have ruby gems installed and issue the following command (you may need to be root)

    gem install zabcon

    This should then install Zabcon into your path (zabcon.rb) and install all of the requisite dependencies.

    The same is also true for the api library used by zabcon (zbxapi). This is also available as a ruby gem.

    gem install zbxapi

    If you have issues please let me know.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

  • sbockelman
    Junior Member
    • Oct 2008
    • 16

    #2
    zabcon.rb install location

    I ran the install commands, but I am unable to locate the zabcon.rb executable. Where should it be located? I installed it using ubuntu 10.10.

    Comment

    • nelsonab
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2006
      • 1233

      #3
      Interesting... on my test/dev system (Fedora) it installed it in /usr/bin, which was also in my path.

      If you have locate installed update the database first "updatedb" then "locate zabcon.rb". The first command needs to be done as root.

      Also on my system everything was installed into /usr/lib/ruby/gems/1.8/gems/zabcon-0.0.1

      This includes the default zabcon.conf file. Right now Zabcon will only look for the conf file in the current directory of where the program was run. I hope to have that fixed to where it will look in some common locations.

      Hopefully that helps
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment

      • zabbix_zen
        Senior Member
        • Jul 2009
        • 426

        #4
        Just for newbies reference,

        use your distro package manager to install the necessary packages,

        Eg. for Fedora,
        yum install ruby ruby-devel rubygems ruby-irb ruby-rdoc ruby-libs

        Now you just have to use the commands Nelson's explained.

        Comment

        • zabbix_zen
          Senior Member
          • Jul 2009
          • 426

          #5
          Nelson could you help me?

          Though the Fedora install went flawless I've bumped into weird thing installing it in RHEL5.

          First things first, as zabcon requires ruby-1.8.6 and RHEL5 stock repos have ruby-1.8.5 I've had to download CentOS rpms:

          1)
          ruby-1.8.6.383-6.el5.kb
          ruby-devel-1.8.6.383-6.el5.kb
          ruby-rdoc-1.8.6.383-6.el5.kb
          ruby-libs-1.8.6.383-6.el5.kb
          ruby-irb-1.8.6.383-6.el5.kb

          2) Installed rubygems-1.4.2

          3) Successfuly installed the following gems:
          json-1.1.9.gem
          parseconfig-0.5.2.gem
          highline-1.5.2.gem
          zabbixapi-0.1.3.gem

          4) zabcon gem installation fails....

          gem install --local zabcon-0.0.5.gem
          ERROR: Error installing zabcon-0.0.5.gem:
          zabcon requires zbxapi (>= 0.1, runtime)


          Why isn't it recognizing zbxapi ?
          (Actually why does it test for zbxapi since you changed the name to zabbixapi as per RubyForge rules?)

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #6
            You have zabbixapi installed not zbxapi... Similar names, different gems... :-(
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            • zabbix_zen
              Senior Member
              • Jul 2009
              • 426

              #7
              Right

              Not used to Ruby stuff.
              gem default behavior to download from the repo forced me to scour the internet in a gem quest,
              later I've installed them locally (to avoid proxy configuration)

              Working now !

              Comment

              • nelsonab
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2006
                • 1233

                #8
                I should have thought ahead and given you this link:


                But I figured "gem install zbxapi" would have worked.

                I think I should give zabcon some love over the next week or two. Clean up the gem and maybe rewrite the api gem like I've been thinking about lately.
                RHCE, author of zbxapi
                Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
                Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

                Comment

                • zabbix_zen
                  Senior Member
                  • Jul 2009
                  • 426

                  #9
                  It would have, and it did on my personal Fedora.

                  I've got this wrong because I've tried to avoid the proxy config on gem (didn't know how to do it)

                  Unsure if I should have opened a different Thread but..

                  After logging in to zabbix server via zabcon,
                  I receive a couple of lines and it always ends like this,

                  Code:
                  Pause, q to quit, a to stop pausing output/usr/lib64/ruby/gems/1.8/gems/highline-1.5.2/lib/highline/system_extensions.rb:186:in `get_character': undefined method `getbyte' for #<IO:0x2b4dd5a0fef8> (NoMethodError)
                  Any idea why ?

                  Comment

                  • nelsonab
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Sep 2006
                    • 1233

                    #10
                    Hmmm... I can't say I know what the issue in with the highline library... Can you reproduce it consistently?
                    RHCE, author of zbxapi
                    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
                    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

                    Comment

                    • untergeek
                      Senior Member
                      Zabbix Certified Specialist
                      • Jun 2009
                      • 512

                      #11
                      Code:
                      $ zabcon.rb 
                      x86_64-linux
                      Checking dependencies
                      Found valid login credentials, attempting login
                      Segmentation fault
                      Any ideas here?

                      Comment

                      Working...