Ad Widget

Collapse

LLDiscovery (SoftRAID, smart) behind the proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jancs
    Member
    • Jul 2014
    • 30

    #1

    LLDiscovery (SoftRAID, smart) behind the proxy

    Hi!

    Can't figure out what I am doing wrong:
    I have Linux hosts behind the FWs and I want to monitor softRAID and SMART info of them.
    I have already installed respective discovery scripts/userparameters and have them working on servers exposed directly to internet, but cant succeed to get it running in case of machines behind the firewalls+zabbix proxies. I get some info through them (cpu loads, fs info etc), but the LLD discovery rules do not work.

    Janis
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    It is hard to help when the term "do not work" is used to describe the problem. :-)
    Is the discovery rule in NOTSUPPORTED state? Then see the error message when mouseover the red icon. Did you enable DebugLevel 4 on agent and checked the log for the discovery rule name? Have you tried to run the discovery rule manually by using zabbix_get?

    Comment

    • jancs
      Member
      • Jul 2014
      • 30

      #3
      Hi! It all boiled down to quite complex firewall/smartctl permissions issues I am slowly unwinding. I succeeded with two machines, few more are waiting their turn.
      I had various messages in red, starting form the most promising one regarding required JSON object and ending with strange communication denial messages.

      Regarding manual running of zabbix_get on server - I would be extremely happy to see an example of it - I had asked but got no help (it is either too simple to help or too complex to try to help). No examples in Zabbix manual, either. It seems.

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        It is quite easy. zabbix_get acts as zabbix server/proxy, getting the metric from agent. A request is exactly the same so agent "thinks" it is server/proxy asking for metric value. Of course, only passive checks will work this way.

        In order to test network interface discovery, run the following command from the host that runs server/proxy, specifying details of the agent, IP and port:
        Code:
        $ zabbix_get -s 127.0.0.1 -p 10051 -k net.if.discovery | jq -SC .
        
        [B]{[/B]
        [B]  "data"[/B][B]: [[/B]
        [B]     {[/B]
        [B]        "{#IFNAME}"[/B][B]: [/B]"docker0"
        [B]     },[/B]
        [B]     {[/B]
        [B]        "{#IFNAME}"[/B][B]: [/B]"lo"
        [B]     },[/B]
        [B]     {[/B]
        [B]        "{#IFNAME}"[/B][B]: [/B]"eth1"
        [B]     }[/B]
        [B]  ][/B]
        [B]}[/B]
        You can test any LLD rule that is supported by agent this way.

        If you don't have zabbix_get installed, install it by issuing:
        Code:
        apt install zabbix-get
        or
        Code:
        yum install zabbix-get
        depending on your distro. By the way, here's the link to documentation about zabbix_get utility:

        https://www.zabbix.com/documentation...l/concepts/get

        Comment

        • jancs
          Member
          • Jul 2014
          • 30

          #5
          OK, but if I want to test it from the server side going through proxy (to isolate the influence of local persmissions)? The agent's address will be smth like 192.168.45.90, so server with real IP will get lost trying to find it.

          I am on Slackware.

          Comment

          • dimir
            Zabbix developer
            • Apr 2011
            • 1080

            #6
            If the host is monitored by proxy you would want to run that command from proxy host. Doing this test from server through proxy is unfortunately not supported.

            Comment

            • kloczek
              Senior Member
              • Jun 2006
              • 1771

              #7
              Originally posted by dimir
              If the host is monitored by proxy you would want to run that command from proxy host. Doing this test from server through proxy is unfortunately not supported.
              And of course zabbix_get works only when passive agent setup is used.
              http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
              https://kloczek.wordpress.com/
              zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
              My zabbix templates https://github.com/kloczek/zabbix-templates

              Comment

              Working...