安装zabbix-agent

http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/

下载:zabbix-agent-3.2.0-1.el6.x86_64.rpm

[root@check3 ~]# rpm -ivh zabbix-agent-3.2.0-1.el6.x86_64.rpm
[root@check3 ~]# cd /etc/zabbix/
[root@check3 zabbix]# mv zabbix_agentd.conf /tmp/
[root@check3 zabbix]# rpm -ivh /root/zabbix-agent-3.2.0-1.el6.x86_64.rpm

配置zabbix_agent

[root@check3 zabbix]# vim /etc/zabbix/zabbix_agentd.conf

# This is a configuration file for Zabbix agent daemon (Unix)
# To get more information about Zabbix, visit http://www.zabbix.com ############ GENERAL PARAMETERS ################# ### Option: PidFile
# Name of PID file.
#
# Mandatory: no
# Default:
# PidFile=/tmp/zabbix_agentd.pid PidFile=/var/run/zabbix/zabbix_agentd.pid #指定程序PID文件的路径,可修改到其他路径,但SNC不建议修改 ### Option: LogType
# Specifies where log messages are written to:
# system - syslog
# file - file specified with LogFile parameter
# console - standard output
#
# Mandatory: no
# Default:
# LogType=file #客户端agent运行产生的日志文件路径,可修改到其他路径 ### Option: LogFile
# Log file name for LogType 'file' parameter.
#
# Mandatory: no
# Default:
# LogFile= LogFile=/var/log/zabbix/zabbix_agentd.log ### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
#
# Mandatory: no
# Range: 0-1024
# Default:
# LogFileSize=1 LogFileSize=0 #agent产生的日志大小控制,默认为1M,若为0,则表示不产生任何日志,数字范围(1-1024) ### Option: DebugLevel
# Specifies debug level:
# 0 - basic information about starting and stopping of Zabbix processes #无日志级别
# 1 - critical information #灾难信息级别
# 2 - error information #一般错误级别
# 3 - warnings #警告级别
# 4 - for debugging (produces lots of information) #调试级别
# 5 - extended debugging (produces even more information)
# #说明:0~4级别,日志产生量在相同单位时间,生产的日志量为递增,即0级别日志量最少,4级别最多,默认3级别,建议视具体情况执行把握
# Mandatory: no
# Range: 0-5
# Default:
# DebugLevel=3 ### Option: SourceIP
# Source IP address for outgoing connections.
#
# Mandatory: no
# Default:
# SourceIP= #当系统设置有多个IP时,需要指定一个IP与二级代理或服务器通信,若系统只有一个IP,也建议指定一个 ### Option: EnableRemoteCommands
# Whether remote commands from Zabbix server are allowed.
# 0 - not allowed
# 1 - allowed
#
# Mandatory: no
# Default:
# EnableRemoteCommands=0 #是否允许本地执行远程命令,建议设置为‘允许’,因为SNC对命令下发功能进行了二次开发,功能强大,极大的方便日志运维工作 ### Option: LogRemoteCommands
# Enable logging of executed shell commands as warnings.
# 0 - disabled #不产生日志
# 1 - enabled #产生日志
#
# Mandatory: no
# Default:
# LogRemoteCommands=0 #配置0/1 在执行远程命令时是否保存日志,建议产生日志,以便日后查证 ##### Passive checks related #与被动模式有关的参数设置,什么是被动模式,被动模式下,由二级代理或服务端主动请求agent去获取采集到的监控数据 ### Option: Server
# List of comma delimited IP addresses (or hostnames) of Zabbix servers.
# Incoming connections will be accepted only from the hosts listed here.
# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
#
# Mandatory: no
# Default:
# Server= Server=127.0.0.1 #在有二级代理时,此处应填二级代理的IP,若没有二级则此处填写服务端IP ### Option: ListenPort
# Agent will listen on this port for connections from the server.
#
# Mandatory: no
# Range: 1024-32767
# Default:
# ListenPort=10050 #此agent端以本地服务的形式运行,需要监听端口,建议为10050,以便整个系统统一规划,也可以设置为1024-32768之间未使用的端口 ### Option: ListenIP
# List of comma delimited IP addresses that the agent should listen on.
# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
#
# Mandatory: no
# Default:
# ListenIP=0.0.0.0 #对应的ListenPort监听到哪个IP上面,建议制定IP,不用0.0.0.0 ### Option: StartAgents
# Number of pre-forked instances of zabbix_agentd that process passive checks.
# If set to 0, disables passive checks and the agent will not listen on any TCP port.
#
# Mandatory: no
# Range: 0-100
# Default:
# StartAgents=3 #在被动模式下,此参数用于设置监听进程可启用的子进程的数量,若监控项较多且采集很频繁,建议加大此值
#此值为0,则禁止使用被动模式,另外一般情况,不建议修改此值,且仅当某些监控项无法采集到数据,或数据采集有延迟现象时可调整,第四,启用线程越多则多系统资源消耗越多
##### Active checks related ### Option: ServerActive
# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
# If port is not specified, default port is used.
# IPv6 addresses must be enclosed in square brackets if port for that host is specified.
# If port is not specified, square brackets for IPv6 addresses are optional.
# If this parameter is not specified, active checks are disabled.
# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive= ServerActive=127.0.0.1 #在主动模式下,ServerActive为二级代理服务器或服务端的地址,默认端口10051,若需要更改端口则为IP:port ### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
# Value is acquired from HostnameItem if undefined.
#
# Mandatory: no
# Default:
# Hostname= #主机名,手工定义一个主机名,可以和系统的主机名一样,也可以不一样,此参数可根据实际情况启用或关闭,建议关闭此参数启用HostnameItem参数 Hostname=Zabbix server ### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
#
# Mandatory: no
# Default:
# HostnameItem=system.hostname #自动获取主机名,system.hostname是zabbix内置的一个自动获取主机名的方法,为了方便配置,建议打开此参数而关闭Hostname参数,注意HostnameItem的优先级低于Hostname ### Option: HostMetadata
# Optional parameter that defines host metadata.
# Host metadata is used at host auto-registration process.
# An agent will issue an error and not start if the value is over limit of 255 characters.
# If not defined, value will be acquired from HostMetadataItem.
#
# Mandatory: no
# Range: 0-255 characters
# Default:
# HostMetadata= #字符串 用于定义当前主机唯一标识符,最大长度255个,仅适用于自动发现情况下,默认不自定义,建议不自定义 ### Option: HostMetadataItem
# Optional parameter that defines an item used for getting host metadata.
# Host metadata is used at host auto-registration process.
# During an auto-registration request an agent will log a warning message if
# the value returned by specified item is over limit of 255 characters.
# This option is only used when HostMetadata is not defined.
#
# Mandatory: no
# Default:
# HostMetadataItem= #用于获取主机的HostMetadata,建议报错默认 ### Option: RefreshActiveChecks
# How often list of active checks is refreshed, in seconds.
#
# Mandatory: no
# Range: 60-3600
# Default:
# RefreshActiveChecks=120 #被监控的主机多久重新请求二级代理或服务端刷新监控列表,范围为,60-3600秒,zabbix运行原理为,zabbix客户端启动后,在等待RefreshActiveChecks秒后,开始从二级代理服务端请求并下载监控信息,报错在本地专门的buffersend中,再过RefreshActivceChecks秒后,重新获取监控项信息,这就是为什么当配置监控项,要过一会才会生效的原因,这个数字就是等待时间,建议不要将此数字设置过小,以免加大agent端和服务端的压力 ### Option: BufferSend
# Do not keep data longer than N seconds in buffer.
#
# Mandatory: no
# Range: 1-3600
# Default:
# BufferSend=5 #多少秒后将buffer中的数据提交到二级代理或服务端,范围1-36600,此数字的大小决定了采集后,提交数据的及时性,数字越小,则提交的越频繁,对服务器的压力约大,同时对agent端服务器的资源消耗越大,则表现出来的是报警及时 ### Option: BufferSize
# Maximum number of values in a memory buffer. The agent will send
# all collected data to Zabbix Server or Proxy if the buffer is full.
#
# Mandatory: no
# Range: 2-65535
# Default:
# BufferSize=100 #此参数作用设置保存采集数据在内存中的容量大小,若此agent端监控较多,建议加大此数值,bufferSize与BUfferSend之间有联系的,但达到bufferSend或buffersize已满时都会处罚数据提交动作 ### Option: MaxLinesPerSecond
# Maximum number of new lines the agent will send per second to Zabbix Server
# or Proxy processing 'log' and 'logrt' active checks.
# The provided value will be overridden by the parameter 'maxlines',
# provided in 'log' or 'logrt' item keys.
#
# Mandatory: no
# Range: 1-1000
# Default:
# MaxLinesPerSecond=20 #定义了agent在1秒内发送的日志行数,用于避免网络或CPU过载,建议保持默认 ############ ADVANCED PARAMETERS ################# #高级参数设置 ### Option: Alias
# Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
# Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
# Different Alias keys may reference the same item key.
# For example, to retrieve the ID of user 'zabbix':
# Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1]
# Now shorthand key zabbix.userid may be used to retrieve data.
# Aliases can be used in HostMetadataItem but not in HostnameItem parameters.
#
# Mandatory: no
# Range:
# Default: #设置参数别名,可以代替复制的一个小而简单的参数名字 ### Option: Timeout
# Spend no more than Timeout seconds on processing
#
# Mandatory: no
# Range: 1-30
# Default:
# Timeout=3 #但agent采集一个数据时,多少算超时,建议报错默认 ### 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 the user specified by the User configuration option instead.
# Has no effect if started under a regular user.
# 0 - do not allow
# 1 - allow
#
# Mandatory: no
# Default:
# AllowRoot=0 #是否允许root账号允许此客户端,0允许,1不允许,但一个脚本需要以root身份执行的时候此设置必须为0 ### Option: User
# Drop privileges to a specific, existing user on the system.
# Only has effect if run as 'root' and AllowRoot is disabled.
#
# Mandatory: no
# Default:
# User=zabbix ### Option: Include
# You may include individual files or all files in a directory in the configuration file.
# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
#
# Mandatory: no
# Default:
# Include= #从配置文件可管理性或扩展性考虑,若需要配置大量参数,且为了日后方便管理可以启用此参数,建议根据实际情况,不过,一般情况下无需启用 Include=/etc/zabbix/zabbix_agentd.d/*.conf # Include=/usr/local/etc/zabbix_agentd.userparams.conf
# Include=/usr/local/etc/zabbix_agentd.conf.d/
# Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf ####### USER-DEFINED MONITORED PARAMETERS ####### #自定义监控脚本 ### Option: UnsafeUserParameters
# Allow all characters to be passed in arguments to user-defined parameters.
# The following characters are not allowed:
# \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @
# Additionally, newline characters are not allowed.
# 0 - do not allow
# 1 - allow
#
# Mandatory: no
# Range: 0-1
# Default:
# UnsafeUserParameters=0 #是否启用自定义监控脚本,1启用,0不启用,由于zabbix实现监控方法的多样性,一般都采用脚本来实现监控数据的采集,所以,建议开启,否则功能将受限 ### Option: UserParameter
# User-defined parameter to monitor. There can be several user-defined parameters.
# Format: UserParameter=<key>,<shell command>
# See 'zabbix_agentd' directory for examples.
#
# Mandatory: no
# Default:
# UserParameter= #用户自定义脚本,当UnsafeUserParamenters=1时UserParamenter生效,以下为SNC初始自定义监控脚本,不建议,已有选项,但可自定义添加 ####### LOADABLE MODULES ####### ### Option: LoadModulePath
# Full path to location of agent modules.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
# LoadModulePath=${libdir}/modules #扩展模块路径,强烈建议不要动,除非你具有agent开发的能力 ### Option: LoadModule
# Module to load at agent startup. Modules are used to extend functionality of the agent.
# Format: LoadModule=<module.so>
# The modules must be located in directory specified by LoadModulePath.
# It is allowed to include multiple LoadModule parameters.
#
# Mandatory: no
# Default:
# LoadModule= #强烈建议不动,除非你会agent的开发 ####### TLS-RELATED PARAMETERS ####### ### Option: TLSConnect
# How the agent should connect to server or proxy. Used for active checks.
# Only one value can be specified:
# unencrypted - connect without encryption
# psk - connect using TLS and a pre-shared key
# cert - connect using TLS and a certificate
#
# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
# Default:
# TLSConnect=unencrypted ### Option: TLSAccept
# What incoming connections to accept.
# Multiple values can be specified, separated by comma:
# unencrypted - accept connections without encryption
# psk - accept connections secured with TLS and a pre-shared key
# cert - accept connections secured with TLS and a certificate
#
# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
# Default:
# TLSAccept=unencrypted ### Option: TLSCAFile
# Full pathname of a file containing the top-level CA(s) certificates for
# peer certificate verification.
#
# Mandatory: no
# Default:
# TLSCAFile= ### Option: TLSCRLFile
# Full pathname of a file containing revoked certificates.
#
# Mandatory: no
# Default:
# TLSCRLFile= ### Option: TLSServerCertIssuer
# Allowed server certificate issuer.
#
# Mandatory: no
# Default:
# TLSServerCertIssuer= ### Option: TLSServerCertSubject
# Allowed server certificate subject.
#
# Mandatory: no
# Default:
# TLSServerCertSubject= ### Option: TLSCertFile
# Full pathname of a file containing the agent certificate or certificate chain.
#
# Mandatory: no
# Default:
# TLSCertFile= ### Option: TLSKeyFile
# Full pathname of a file containing the agent private key.
#
# Mandatory: no
# Default:
# TLSKeyFile= ### Option: TLSPSKIdentity
# Unique, case sensitive string used to identify the pre-shared key.
#
# Mandatory: no
# Default:
# TLSPSKIdentity= ### Option: TLSPSKFile
# Full pathname of a file containing the pre-shared key.
#
# Mandatory: no
# Default:
# TLSPSKFile=

