zabbix监控mysql
zabbix_agent端配置:
1 #!/bin/bash 2 #fileName:check_mysql.sh 3 #Date:20171229 4 #Author:jiaqiang 5 mysql_user='zabbix' 6 mysql_pwd='123456' 7 mysql_host='127.0.0.1' 8 mysql_port='3306' 9 args=1 10 if [ $# -ne "$args" ];then 11 echo "please inputi onei arguement: " 12 fi 13 case $1 in 14 Uptime) 15 result=`/home/db/mysql/bin/mysqladmin status|cut -f2 -d":"|cut -f1 -d"T"` 16 echo $result 17 ;; 18 Com_update) 19 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Com_update"|cut -d"|" -f3` 20 echo $result 21 ;; 22 Slow_queries) 23 result=`/home/db/mysql/bin/mysqladmin status|cut -f5 -d":"|cut -f1 -d"O"` 24 echo $result 25 ;; 26 Com_select) 27 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Com_select"|cut -d"|" -f3` 28 echo $result 29 ;; 30 Com_rollback) 31 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Com_rollback"|cut -d"|"-f3` 32 echo $result 33 ;; 34 Questions) 35 result=`/home/db/mysql/bin/mysqladmin status|cut -f4 -d":"|cut -f1 -d"S"` 36 echo $result 37 ;; 38 Com_insert) 39 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Com_insert"|cut -d"|"-f3` 40 echo $result 41 ;; 42 Com_delete) 43 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Com_delete"|cut -d"|"-f3` 44 echo $result 45 ;; 46 Com_commit) 47 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Com_commit"|cut -d"|" -f3` 48 echo $result 49 ;; 50 Bytes_sent) 51 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Bytes_sent"|cut -d"|" -f3` 52 echo $result 53 ;; 54 Bytes_received) 55 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Bytes_received"|cut -d"|" -f3` 56 echo $result 57 ;; 58 Com_begin) 59 result=`/home/db/mysql/bin/mysqladmin extended-status|grep -w "Com_begin"|cut -d"|" -f3` 60 echo $result 61 ;; 62 *) 63 echo "Usage:$0(Uptime|Com_update|Slow_queries|Com_select|Com_rollback|Questions)" 64 ;; 65 esac
1 [root@mysql3 zabbix]# cat zabbix_agentd.conf 2 # This is a configuration file for Zabbix agent daemon (Unix) 3 # To get more information about Zabbix, visit http://www.zabbix.com 4 5 ############ GENERAL PARAMETERS ################# 6 7 ### Option: PidFile 8 # Name of PID file. 9 # 10 # Mandatory: no 11 # Default: 12 # PidFile=/tmp/zabbix_agentd.pid 13 14 PidFile=/var/run/zabbix/zabbix_agentd.pid 15 16 ### Option: LogType 17 # Specifies where log messages are written to: 18 # system - syslog 19 # file - file specified with LogFile parameter 20 # console - standard output 21 # 22 # Mandatory: no 23 # Default: 24 # LogType=file 25 26 ### Option: LogFile 27 # Log file name for LogType 'file' parameter. 28 # 29 # Mandatory: no 30 # Default: 31 # LogFile= 32 33 LogFile=/var/log/zabbix/zabbix_agentd.log 34 35 ### Option: LogFileSize 36 # Maximum size of log file in MB. 37 # 0 - disable automatic log rotation. 38 # 39 # Mandatory: no 40 # Range: 0-1024 41 # Default: 42 # LogFileSize=1 43 44 LogFileSize=0 45 46 ### Option: DebugLevel 47 # Specifies debug level: 48 # 0 - basic information about starting and stopping of Zabbix processes 49 # 1 - critical information 50 # 2 - error information 51 # 3 - warnings 52 # 4 - for debugging (produces lots of information) 53 # 5 - extended debugging (produces even more information) 54 # 55 # Mandatory: no 56 # Range: 0-5 57 # Default: 58 # DebugLevel=3 59 60 ### Option: SourceIP 61 # Source IP address for outgoing connections. 62 # 63 # Mandatory: no 64 # Default: 65 # SourceIP= 66 67 ### Option: EnableRemoteCommands 68 # Whether remote commands from Zabbix server are allowed. 69 # 0 - not allowed 70 # 1 - allowed 71 # 72 # Mandatory: no 73 # Default: 74 # EnableRemoteCommands=0 75 76 ### Option: LogRemoteCommands 77 # Enable logging of executed shell commands as warnings. 78 # 0 - disabled 79 # 1 - enabled 80 # 81 # Mandatory: no 82 # Default: 83 # LogRemoteCommands=0 84 85 ##### Passive checks related 86 87 ### Option: Server 88 # List of comma delimited IP addresses (or hostnames) of Zabbix servers. 89 # Incoming connections will be accepted only from the hosts listed here. 90 # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. 91 # 92 # Mandatory: no 93 # Default: 94 # Server= 95 96 Server=10.0.110.114 97 98 ### Option: ListenPort 99 # Agent will listen on this port for connections from the server. 100 # 101 # Mandatory: no 102 # Range: 1024-32767 103 # Default: 104 # ListenPort=10050 105 106 ### Option: ListenIP 107 # List of comma delimited IP addresses that the agent should listen on. 108 # First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks. 109 # 110 # Mandatory: no 111 # Default: 112 # ListenIP=0.0.0.0 113 114 ### Option: StartAgents 115 # Number of pre-forked instances of zabbix_agentd that process passive checks. 116 # If set to 0, disables passive checks and the agent will not listen on any TCP port. 117 # 118 # Mandatory: no 119 # Range: 0-100 120 # Default: 121 # StartAgents=3 122 123 ##### Active checks related 124 125 ### Option: ServerActive 126 # List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks. 127 # If port is not specified, default port is used. 128 # IPv6 addresses must be enclosed in square brackets if port for that host is specified. 129 # If port is not specified, square brackets for IPv6 addresses are optional. 130 # If this parameter is not specified, active checks are disabled. 131 # Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1] 132 # 133 # Mandatory: no 134 # Default: 135 # ServerActive= 136 137 ServerActive=10.0.110.114:10051 138 139 ### Option: Hostname 140 # Unique, case sensitive hostname. 141 # Required for active checks and must match hostname as configured on the server. 142 # Value is acquired from HostnameItem if undefined. 143 # 144 # Mandatory: no 145 # Default: 146 # Hostname= 147 148 Hostname=mysql3 149 150 ### Option: HostnameItem 151 # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. 152 # Does not support UserParameters or aliases. 153 # 154 # Mandatory: no 155 # Default: 156 # HostnameItem=system.hostname 157 158 ### Option: HostMetadata 159 # Optional parameter that defines host metadata. 160 # Host metadata is used at host auto-registration process. 161 # An agent will issue an error and not start if the value is over limit of 255 characters. 162 # If not defined, value will be acquired from HostMetadataItem. 163 # 164 # Mandatory: no 165 # Range: 0-255 characters 166 # Default: 167 # HostMetadata= 168 169 ### Option: HostMetadataItem 170 # Optional parameter that defines an item used for getting host metadata. 171 # Host metadata is used at host auto-registration process. 172 # During an auto-registration request an agent will log a warning message if 173 # the value returned by specified item is over limit of 255 characters. 174 # This option is only used when HostMetadata is not defined. 175 # 176 # Mandatory: no 177 # Default: 178 # HostMetadataItem= 179 180 ### Option: RefreshActiveChecks 181 # How often list of active checks is refreshed, in seconds. 182 # 183 # Mandatory: no 184 # Range: 60-3600 185 # Default: 186 # RefreshActiveChecks=120 187 188 ### Option: BufferSend 189 # Do not keep data longer than N seconds in buffer. 190 # 191 # Mandatory: no 192 # Range: 1-3600 193 # Default: 194 # BufferSend=5 195 196 ### Option: BufferSize 197 # Maximum number of values in a memory buffer. The agent will send 198 # all collected data to Zabbix Server or Proxy if the buffer is full. 199 # 200 # Mandatory: no 201 # Range: 2-65535 202 # Default: 203 # BufferSize=100 204 205 ### Option: MaxLinesPerSecond 206 # Maximum number of new lines the agent will send per second to Zabbix Server 207 # or Proxy processing 'log' and 'logrt' active checks. 208 # The provided value will be overridden by the parameter 'maxlines', 209 # provided in 'log' or 'logrt' item keys. 210 # 211 # Mandatory: no 212 # Range: 1-1000 213 # Default: 214 # MaxLinesPerSecond=20 215 216 ############ ADVANCED PARAMETERS ################# 217 218 ### Option: Alias 219 # Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one. 220 # Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed. 221 # Different Alias keys may reference the same item key. 222 # For example, to retrieve the ID of user 'zabbix': 223 # Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1] 224 # Now shorthand key zabbix.userid may be used to retrieve data. 225 # Aliases can be used in HostMetadataItem but not in HostnameItem parameters. 226 # 227 # Mandatory: no 228 # Range: 229 # Default: 230 231 ### Option: Timeout 232 # Spend no more than Timeout seconds on processing 233 # 234 # Mandatory: no 235 # Range: 1-30 236 # Default: 237 # Timeout=3 238 239 ### Option: AllowRoot 240 # Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent 241 # will try to switch to the user specified by the User configuration option instead. 242 # Has no effect if started under a regular user. 243 # 0 - do not allow 244 # 1 - allow 245 # 246 # Mandatory: no 247 # Default: 248 # AllowRoot=0 249 250 ### Option: User 251 # Drop privileges to a specific, existing user on the system. 252 # Only has effect if run as 'root' and AllowRoot is disabled. 253 # 254 # Mandatory: no 255 # Default: 256 # User=zabbix 257 258 ### Option: Include 259 # You may include individual files or all files in a directory in the configuration file. 260 # Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. 261 # 262 # Mandatory: no 263 # Default: 264 # Include= 265 266 Include=/etc/zabbix/zabbix_agentd.d/ 267 268 # Include=/usr/local/etc/zabbix_agentd.userparams.conf 269 # Include=/usr/local/etc/zabbix_agentd.conf.d/ 270 # Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf 271 272 ####### USER-DEFINED MONITORED PARAMETERS ####### 273 274 ### Option: UnsafeUserParameters 275 # Allow all characters to be passed in arguments to user-defined parameters. 276 # The following characters are not allowed: 277 # \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @ 278 # Additionally, newline characters are not allowed. 279 # 0 - do not allow 280 # 1 - allow 281 # 282 # Mandatory: no 283 # Range: 0-1 284 # Default: 285 # UnsafeUserParameters=0 286 287 ### Option: UserParameter 288 # User-defined parameter to monitor. There can be several user-defined parameters. 289 # Format: UserParameter=<key>,<shell command> 290 # See 'zabbix_agentd' directory for examples. 291 # 292 # Mandatory: no 293 # Default: 294 UserParameter=mysql.version,/home/db/mysql/bin/mysql -V 295 UserParameter=mysql.status[*],/etc/zabbix/chk_mysql.sh $1 296 UserParameter=mysql.ping,/home/db/mysql/bin/mysqladmin -uzabbix -p123456 -P3306 -h127.0.0.1 ping | grep -c alive 297 298 ####### LOADABLE MODULES ####### 299 300 ### Option: LoadModulePath 301 # Full path to location of agent modules. 302 # Default depends on compilation options. 303 # 304 # Mandatory: no 305 # Default: 306 # LoadModulePath=${libdir}/modules 307 308 ### Option: LoadModule 309 # Module to load at agent startup. Modules are used to extend functionality of the agent. 310 # Format: LoadModule=<module.so> 311 # The modules must be located in directory specified by LoadModulePath. 312 # It is allowed to include multiple LoadModule parameters. 313 # 314 # Mandatory: no 315 # Default: 316 # LoadModule= 317 318 ####### TLS-RELATED PARAMETERS ####### 319 320 ### Option: TLSConnect 321 # How the agent should connect to server or proxy. Used for active checks. 322 # Only one value can be specified: 323 # unencrypted - connect without encryption 324 # psk - connect using TLS and a pre-shared key 325 # cert - connect using TLS and a certificate 326 # 327 # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection) 328 # Default: 329 # TLSConnect=unencrypted 330 331 ### Option: TLSAccept 332 # What incoming connections to accept. 333 # Multiple values can be specified, separated by comma: 334 # unencrypted - accept connections without encryption 335 # psk - accept connections secured with TLS and a pre-shared key 336 # cert - accept connections secured with TLS and a certificate 337 # 338 # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection) 339 # Default: 340 # TLSAccept=unencrypted 341 342 ### Option: TLSCAFile 343 # Full pathname of a file containing the top-level CA(s) certificates for 344 # peer certificate verification. 345 # 346 # Mandatory: no 347 # Default: 348 # TLSCAFile= 349 350 ### Option: TLSCRLFile 351 # Full pathname of a file containing revoked certificates. 352 # 353 # Mandatory: no 354 # Default: 355 # TLSCRLFile= 356 357 ### Option: TLSServerCertIssuer 358 # Allowed server certificate issuer. 359 # 360 # Mandatory: no 361 # Default: 362 # TLSServerCertIssuer= 363 364 ### Option: TLSServerCertSubject 365 # Allowed server certificate subject. 366 # 367 # Mandatory: no 368 # Default: 369 # TLSServerCertSubject= 370 371 ### Option: TLSCertFile 372 # Full pathname of a file containing the agent certificate or certificate chain. 373 # 374 # Mandatory: no 375 # Default: 376 # TLSCertFile= 377 378 ### Option: TLSKeyFile 379 # Full pathname of a file containing the agent private key. 380 # 381 # Mandatory: no 382 # Default: 383 # TLSKeyFile= 384 385 ### Option: TLSPSKIdentity 386 # Unique, case sensitive string used to identify the pre-shared key. 387 # 388 # Mandatory: no 389 # Default: 390 # TLSPSKIdentity= 391 392 ### Option: TLSPSKFile 393 # Full pathname of a file containing the pre-shared key. 394 # 395 # Mandatory: no 396 # Default: 397 # TLSPSKFile=
1 [root@mysql3 zabbix]# cat /etc/my.cnf 2 # For advice on how to change settings please see 3 # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html 4 # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the 5 # *** default location during install, and will be replaced if you 6 # *** upgrade to a newer version of MySQL. 7 8 [mysqld] 9 10 # Remove leading # and set to the amount of RAM for the most important data 11 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. 12 # innodb_buffer_pool_size = 128M 13 14 # Remove leading # to turn on a very important data integrity option: logging 15 # changes to the binary log between backups. 16 # log_bin 17 server-id=2 18 log_bin=mysql-bin.log 19 replicate-do-db=ddsoucai 20 replicate-do-db=wyltest 21 slave-skip-errors=all 22 binlog_cache_size = 1M 23 binlog_format=mixed 24 expire_logs_days=7 25 skip-name-resolve 26 log_slave_updates=1 27 # These are commonly set, remove the # and set as required. 28 # basedir = ..... 29 # datadir = ..... 30 # port = ..... 31 # server_id = ..... 32 # socket = ..... 33 34 # Remove leading # to set options mainly useful for reporting servers. 35 # The server defaults are faster for transactions and fast SELECTs. 36 # Adjust sizes as needed, experiment to find the optimal values. 37 # join_buffer_size = 128M 38 # sort_buffer_size = 2M 39 # read_rnd_buffer_size = 2M 40 41 max_connections=20000 42 max_connect_errors=1000 43 thread_cache=64 44 innodb_lock_wait_timeout=100 45 wait_timeout=31536000 46 interactive_timeout=31536000 47 symbolic-links=0 48 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 49 explicit_defaults_for_timestamp 50 [mysql] 51 socket=/home/mysqldb/mysql.mysql 52 [mysqladmin] 53 host=127.0.0.1 54 user=zabbix 55 password=123456 56 socket=/home/mysqldb/mysql.mysql 57 [mysqldump] 58 socket=/home/mysqldb/mysql.mysql
数据库授权(........)
zabbix_server段配置:
1 [root@localhost zabbix]# cat zabbix_server.conf 2 # This is a configuration file for Zabbix server daemon 3 # To get more information about Zabbix, visit http://www.zabbix.com 4 5 ############ GENERAL PARAMETERS ################# 6 7 ### Option: ListenPort 8 # Listen port for trapper. 9 # 10 # Mandatory: no 11 # Range: 1024-32767 12 # Default: 13 # ListenPort=10051 14 15 ### Option: SourceIP 16 # Source IP address for outgoing connections. 17 # 18 # Mandatory: no 19 # Default: 20 # SourceIP= 21 22 ### Option: LogType 23 # Specifies where log messages are written to: 24 # system - syslog 25 # file - file specified with LogFile parameter 26 # console - standard output 27 # 28 # Mandatory: no 29 # Default: 30 # LogType=file 31 32 ### Option: LogFile 33 # Log file name for LogType 'file' parameter. 34 # 35 # Mandatory: no 36 # Default: 37 # LogFile= 38 39 LogFile=/var/log/zabbix/zabbix_server.log 40 41 ### Option: LogFileSize 42 # Maximum size of log file in MB. 43 # 0 - disable automatic log rotation. 44 # 45 # Mandatory: no 46 # Range: 0-1024 47 # Default: 48 # LogFileSize=1 49 50 LogFileSize=0 51 52 ### Option: DebugLevel 53 # Specifies debug level: 54 # 0 - basic information about starting and stopping of Zabbix processes 55 # 1 - critical information 56 # 2 - error information 57 # 3 - warnings 58 # 4 - for debugging (produces lots of information) 59 # 5 - extended debugging (produces even more information) 60 # 61 # Mandatory: no 62 # Range: 0-5 63 # Default: 64 # DebugLevel=3 65 66 ### Option: PidFile 67 # Name of PID file. 68 # 69 # Mandatory: no 70 # Default: 71 # PidFile=/tmp/zabbix_server.pid 72 73 PidFile=/var/run/zabbix/zabbix_server.pid 74 75 ### Option: DBHost 76 # Database host name. 77 # If set to localhost, socket is used for MySQL. 78 # If set to empty string, socket is used for PostgreSQL. 79 # 80 # Mandatory: no 81 # Default: 82 DBHost=localhost 83 84 ### Option: DBName 85 # Database name. 86 # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. 87 # 88 # Mandatory: yes 89 # Default: 90 # DBName= 91 92 DBName=zabbix 93 94 ### Option: DBSchema 95 # Schema name. Used for IBM DB2 and PostgreSQL. 96 # 97 # Mandatory: no 98 # Default: 99 # DBSchema= 100 101 ### Option: DBUser 102 # Database user. Ignored for SQLite. 103 # 104 # Mandatory: no 105 # Default: 106 # DBUser= 107 108 DBUser=zabbix 109 110 ### Option: DBPassword 111 # Database password. Ignored for SQLite. 112 # Comment this line if no password is used. 113 # 114 # Mandatory: no 115 # Default: 116 DBPassword=AM/_,K,W;81l 117 118 ### Option: DBSocket 119 # Path to MySQL socket. 120 # 121 # Mandatory: no 122 # Default: 123 # DBSocket=/tmp/mysql.sock 124 125 ### Option: DBPort 126 # Database port when not using local socket. Ignored for SQLite. 127 # 128 # Mandatory: no 129 # Range: 1024-65535 130 # Default (for MySQL): 131 # DBPort=3306 132 133 ############ ADVANCED PARAMETERS ################ 134 135 ### Option: StartPollers 136 # Number of pre-forked instances of pollers. 137 # 138 # Mandatory: no 139 # Range: 0-1000 140 # Default: 141 # StartPollers=5 142 143 ### Option: StartIPMIPollers 144 # Number of pre-forked instances of IPMI pollers. 145 # 146 # Mandatory: no 147 # Range: 0-1000 148 # Default: 149 # StartIPMIPollers=0 150 151 ### Option: StartPollersUnreachable 152 # Number of pre-forked instances of pollers for unreachable hosts (including IPMI and Java). 153 # At least one poller for unreachable hosts must be running if regular, IPMI or Java pollers 154 # are started. 155 # 156 # Mandatory: no 157 # Range: 0-1000 158 # Default: 159 # StartPollersUnreachable=1 160 161 ### Option: StartTrappers 162 # Number of pre-forked instances of trappers. 163 # Trappers accept incoming connections from Zabbix sender, active agents and active proxies. 164 # At least one trapper process must be running to display server availability and view queue 165 # in the frontend. 166 # 167 # Mandatory: no 168 # Range: 0-1000 169 # Default: 170 # StartTrappers=5 171 172 ### Option: StartPingers 173 # Number of pre-forked instances of ICMP pingers. 174 # 175 # Mandatory: no 176 # Range: 0-1000 177 # Default: 178 # StartPingers=1 179 180 ### Option: StartDiscoverers 181 # Number of pre-forked instances of discoverers. 182 # 183 # Mandatory: no 184 # Range: 0-250 185 # Default: 186 # StartDiscoverers=1 187 188 ### Option: StartHTTPPollers 189 # Number of pre-forked instances of HTTP pollers. 190 # 191 # Mandatory: no 192 # Range: 0-1000 193 # Default: 194 # StartHTTPPollers=1 195 196 ### Option: StartTimers 197 # Number of pre-forked instances of timers. 198 # Timers process time-based trigger functions and maintenance periods. 199 # Only the first timer process handles the maintenance periods. 200 # 201 # Mandatory: no 202 # Range: 1-1000 203 # Default: 204 # StartTimers=1 205 206 ### Option: StartEscalators 207 # Number of pre-forked instances of escalators. 208 # 209 # Mandatory: no 210 # Range: 0-100 211 # Default: 212 # StartEscalators=1 213 214 ### Option: JavaGateway 215 # IP address (or hostname) of Zabbix Java gateway. 216 # Only required if Java pollers are started. 217 # 218 # Mandatory: no 219 # Default: 220 JavaGateway=127.0.0.1 221 222 ### Option: JavaGatewayPort 223 # Port that Zabbix Java gateway listens on. 224 # 225 # Mandatory: no 226 # Range: 1024-32767 227 # Default: 228 JavaGatewayPort=10052 229 230 ### Option: StartJavaPollers 231 # Number of pre-forked instances of Java pollers. 232 # 233 # Mandatory: no 234 # Range: 0-1000 235 # Default: 236 StartJavaPollers=5 237 238 ### Option: StartVMwareCollectors 239 # Number of pre-forked vmware collector instances. 240 # 241 # Mandatory: no 242 # Range: 0-250 243 # Default: 244 # StartVMwareCollectors=0 245 246 ### Option: VMwareFrequency 247 # How often Zabbix will connect to VMware service to obtain a new data. 248 # 249 # Mandatory: no 250 # Range: 10-86400 251 # Default: 252 # VMwareFrequency=60 253 254 ### Option: VMwarePerfFrequency 255 # How often Zabbix will connect to VMware service to obtain performance data. 256 # 257 # Mandatory: no 258 # Range: 10-86400 259 # Default: 260 # VMwarePerfFrequency=60 261 262 ### Option: VMwareCacheSize 263 # Size of VMware cache, in bytes. 264 # Shared memory size for storing VMware data. 265 # Only used if VMware collectors are started. 266 # 267 # Mandatory: no 268 # Range: 256K-2G 269 # Default: 270 # VMwareCacheSize=8M 271 272 ### Option: VMwareTimeout 273 # Specifies how many seconds vmware collector waits for response from VMware service. 274 # 275 # Mandatory: no 276 # Range: 1-300 277 # Default: 278 # VMwareTimeout=10 279 280 ### Option: SNMPTrapperFile 281 # Temporary file used for passing data from SNMP trap daemon to the server. 282 # Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file. 283 # 284 # Mandatory: no 285 # Default: 286 # SNMPTrapperFile=/tmp/zabbix_traps.tmp 287 288 SNMPTrapperFile=/var/log/snmptrap/snmptrap.log 289 290 ### Option: StartSNMPTrapper 291 # If 1, SNMP trapper process is started. 292 # 293 # Mandatory: no 294 # Range: 0-1 295 # Default: 296 # StartSNMPTrapper=0 297 298 ### Option: ListenIP 299 # List of comma delimited IP addresses that the trapper should listen on. 300 # Trapper will listen on all network interfaces if this parameter is missing. 301 # 302 # Mandatory: no 303 # Default: 304 # ListenIP=0.0.0.0 305 306 # ListenIP=127.0.0.1 307 308 ### Option: HousekeepingFrequency 309 # How often Zabbix will perform housekeeping procedure (in hours). 310 # Housekeeping is removing outdated information from the database. 311 # To prevent Housekeeper from being overloaded, no more than 4 times HousekeepingFrequency 312 # hours of outdated information are deleted in one housekeeping cycle, for each item. 313 # To lower load on server startup housekeeping is postponed for 30 minutes after server start. 314 # With HousekeepingFrequency=0 the housekeeper can be only executed using the runtime control option. 315 # In this case the period of outdated information deleted in one housekeeping cycle is 4 times the 316 # period since the last housekeeping cycle, but not less than 4 hours and not greater than 4 days. 317 # 318 # Mandatory: no 319 # Range: 0-24 320 # Default: 321 # HousekeepingFrequency=1 322 323 ### Option: MaxHousekeeperDelete 324 # The table "housekeeper" contains "tasks" for housekeeping procedure in the format: 325 # [housekeeperid], [tablename], [field], [value]. 326 # No more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value]) 327 # will be deleted per one task in one housekeeping cycle. 328 # SQLite3 does not use this parameter, deletes all corresponding rows without a limit. 329 # If set to 0 then no limit is used at all. In this case you must know what you are doing! 330 # 331 # Mandatory: no 332 # Range: 0-1000000 333 # Default: 334 # MaxHousekeeperDelete=5000 335 336 ### Option: SenderFrequency 337 # How often Zabbix will try to send unsent alerts (in seconds). 338 # 339 # Mandatory: no 340 # Range: 5-3600 341 # Default: 342 # SenderFrequency=30 343 344 ### Option: CacheSize 345 # Size of configuration cache, in bytes. 346 # Shared memory size for storing host, item and trigger data. 347 # 348 # Mandatory: no 349 # Range: 128K-8G 350 # Default: 351 # CacheSize=8M 352 353 ### Option: CacheUpdateFrequency 354 # How often Zabbix will perform update of configuration cache, in seconds. 355 # 356 # Mandatory: no 357 # Range: 1-3600 358 # Default: 359 # CacheUpdateFrequency=60 360 361 ### Option: StartDBSyncers 362 # Number of pre-forked instances of DB Syncers. 363 # 364 # Mandatory: no 365 # Range: 1-100 366 # Default: 367 # StartDBSyncers=4 368 369 ### Option: HistoryCacheSize 370 # Size of history cache, in bytes. 371 # Shared memory size for storing history data. 372 # 373 # Mandatory: no 374 # Range: 128K-2G 375 # Default: 376 # HistoryCacheSize=16M 377 378 ### Option: HistoryIndexCacheSize 379 # Size of history index cache, in bytes. 380 # Shared memory size for indexing history cache. 381 # 382 # Mandatory: no 383 # Range: 128K-2G 384 # Default: 385 # HistoryIndexCacheSize=4M 386 387 ### Option: TrendCacheSize 388 # Size of trend cache, in bytes. 389 # Shared memory size for storing trends data. 390 # 391 # Mandatory: no 392 # Range: 128K-2G 393 # Default: 394 # TrendCacheSize=4M 395 396 ### Option: ValueCacheSize 397 # Size of history value cache, in bytes. 398 # Shared memory size for caching item history data requests. 399 # Setting to 0 disables value cache. 400 # 401 # Mandatory: no 402 # Range: 0,128K-64G 403 # Default: 404 # ValueCacheSize=8M 405 406 ### Option: Timeout 407 # Specifies how long we wait for agent, SNMP device or external check (in seconds). 408 # 409 # Mandatory: no 410 # Range: 1-30 411 # Default: 412 # Timeout=3 413 414 Timeout=4 415 416 ### Option: TrapperTimeout 417 # Specifies how many seconds trapper may spend processing new data. 418 # 419 # Mandatory: no 420 # Range: 1-300 421 # Default: 422 # TrapperTimeout=300 423 424 ### Option: UnreachablePeriod 425 # After how many seconds of unreachability treat a host as unavailable. 426 # 427 # Mandatory: no 428 # Range: 1-3600 429 # Default: 430 # UnreachablePeriod=45 431 432 ### Option: UnavailableDelay 433 # How often host is checked for availability during the unavailability period, in seconds. 434 # 435 # Mandatory: no 436 # Range: 1-3600 437 # Default: 438 # UnavailableDelay=60 439 440 ### Option: UnreachableDelay 441 # How often host is checked for availability during the unreachability period, in seconds. 442 # 443 # Mandatory: no 444 # Range: 1-3600 445 # Default: 446 # UnreachableDelay=15 447 448 ### Option: AlertScriptsPath 449 # Full path to location of custom alert scripts. 450 # Default depends on compilation options. 451 # 452 # Mandatory: no 453 # Default: 454 # AlertScriptsPath=${datadir}/zabbix/alertscripts 455 456 AlertScriptsPath=/usr/lib/zabbix/alertscripts 457 458 ### Option: ExternalScripts 459 # Full path to location of external scripts. 460 # Default depends on compilation options. 461 # 462 # Mandatory: no 463 # Default: 464 # ExternalScripts=${datadir}/zabbix/externalscripts 465 466 ExternalScripts=/usr/lib/zabbix/alertscripts 467 468 ### Option: FpingLocation 469 # Location of fping. 470 # Make sure that fping binary has root ownership and SUID flag set. 471 # 472 # Mandatory: no 473 # Default: 474 # FpingLocation=/usr/sbin/fping 475 476 ### Option: Fping6Location 477 # Location of fping6. 478 # Make sure that fping6 binary has root ownership and SUID flag set. 479 # Make empty if your fping utility is capable to process IPv6 addresses. 480 # 481 # Mandatory: no 482 # Default: 483 # Fping6Location=/usr/sbin/fping6 484 485 ### Option: SSHKeyLocation 486 # Location of public and private keys for SSH checks and actions. 487 # 488 # Mandatory: no 489 # Default: 490 # SSHKeyLocation= 491 492 ### Option: LogSlowQueries 493 # How long a database query may take before being logged (in milliseconds). 494 # Only works if DebugLevel set to 3, 4 or 5. 495 # 0 - don't log slow queries. 496 # 497 # Mandatory: no 498 # Range: 1-3600000 499 # Default: 500 # LogSlowQueries=0 501 502 LogSlowQueries=3000 503 504 ### Option: TmpDir 505 # Temporary directory. 506 # 507 # Mandatory: no 508 # Default: 509 # TmpDir=/tmp 510 511 ### Option: StartProxyPollers 512 # Number of pre-forked instances of pollers for passive proxies. 513 # 514 # Mandatory: no 515 # Range: 0-250 516 # Default: 517 # StartProxyPollers=1 518 519 ### Option: ProxyConfigFrequency 520 # How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds. 521 # This parameter is used only for proxies in the passive mode. 522 # 523 # Mandatory: no 524 # Range: 1-3600*24*7 525 # Default: 526 # ProxyConfigFrequency=3600 527 528 ### Option: ProxyDataFrequency 529 # How often Zabbix Server requests history data from a Zabbix Proxy in seconds. 530 # This parameter is used only for proxies in the passive mode. 531 # 532 # Mandatory: no 533 # Range: 1-3600 534 # Default: 535 # ProxyDataFrequency=1 536 537 ### Option: AllowRoot 538 # Allow the server to run as 'root'. If disabled and the server is started by 'root', the server 539 # will try to switch to the user specified by the User configuration option instead. 540 # Has no effect if started under a regular user. 541 # 0 - do not allow 542 # 1 - allow 543 # 544 # Mandatory: no 545 # Default: 546 # AllowRoot=0 547 548 ### Option: User 549 # Drop privileges to a specific, existing user on the system. 550 # Only has effect if run as 'root' and AllowRoot is disabled. 551 # 552 # Mandatory: no 553 # Default: 554 # User=zabbix 555 556 ### Option: Include 557 # You may include individual files or all files in a directory in the configuration file. 558 # Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. 559 # 560 # Mandatory: no 561 # Default: 562 # Include= 563 564 # Include=/usr/local/etc/zabbix_server.general.conf 565 # Include=/usr/local/etc/zabbix_server.conf.d/ 566 # Include=/usr/local/etc/zabbix_server.conf.d/*.conf 567 568 ### Option: SSLCertLocation 569 # Location of SSL client certificates. 570 # This parameter is used only in web monitoring. 571 # 572 # Mandatory: no 573 # Default: 574 # SSLCertLocation=${datadir}/zabbix/ssl/certs 575 576 ### Option: SSLKeyLocation 577 # Location of private keys for SSL client certificates. 578 # This parameter is used only in web monitoring. 579 # 580 # Mandatory: no 581 # Default: 582 # SSLKeyLocation=${datadir}/zabbix/ssl/keys 583 584 ### Option: SSLCALocation 585 # Override the location of certificate authority (CA) files for SSL server certificate verification. 586 # If not set, system-wide directory will be used. 587 # This parameter is used only in web monitoring and SMTP authentication. 588 # 589 # Mandatory: no 590 # Default: 591 # SSLCALocation= 592 593 ####### LOADABLE MODULES ####### 594 595 ### Option: LoadModulePath 596 # Full path to location of server modules. 597 # Default depends on compilation options. 598 # 599 # Mandatory: no 600 # Default: 601 # LoadModulePath=${libdir}/modules 602 603 ### Option: LoadModule 604 # Module to load at server startup. Modules are used to extend functionality of the server. 605 # Format: LoadModule=<module.so> 606 # The modules must be located in directory specified by LoadModulePath. 607 # It is allowed to include multiple LoadModule parameters. 608 # 609 # Mandatory: no 610 # Default: 611 # LoadModule= 612 613 ####### TLS-RELATED PARAMETERS ####### 614 615 ### Option: TLSCAFile 616 # Full pathname of a file containing the top-level CA(s) certificates for 617 # peer certificate verification. 618 # 619 # Mandatory: no 620 # Default: 621 # TLSCAFile= 622 623 ### Option: TLSCRLFile 624 # Full pathname of a file containing revoked certificates. 625 # 626 # Mandatory: no 627 # Default: 628 # TLSCRLFile= 629 630 ### Option: TLSCertFile 631 # Full pathname of a file containing the server certificate or certificate chain. 632 # 633 # Mandatory: no 634 # Default: 635 # TLSCertFile= 636 637 ### Option: TLSKeyFile 638 # Full pathname of a file containing the server private key. 639 # 640 # Mandatory: no 641 # Default: 642 # TLSKeyFile=

浙公网安备 33010602011771号