Ad Widget

Collapse

Help with basic zabbix config.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rstogsdill
    Junior Member
    • Nov 2012
    • 14

    #1

    Help with basic zabbix config.

    Delete post.
    Last edited by rstogsdill; 15-05-2013, 23:19.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Originally posted by rstogsdill
    I have zabbix (2.0.6) installed and running on Centos 6.4. I have downloaded the zabbix agent and installed it to one of my dev servers. No matter what I do, I can not get it to show up as being monitored in host configuration. I have turned off (disabled) the centos firewall on both machines. On the zabbix server I can telnet to 10050 and 10051 showing the service is listening on those ports. On the server I am trying to monitor, I cannot telent to localhost 10051 no matter what I do. What do I need to do to fix this? I have tried everything I can think of. I know that it is not listening on 10051 (10050 works). I know I am missing something simple here but for the life of me I dont know what.
    Did you build your own zabbix packages, or did you install from e.g. EPEL?

    Either way, there should be a configuration file that zabbix_agentd will read to determine a few important parameters (like what server(s) can request items, etc.). In addition, the config file will specify where the zabbix_agentd will *log*.

    So, find the configuration file. It's probably in /etc/zabbix/zabbix_agentd.conf, or perhaps just /etc/zabbix_agentd.conf. Things from
    the configuration file that I typically change are:
    Code:
    # make sure /var/run/zabbix exists and is owned & writeable by the zabbix
    # user
    PidFile=/var/run/zabbix/zabbix_agentd.pid
    # ditto for /var/log/zabbix
    LogFile=/var/log/zabbix/zabbix_agentd.log
    
    # YOU MUST SET THIS.  The default setting (127.0.0.1) means
    # zabbix_agentd will only accept connections from localhost.
    Server=your_zabbix_server_here
    
    # if you're not using "active" monitoring (where Zabbix's definition of active
    # means the client sends unsolicited data to the server), then you should
    # comment out the "ServerActive" setting.
    # otherwise, it should be set to the same thing that Server is set to.
    ServerActive=
    
    #
    # if Hostname is uncommented, I recommend you COMMENT IT OUT.  It's
    # a poor default setting to set it via the config file on Linux.  Read the
    # comments for Hostname and HostnameItem for more info.

    Once you've verified these settings are appropriate for your environment, then you should

    - restart the zabbix_agentd
    - verify with "ps" on the client that it's running
    - verify with netstat or lsof that it's listening on the network
    - review any entries in the zabbix_agentd.log file.

    Once you've done that, try connecting manually from the Zabbix server:

    - run "zabbix_get" as the zabbix user, e.g.

    Code:
      sudo -u zabbix /usr/local/sbin/zabbix_get \
             -s your_client_name_here -p 10050 \
             -k 'system.cpu.load[percpu,avg1]'
    If it generates reasonable output, it means the zabbix server can connect to the agent running on the client you specified and get the 1 minute load average.

    Comment

    • rstogsdill
      Junior Member
      • Nov 2012
      • 14

      #3
      I managed to fumble around and get it working. Thanks for the great post.. Good info in there for troubleshooting. Save and sent to evernote!

      Comment

      Working...