zabbix分布式监控系统安装配置:http://www.cnblogs.com/LuckWJL/p/9037007.html

安装配置zabbix代理之zabbix_proxy:http://www.cnblogs.com/LuckWJL/p/9055587.html

zabbix_server通过zabbix_proxy进行监控Host:http://www.cnblogs.com/LuckWJL/p/9056195.html

zabbix安装配置agent程序之agent配置文件详解的更多相关文章

  1. Eclipse IDE for C/C++ Developers和MinGW安装配置C/C++开发学习环境详解

    Eclipse IDE for C/C++ Developers和MinGW安装配置C/C++开发学习环境详解 操作系统:Windows 7 JDK版本:1.6.0_33 Eclipse版本:Juno ...

  2. 网卡配置文件详解 用户管理与文件权限篇 文件与目录权限 软连接 tar解压命令 killall命令 linux防火墙 dns解析设置 计划任务crond服务 软件包安装 阿里云 yum源 安装

    Linux系统基础优化及常用命令 Linux基础系统优化 引言没有,只有一张图. Linux的网络功能相当强悍,一时之间我们无法了解所有的网络命令,在配置服务器基础环境时,先了解下网络参数设定命令. ...

  3. zabbix配置文件详解

    Zabbix之配置文件详解   zabbix配置文件种类: zabbix_server配置文件zabbix_server.conf zabbix_proxy配置文件zabbix_proxy.conf ...

  4. nginx安装及配置文件详解

    一)nginx安装及模块讲解 1.1.nginx安装步骤 mkdir /soft wget http://nginx.org/download/nginx-1.12.0.tar.gz tar zxf ...

  5. Nginx配置配置文件详解

    文章目录 配置文件 nginx.conf配置文件详解 用于调试.定位问题的配置参数 正常运行必备的配置参数 优化性能的配置参数 事件相关配置 Fastcgi相关配置参数 常需要调整的参数 nginx作 ...

  6. keepalived原理(主从配置+haproxy)及配置文件详解

    下图描述了使用keepalived+Haproxy主从配置来达到能够针对前段流量进行负载均衡到多台后端web1.web2.web3.img1.img2.但是由于haproxy会存在单点故障问题,因此使 ...

  7. nginx之旅(第一篇):nginx下载安装、nginx启动与关闭、nginx配置文件详解、nginx默认网站

    一.nginx下载安装 版本nginx 1.15.5 系统环境centos7.5(本机ip192.168.199.228) 关闭selinux 和防火墙firewall 1.下载 wget http: ...

  8. nginx官方源安装-主配置文件详解

    HTTP相关术语 PV : Page Visit 页面独立浏览量,查看日志生成条数可以看到PV数量. PV全称Page View,中文翻译即页面浏览.其具体的度量方法是从浏览器发出一个对网络服务器的请 ...

  9. haproxy 安装与配置文件详解

    本文主要阐述haproxy的安装配置详解,对于它的概念,作用,功能,和其它LB软件的区别,优点,缺点等不再进行说明. 一. haproxy 的安装配置 # cat /etc/redhat-releas ...

  10. GRUB2配置详解:默认启动项,超时时间,隐藏引导菜单,配置文件详解,图形化配置

    配置文件详解: /etc/default/grub # 设定默认启动项,推荐使用数字 GRUB_DEFAULT=0 # 注释掉下面这行将会显示引导菜单 #GRUB_HIDDEN_TIMEOUT=0 # ...

