Ad Widget

Collapse

External item support for zabbix and more utils

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • limo
    Senior Member
    • Dec 2004
    • 192

    #1

    External item support for zabbix and more utils

    Hello,

    Here is unofficial patch which adds external item support.

    It means you can fetch item using external command.
    Instead of simple check or zabbix agent, zabbix server executes external script and gets output of this script as a result when fetching value.

    We use this patch to make zabbix agent protocol secure tunneling it over ssh but there are more things to do using this approach.

    This patch is good for people who have some servers hidden behind firewalls and have ssh server on that firewall. All data transmitted to hidden hosts will be encryopted using ssh protocol.

    To install this, you will need to put:
    - /etc/zabbix/zabbix_get_item into place,
    - /etc/zabbix/proxies.conf (definitions of servers and proxies)
    - generate ssh keys without passphrase to get to servers

    Patch includes utility to add host from commandline and script to import image. All of this is precompiled and working within debian repository
    deb http://mirror.opf.slu.cz/zabbix unstable contrib

    Here is patch:
  • naparuba
    Junior Member
    • Feb 2005
    • 11

    #2
    Great job, thanks, this can be very usefull

    Comment

    • klavs
      Junior Member
      • Apr 2005
      • 18

      #3
      Alexei - any plans to add this to 1.1alpha series? It would be great to have the ability to extend zabbix_server tests, as there are many checks that should be done from the server (such as ping and icmppingsec is done), such as website-response-times etc.

      Comment

      • torsten
        Junior Member
        • Apr 2005
        • 1

        #4
        Hello,
        can you please explain in short words how to work with these external items?
        I looked around at the zabbix_get_item, but I can't find out how to implement my own Scripts. And what input I have to place at the web-frontend?

        Thanks for any response!

        Comment

        • limo
          Senior Member
          • Dec 2004
          • 192

          #5
          Next release of patched zabbix

          Hello,

          please see http://mirror.opf.slu.cz/zabbix for more informations. There is new patched version of zabbix whci we use. Please note this is unofficial patch. I have no time now to put only patch here, please if you need another then deb packages, extract sources from it.. Also note we use external software (overlib) and I do not know if Alex will like it

          Please feel free to test it ! If results will be good, maybe there will be possibility to put into zabbix 1.x !

          Just a small parts of changelog:

          zabbix (1.1alpha7-3) unstable; urgency=low

          * Proof of concept in snmp browse directly in web interface (try click to
          SNMP OID in item definition)
          * Select / deselect all items works (try Check All button in the bottom)
          * Support for overlib (http://www.bosrup.com/web/overlib/)
          * Little better docs for external item support
          * Added template for external host (only items now)

          Here is little bit more documented proxies.conf. (I know this needs much more work, sorry)

          # Definitions of proxies
          # You need to set item as external to make it working

          # Zabbix external item support is way how to run external command from zabbix server
          # to get data. If you add host in zabbix frontend, and this host is not accessible directly
          # from zabbix server, you can use this way how to get inside your network
          # This is only proof-of-concept, there is lot of work to make it realy usable.
          # Now only ssh tunnels are supported
          # Unfotunately, onn remote side, netcat (command nc) has to be instaled
          # You need to set ssh keys (see ssh-keygen), to access [email protected]
          # next you have to add your key into .authorized_keys on remote side
          #

          # examples

          #
          # You have gateway which is accessible via ssh and has external ip 1.2.3.4
          # zabbix will log into [email protected] and ask servers behind nat to their
          # zabbix agents

          %servers = (
          # This hostname has to be equal to hostname in zabbix frontend
          'samba.masqueraded' => {
          'type' => 'ssh',
          # external gateway ip
          'gwip' => '1.2.3.4',
          'sshkey' => '/home/zabbix/.ssh/id_dsa',
          'sshuser' => 'zabbix'
          },
          # This hostname has to be equal to hostname in zabbix frontend
          'intranet' => {
          'type' => 'ssh',
          # external gateway ip
          'gwip' => '2.3.4.5',
          'sshkey' => '/home/zabbix/.ssh/id_dsa',
          'sshuser' => 'zabbix'
          },
          );

          Comment

          Working...