+86 135 410 16684Mon. - Fri. 10:00-22:00

ZabbixServer参数

ZabbixServer参数

ZabbixServer参数

ZabbixServerParameterZabbix进程是Zabbix软件的核心进程,启动Zabbix的命令如下。

# service zabbix-server start

或者

# cd /sbin
# ./zabbix_server

Zabbix进程是以Deamon进程运行的,可以指定的参数如下。

 -c --config               absolute path to the configuration file (default is /etc/zabbix/zabbix_server.conf)
 -R --runtime-control <option>   perform administrative functions
 -h --help                       give this help
 -V --version                    display version number

可以如下使用参数。

# zabbix_server -c /usr/local/etc/zabbix_server.conf
# zabbix_server --help
# zabbix_server -v

Zabbix Server参数

Zabbix的配置文件里有关于Zabbix运行的各种参数。这个配置文件是必须存在的,并且执行Zabbix的用户需要有可读权限。

参数 取值范围 默认值 说明
AlertScriptsPath /home/zabbix/bin/ 存放报警用脚本的目录
CacheSize 128K-1G 8M 配置缓存容量(单位:Byte)。缓存主机和监控项目的共享内存容量。
CacheUpdateFrequency 1-3600 60 指定Zabbix进程更新缓存的时间(单位:秒)。
DBHost localhost 数据库的主机名。指定localhost的时候,MySQL使用Socket。
DBName 数据库名。SQLite3要指定数据库的文件的路径(path)。DBUser和DBPassword将被无视。
DBPassword 指定连接数据库的密码。当使用SQLite的时候,将被无视。
DBPort 1024-65535 3306 当使用本机的Socket的时候,将被无视。使用SQLite的时候,也会被无视。
DBSocket /tmp/mysql.sock MySQL的Socket路径。
DBUser 指定连接数据库的用户名。使用SQLite时候,将被无视。
DebugLevel 0-4 3 指定输出日志的级别。0-不输出,1-Critical,2-Error,3-Warnning,4-Debug。
DisableHousekeeping 0-1 0 指定1的时候给housekeeper将被无效。
ExternalScripts /etc/zabbix /externalscripts 存放外部脚本的路径。
Fping6Location /usr/sbin/fping6 fping6的路径。fping6文件必须有root权限和SUID。当fping可以处理IPv6的时候,设定为空白(“Fping6Location=”)。
FpingLocation /usr/sbin/fping fping的存放路径。
HistoryCacheSize 128K-1G 8M 保留(History)缓存的容量(单位:Byte)。存放保留用数据的共享内存的容量。
HistoryTextCacheSize 128K-1G 16M 文本用保留缓存容量(单位:Byte)。保存文字和文本及日志履历数据的共享内存容量。
HousekeepingFrequency 1-24 1 Zabbix执行housekeeping的频率(单位:小时)。Housekeeping是从history,alert,alarms是表删除已过期的数据。当使用PostgreSQL的时候VACUUM会执行删除,因此建议设为24。
MaxHousekeeperDelete 0-1000000 500 No more than ‘MaxHousekeeperDelete’ rows (corresponding to [tablename], [field], [value]) will be deleted per one task in one housekeeping cycle.SQLite3 does not use this parameter, deletes all corresponding rows without a limit.If set to 0 then no limit is used at all. In this case you must know what you are doing!
Include 可以Include,配置文件目录下的所有文件。
ListenIP 0.0.0.0 指定trapper接听的IP地址,可以以逗号指定多个IP。默认是接听所有的网卡。
ListenPort 1024-32767 10051 trapper接听的端口。
LogFileSize 0-1024 1 日志文件的最大容量(单位:MB)。0-日志滚动无效。
LogSlowQueries 0-3600000 0 当请求超过指定的毫秒是写入到日志文件。0-无效。
NodeID 0-999 0 主要用于分布式监控,应指定唯一的NodeID。一台主机时为0。
NodeNoEvents 0-1 0 在分布式监控里,设定为1的话,本地的事件(Event)不会传送到Master。This won’t impact ability of this node to propagate events from its child nodes.
NodeNoHistory 0-1 0 在分布式监控里,设定为1的话,本地的保留数据(History),不会传送到Master。This won’t impact ability of this node to propagate history from its child nodes.
PidFile /tmp/zabbix_server.pid PID文件名。
SSHKeyLocation SSH公钥的存放目录。
SenderFrequency 5-3600 30 发送Zabbix警报的频率(秒)。
SourceIP 连接时使用源IP。
StartDBSyncers 1-64 4 启动DB Syncers的数量。
StartDiscoverers 0-255 1 启动Discoverers数量。
StartHTTPPollers 0-255 1 启动HTTP pollers数量。
StartIPMIPollers 0-255 1 启动IPMI pingers的数量。
StartPingers 0-255 1 启动ICMP pingers的数量。
StartPollersUnreachable 0-255 1 启动unreachable主机用的进程数。1.8.3之前版本使用。
StartPollers 0-255 1 poller的进程数。不应该启动30以上。
StartTrappers 0-255 1 trapper进程的数量。
Timeout 1-30 3 Agent,SNMP以及确认外部通信时的超时(单位:秒)。
TmpDir /tmp 临时用目录。
TrapperTimeout 1-300 300 trapper收到新的数据以后进行处理时的超时(单位:秒)。
TrendCacheSize 128K-1G 4M 存储值的缓存容量(单位:Byte)。使用的是共享内存空间。
UnavailableDelay 1-3600 60 当被监控主机不可用时(Unavailable),尝试再次连接的时间(秒)。
UnreachableDelay 1-3600 15 当被监控主机不可到达时(Unreachable),尝试再次连接的时间(秒)。
UnreachablePeriod 1-3600 45 把不可到达(Unreachable)的主机判定为不可利用的主机的时间(单位:秒)。