随机推荐

  1. lumen手记:Make的使用

    Lumen有很多实例是通过make()方法实例到容器中的,与bind(),register()有着密切关系 https://laravel-china.org/topics/1372/understa ...

  2. pandas基础: Series和DataFrame的简单介绍

    一.pandas 是什么 pandas 是基于 NumPy 的一个 Python 数据分析包,主要目的是为了数据分析.它提供了大量高级的数据结构和对数据处理的方法. pandas 有两个主要的数据结构 ...

  3. 设计模式之简单工厂模式(Simply Factory)摘录

    从设计模式的类型上来说,简单工厂模式是属于创建型模式,又叫静态工厂方法(Static Factory Method)模式.但不属于23种GOF设计模式之中的一个.简单工厂模式是由一个工厂对象决定创建出 ...

  4. 面试题思考:什么是基于注解的切面实现?(AOP是Aspect Oriented Program的首字母缩写)

    首先解释下AOP :在程序运行时,动态的将代码切入到类的指定方法.指定位置上的编程思想就是面向切面编程 一般而言,我们管切入到指定类指定方法的代码片段为切面,而切入的哪些类.哪些方法则叫切入点.有了A ...

  5. 【BZOJ3379】[Usaco2004 Open]Turning in Homework 交作业 DP

    [BZOJ3379][Usaco2004 Open]Turning in Homework 交作业 Description     贝茜有C(1≤C≤1000)门科目的作业要上交,之后她要去坐巴士和奶 ...

  6. [Algorithms] Radix Sort

    Radix sort is another linear time sorting algorithm. It sorts (using another sorting subroutine) the ...

  7. SetForegroundWindow以及 如何将一个某个窗口提到最顶层(转)

    http://hi.baidu.com/gookings/item/2b7912ca8d5b3625a0b50aa2 SetForegroundWindow 函数功能:该函数将创建指定窗口的线程设置到 ...

  8. java根据方法名动态调用invoke方法!

    public class Activity { public void deal(String name, long id) { System.out.println(name + id + &quo ...

  9. etcd集群安装部署

    1. 集群架构 由于我们只有两个机房,所以选择的是以上图中所示的数据同步方案, 通过做镜像的方式保证两个集群的数据实时同步. 整体架构如上图所示, 整个全局元数据中心包括两套集群,廊坊集群和马驹桥集群 ...

  10. 2015-04-14——css3 @media

    //判断横竖屏 @media screen and (min-aspect-ratio: 13/13) { body {background-color:red;}}  //屏幕宽高比,必须是除数形式 ...