Ad Widget

Collapse

Can't get proxies to work (yes the names are the same) -- Zabbix 2.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clearclaw
    Junior Member
    • Feb 2014
    • 17

    #1

    Can't get proxies to work (yes the names are the same) -- Zabbix 2.2

    Can someone help me with a proxy setup?

    Zabbix Server MySQL 2.2
    Zabbix Proxy 2.2
    Zabbix Agent 2.2

    All under Ubuntu 13.04.

    The agent (prodBETA-lb-0) has the Hostname in zabbix_agent.conf set to prodBETA-lb-0. Ditto the entry on the Zabbix server, as verified by doing "select host from hosts where host='prodBETA-lb-0';" against the server's DB.

    But the server keeps complaining: 15060:20140227:233847.161 cannot send list of active checks to [10.164.38.249]: host [prodBETA-lb-0] not found

    And the Proxy complains on startup: 18455:20140227:234927.846 failed to update local proxy configuration copy: invalid field name "items.snmpv3_authprotocol"
    18470:20140227:234927.860 housekeeper deleted 26 records from history (spent 0.002139 seconds)

    And then once running: 18389:20140227:234046.739 cannot send list of active checks to [10.164.38.249]: host [prodBETA-lb-0] not found

    And the agent complains: 17314:20140227:232446.596 No active checks on server: host [prodBETA-lb-0] not found

    So I'm clearly missing __something___. I've read the forums and the dredged every link I can find on the first 4 pages of results from Google...but no luck so far.

    Other details that were asked about on IRC: The proxy is set to active (ProxyMode=0). The host entries on the Zabbix server were created with the following:

    Code:
    #! /usr/bin/env python
    import json, sys
    from pyzabbix import ZabbixAPI
    c = dict ()
    try:
      zapi = ZabbixAPI ("https://monitorboxhere/")
      zapi.login ("api", "SuperSekritPasswordHere")
      c = zapi.host.create ({                                                              
        "host": "prodBETA-lb-0",
        "interfaces": [                                                                    
          {                                                                                
            "type": 1,                                                                    
            "main": 1,                                                                    
            "useip": 1,                                                                    
            "ip": "10.164.38.249",                                                              
            "dns": "",                                                                    
            "port": "10050"                                                                
          },                                                                              
          {                                                                                
           "type": 2,                                                                      
            "main": 1,                                                                    
            "useip": 1,                                                                    
            "ip": "10.164.38.249",                                                              
            "dns": "",                                                                    
            "port": "161"                                                                  
          }                                                                                
        ],                                                                                
        "templates": [                                                                    
          {                                                                                
            "templateid": "10050" # Zabbix agent                                                        
          },                                                                              
          {                                                                                
            "templateid": "10069" # SNMP Linux                                                    
          },
          {                                                                                
            "templateid": "10102" # SSH
          },
          {                                                                                
            "templateid": "10095" # HTTPS
          },
     
          {                                                                                
            "templateid": "10104" # Ping                                                          
          },      
        ],
        "groups": [{"groupid": "9"}], 
        "proxy_hostid": "10108",
        }                                                                                  
      )                                                                                    
      change = "yes"                                                                      
      verb = json.dumps (c)                                                                
      rc = 0                                                                              
    except Exception as e:                                                                
      c["exception"] = str (e)                                                            
      change = "no"                                                                        
      verb = json.dumps (c)                                                                
      rc = 1                                                                              
    print                                                                                  
    print "changed=%s comment='%s'" % (change, verb)                                      
    sys.exit (rc)
    The result of the above script is what looks like a good host entry for prodBETA-lb-0 in the Zabbix PHP frontend..

    Logs from the proxy with debuglevel set to 4 can be found here: http://pastebin.com/SkBnHMJi

    What am I missing? It would be really nice to get this working.

    -- JCL

    PS zabbix_server.conf:

    Code:
    LogFile=/var/log/zabbix/zabbix_server.log
    LogFileSize=0
    PidFile=/var/run/zabbix/zabbix_server.pid
    DBHost=ops-zabbix-db.caio0hscwe7s.us-east-1.rds.amazonaws.com
    DBName=zabbix
    DBUser=zabbix
    DBPassword=SomeSekritHere
    DBPort=3306
    AlertScriptsPath=/usr/lib/zabbix/alertscripts
    ExternalScripts=/usr/lib/zabbix/externalscripts
    FpingLocation=/usr/bin/fping
    Fping6Location=/usr/bin/fping6
    zabbix_proxy.conf:

    Code:
    ProxyMode=0
    Server=10.168.24.153
    Hostname=prodBETA-mon-master
    LogFile=/var/log/zabbix/zabbix_proxy.log
    LogFileSize=0
    DebugLevel=3
    PidFile=/var/run/zabbix/zabbix_proxy.pid
    DBName=/var/lib/zabbix/zabbix_proxy.db
    ProxyOfflineBuffer=24
    ExternalScripts=/usr/lib/zabbix/externalscripts
    FpingLocation=/usr/bin/fping
    Fping6Location=/usr/bin/fping6
    zabbix_agent.conf:

    Code:
    PidFile=/var/run/zabbix/zabbix_agentd.pid
    LogFile=/var/log/zabbix/zabbix_agentd.log
    LogFileSize=0
    EnableRemoteCommands=1
    LogRemoteCommands=1
    Server=10.168.24.153,10.185.3.248 # First address is the server, second the proxy
    ServerActive=10.168.24.153,10.185.3.248
    Hostname=prodBETA-lb-0
    Include=/etc/zabbix/zabbix_agentd.d/
    Last edited by clearclaw; 28-02-2014, 08:24.
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    What may be more useful to us to give you some help, is if you show your conf files.

    From the proxy: zabbix_proxy.conf
    From the host: zabbix_agentd.conf

    You can put each one of those between code tags (remove the spaces)

    [ c o d e ]
    Put your code here
    [ / c o d e ]

    Comment

    • clearclaw
      Junior Member
      • Feb 2014
      • 17

      #3
      Config files for the above

      zabbix_server.conf (comments stripped):
      Code:
      LogFile=/var/log/zabbix/zabbix_server.log
      LogFileSize=0
      PidFile=/var/run/zabbix/zabbix_server.pid
      DBHost=ops-zabbix-db.caio0hscwe7s.us-east-1.rds.amazonaws.com
      DBName=zabbix
      DBUser=zabbix
      DBPassword=SomeSekritThing
      DBPort=3306
      AlertScriptsPath=/usr/lib/zabbix/alertscripts
      ExternalScripts=/usr/lib/zabbix/externalscripts
      FpingLocation=/usr/bin/fping
      Fping6Location=/usr/bin/fping6
      zabbix_proxy.conf (comments stripped):

      Code:
      ProxyMode=0
      Server=10.168.24.153
      Hostname=prodBETA-mon-master
      LogFile=/var/log/zabbix/zabbix_proxy.log
      LogFileSize=0
      DebugLevel=3
      PidFile=/var/run/zabbix/zabbix_proxy.pid
      DBName=/var/lib/zabbix/zabbix_proxy.db
      ProxyOfflineBuffer=24
      ExternalScripts=/usr/lib/zabbix/externalscripts
      FpingLocation=/usr/bin/fping
      Fping6Location=/usr/bin/fping6
      zabbix_agent.conf:

      Code:
      PidFile=/var/run/zabbix/zabbix_agentd.pid
      LogFile=/var/log/zabbix/zabbix_agentd.log
      LogFileSize=0
      EnableRemoteCommands=1
      LogRemoteCommands=1
      Server=10.168.24.153,10.185.3.248 # First address is the server, second the proxy
      ServerActive=10.168.24.153,10.185.3.248
      Hostname=prodBETA-lb-0
      Include=/etc/zabbix/zabbix_agentd.d/
      Last edited by clearclaw; 28-02-2014, 09:39.

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        One possible issue that I see is in your zabbix_agentd.conf file(s).

        I am going to make some assumptions here. If you have a host assigned to a proxy, you want the host to report all items to that proxy, regardless of the item being active or passive. This is the same setup that I have.

        For that to be the case, on your hosts, make these 2 fields look like this and restart your agents:

        Server=Your zabbix proxy IP,Your Zabbix server IP (Note the order)
        ServerActive=Your zabbix proxy IP only

        If you have ServerActive with multiple IP's, you are going to get some strange behavior. The host will alternate which IP it checks into and you would end up getting a lot of alerts. (Unless they made this more user friendly in 2.2)

        Try that setup and see if it brings you any closer to a solution.

        Comment

        • clearclaw
          Junior Member
          • Feb 2014
          • 17

          #5
          Your assumptions are correct. Done.

          zabbix_agent.conf:

          Code:
          PidFile=/var/run/zabbix/zabbix_agentd.pid
          LogFile=/var/log/zabbix/zabbix_agentd.log
          LogFileSize=0
          EnableRemoteCommands=1
          LogRemoteCommands=1
          Server=10.185.3.248,10.168.24.153
          ServerActive=10.185.3.248
          Hostname=prodBETA-lb-0
          Include=/etc/zabbix/zabbix_agentd.d/
          Everything restarted, starting with the agent.

          Server:18816:20140228:171529.476 No active checks on server: host [prodBETA-lb-0] not found

          Proxy: 20477:20140228:171320.859 cannot send list of active checks to [10.164.38.249]: prodBETA-lb-0] not found

          Agent: 18816:20140228:171329.461 No active checks on server: host [prodBETA-lb-0] not found

          And prodBETA-lb-0 is still not monitored.
          Last edited by clearclaw; 28-02-2014, 19:30.

          Comment

          • aib
            Senior Member
            • Jan 2014
            • 1615

            #6
            just from the top of my head: As I can see all devices (server,proxy,client) are placed in different IT networks. Did you check any potential Firewall/Routing rules about restriction of ports? Did you check from the client side that you can reach proxy and connect to proxy port?

            sorry if you already checked all network stuff..
            Sincerely yours,
            Aleksey

            Comment

            • clearclaw
              Junior Member
              • Feb 2014
              • 17

              #7
              Yes, I can telnet on ports 10050 and 10051 (and do snmpwalks) from every box mentioned to every other box mentioned (and this has been repeatedly verified).

              As for the networks, behold AWS!

              Comment

              • aib
                Senior Member
                • Jan 2014
                • 1615

                #8
                one more silly question: Of course, you tried DebugLevel=4 and check all LOG-files?
                Sincerely yours,
                Aleksey

                Comment

                • clearclaw
                  Junior Member
                  • Feb 2014
                  • 17

                  #9
                  I've been doing that, yes, but those logs sure are busy! (Proxy log posted above) So far I've not seen any obviously smoking guns other than the IT NO WORKEE.

                  I'll get a server and agent log posted in a bit in case I'm missing something.

                  Comment

                  • tchjts1
                    Senior Member
                    • May 2008
                    • 1605

                    #10
                    Originally posted by clearclaw
                    And prodBETA-lb-0 is still not monitored.
                    But... you do have it "enabled", right?

                    Comment

                    • clearclaw
                      Junior Member
                      • Feb 2014
                      • 17

                      #11
                      In the web UI I have it marked as Status: Monitored. Is that what you mean?

                      Last edited by clearclaw; 28-02-2014, 21:12.

                      Comment

                      • aib
                        Senior Member
                        • Jan 2014
                        • 1615

                        #12
                        Correct me if I am wrong: on your screenshot BOTH "Agent Interface" and "SNMP interfaces" has active options "REMOVE" ?
                        It means that no any interfaces is used in any items...
                        1 Configuring a host
                        Code:
                        Note: Interfaces that are used in any items cannot be removed 
                        and link Remove is greyed out for them.
                        Do you mind to show the list of Items to see what Type of check do you use?
                        Sincerely yours,
                        Aleksey

                        Comment

                        • clearclaw
                          Junior Member
                          • Feb 2014
                          • 17

                          #13
                          That remove text is not a link/actionable. Its just grayed out text.

                          The items page for that host:

                          Comment

                          • aib
                            Senior Member
                            • Jan 2014
                            • 1615

                            #14
                            From your screenshot I can say that everything is OK.
                            No errors, all items are monitoring...

                            Did you try - just for experiment - to change from "Zabbix agent" to "Zabbix agent(active)"

                            Also check this theme Zabbix 2.2 proxy queue is huge!

                            Somewhere in the middle of second page they concluded that it is really important to have all elements time synchronized. Even a couple of seconds difference between time on proxy and on server can give your a strong headache. I saw from your previous postings that you possible(!) have two minutes difference. Just do some polish, OK?
                            Sincerely yours,
                            Aleksey

                            Comment

                            • clearclaw
                              Junior Member
                              • Feb 2014
                              • 17

                              #15
                              Not to rant (Okay, I'm a wee bit frustrated), but if all items are monitoring, then why isn't the "Z' icon green? Why don't I have any graphs for prodBETA-lb-0? Home come the monitoring console is still showing Alerts that prodBETA-lb-0 is unreachable? I get all of those fine and happy things if I configure prodBETA-lb-0 to go direct and not through the prodBETA-mon-master proxy.

                              Something is not adding up to me.

                              Comment

                              Working...