Ad Widget

Collapse

Problem with Zabbix not discover hosts, don't working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jorge
    Junior Member
    • Apr 2014
    • 14

    #1

    Problem with Zabbix not discover hosts, don't working

    Hi,

    I have a problem with discover any hosts and discovery rules don't working with zabbix agent and snmp configuration. Installed version is Zabbix 2.2 in Linux Centos 6.4. The snmpstatus works correctly in all hosts and zabbix server I have these iptables rules configured in the Firewall:

    -A INPUT -p udp -m state --state NEW -m udp --dport 161 -j ACCEPT
    -A INPUT -p udp -m state --state NEW -m udp --dport 162 -j ACCEPT
    -A INPUT -p tcp -m state --state NEW -m tcp --dport 10050 -j ACCEPT
    -A INPUT -p tcp -m state --state NEW -m tcp --dport 10051 -j ACCEPT

    This is my zabbix server configuration:

    ### Option: ListenPort
    # Listen port for trapper.
    #
    # Mandatory: no
    # Range: 1024-32767
    # Default:
    #ListenPort=10051

    ### Option: SourceIP
    # Source IP address for outgoing connections.
    #
    # Mandatory: no
    # Default:
    # SourceIP=

    ### Option: DebugLevel
    # Specifies debug level
    # 0 - no debug
    # 1 - critical information
    # 2 - error information
    # 3 - warnings
    # 4 - for debugging (produces lots of information)
    #
    # Mandatory: no
    # Range: 0-4
    # Default:
    # DebugLevel=4

    ### Option: DBHost
    # Database host name.
    # If set to localhost, socket is used for MySQL.
    #
    # Mandatory: no
    # Default:
    # DBHost=localhost

    DBHost=localhost

    ### Option: DBName
    # Database name.
    # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
    #
    # Mandatory: yes
    # Default:
    # DBName=

    DBName=zabbix

    ### Option: DBSchema
    # Schema name. Used for IBM DB2.
    #
    # Mandatory: no
    # Default:
    # DBSchema=

    ### Option: DBUser
    # Database user. Ignored for SQLite.
    #
    # Mandatory: no
    # Default:
    # DBUser=

    DBUser=zabbix

    ### Option: DBPassword
    # Database password. Ignored for SQLite.
    # Comment this line if no password is used.
    #
    # Mandatory: no
    # Default:
    DBPassword=zabbix


    ### Option: DBSocket
    # Path to MySQL socket.
    #
    # Mandatory: no
    # Default:
    DBSocket=/var/lib/mysql/mysql.sock

    ### Option: DBPort
    # Database port when not using local socket. Ignored for SQLite.
    #
    # Mandatory: no
    # Range: 1024-65535
    # Default (for MySQL):
    # DBPort=3306

    ############ ADVANCED PARAMETERS ################


    ### Option: StartTrappers
    # Number of pre-forked instances of trappers.
    #
    # Mandatory: no
    # Range: 0-1000
    # Default:
    # StartTrappers=1


    ### Option: StartDiscoverers
    # Number of pre-forked instances of discoverers.
    #
    # Mandatory: no
    # Range: 0-250
    # Default:
    # StartDiscoverers=1

    ### Option: ListenIP
    # List of comma delimited IP addresses that the trapper should listen on.
    # Trapper will listen on all network interfaces if this parameter is missing.
    #
    # Mandatory: no
    # Default:
    # ListenIP=0.0.0.0
    # ListenIP=127.0.0.1

    This is my zabbix agent configuration:

    ### Option: DebugLevel
    # Specifies debug level
    # 0 - no debug
    # 1 - critical information
    # 2 - error information
    # 3 - warnings
    # 4 - for debugging (produces lots of information)
    #
    # Mandatory: no
    # Range: 0-4
    # Default:
    # DebugLevel=4

    ### Option: SourceIP
    # Source IP address for outgoing connections.
    #
    # Mandatory: no
    # Default:
    # SourceIP=

    ### Option: EnableRemoteCommands
    # Whether remote commands from Zabbix server are allowed.
    # 0 - not allowed
    # 1 - allowed
    #
    # Mandatory: no
    # Default:
    #EnableRemoteCommands=1

    ##### Passive checks related

    ### Option: Server
    # List of comma delimited IP addresses (or hostnames) of Zabbix servers.
    # No spaces allowed. If ServerActive is not specified, the first entry is used
    # for receiving list of and sending active checks.
    # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
    #
    # Mandatory: yes
    # Default:
    # Server=

    Server=172.31.150.250

    ### Option: ServerActive


    # Mandatory: no
    # Default:
    # ServerActive=

    ### Option: ListenPort
    # Agent will listen on this port for connections from the server.
    #
    # Mandatory: no
    # Range: 1024-32767
    # Default:
    # ListenPort=10050

    ### Option: ListenIP
    # List of comma delimited IP addresses that the agent should listen on.
    #
    # Mandatory: no
    # Default:
    # ListenIP=0.0.0.0

    ### Option: DisablePassive
    # Disable passive checks. The agent will not listen on any TCP port.
    # Only active checks will be processed.
    # 0 - do not disable
    # 1 - disable
    #
    # Mandatory: no
    # Default:
    # DisablePassive=0

    ##### Active checks related

    ### Option: DisableActive
    # Disable active checks. The agent will work in passive mode listening for server.
    #
    # Mandatory: no
    # Default:
    # DisableActive=0

    ### Option: ServerPort
    # Server port for retrieving list of and sending active checks.
    #
    # Mandatory: no
    # Default:
    # ServerPort=10051


    ### Option: AllowRoot
    # Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent
    # will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
    # 0 - do not allow
    # 1 - allow
    #
    # Mandatory: no
    # Default:
    # AllowRoot=0

    ############ ADVANCED PARAMETERS #################

    ### Option: StartAgents
    # Number of pre-forked instances of zabbix_agentd that process passive checks.
    #
    # Mandatory: no
    # Range: 1-100
    # Default:
    # StartAgents=3

    This is my snmptrap configuration:

    ZABBIX_SERVER="172.31.150.250";
    ZABBIX_PORT="10051";

    ZABBIX_SENDER="zabbix_sender";

    KEY="snmptraps";
    HOST="snmptraps";


    Please Help.
  • Jorge
    Junior Member
    • Apr 2014
    • 14

    #2
    This is the Dashboard of my Zabbix Server:

    Please Help.
    Last edited by Jorge; 06-06-2014, 00:09.

    Comment

    • Jorge
      Junior Member
      • Apr 2014
      • 14

      #3
      If zabbix does not work and discovers hosts correctly I'll have to install another monitoring tool like Nagios or Cacti.

      Please Help me

      Comment

      • ingus.vilnis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2014
        • 908

        #4
        Hello and welcome!

        You could set # StartDiscoverers value in zabbix_server.conf file to somewhat higher (depending on the load of your discoverer processes which you can monitor in zabbix internal graphs).

        The other thing that comes to mind is your discovery settings in Configuration -> Discovery
        Probably something is wrong there (delay interval, IP range, check types or else). Check them or post them here so we can have more info on your problem.

        Best Regards,
        Ingus

        Comment

        • Jorge
          Junior Member
          • Apr 2014
          • 14

          #5
          Hi,

          Thank you for your answer. Discovery rules don't working with zabbix agent and snmp configuration. Installed version is Zabbix 2.2.2 in Linux Centos 6.4.There are some rules discovery in my Zabbix Sever (mng01bog) with IP address 172.31.150.250, and aditionally somes traps snmp to host dns01bog IP address 172.31.150.253. The zabbix_server.conf and zabbix_agent.conf files of my Zabbix Server are located higher on the first post I wrote.



          Best Regards. Please Help.
          Last edited by Jorge; 06-06-2014, 00:09.

          Comment

          • ingus.vilnis
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2014
            • 908

            #6
            I am wondering why would you use Discovery here.

            If I understand right, in one case you want to monitor system uptime value with SNMP for one particular switch, for example 172.31.150.5

            To do so, you just have to add your device with its unique IP to Configuration -> Hosts and add monitoring Item with type SNMP as described here: https://www.zabbix.com/documentation...itemtypes/snmp

            Then take another device with another IP and do the same and so on until you see how Zabbix monitoring concept works.

            I think there is no need to use discovery rules for one particular IP only as I see in your screenshots. Discovery is more useful when you set an IP range (e.g. 172.31.150.1-172.31.150.254) and then define (Configuration -> Actions) what to do with the devices Zabbix has discovered.

            Hope this helps!
            Best Regards,
            Ingus

            Comment

            Working...