質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%

Q&A

解決済

1回答

7612閲覧

zabbixのactivecheckに失敗する

kobaya

総合スコア14

0グッド

0クリップ

投稿2019/12/20 01:27

##現象
ZabbixAgentのPassiveCheckには成功するが、ActiveCheckに失敗してしまいます。
ログの出力状況をみると、通信はできているが送られてきたデータの処理でエラーが出ているようです。
よろしくお願いいたします。

##環境
OS:Ubuntu18.04
ZabbixServer:4.0.16
Zabbix Agent:4.4.2

ZabbixServerの入った端末とZabbixAgentの入った端末は同一LAN内に存在します。
Server(192.168.188.232)
Agent(192.168.188.209)

##ログ

zabbix_agent2.log

1 22019/12/20 10:22:44.033748 [1] In refreshActiveChecks() from [192.168.188.232:10051] 32019/12/20 10:22:44.033997 connecting to [192.168.188.232:10051] 42019/12/20 10:22:44.035036 sending [{"request":"active checks","host":"net","version":"4.4","ip":"192.168.188.209"}] to [192.168.188.232:10051] 52019/12/20 10:22:44.036024 receiving data from [192.168.188.232:10051] 62019/12/20 10:22:44.039737 received [{"response":"success","data":[{"key":"agent.hostname","delay":60,"lastlogsize":0,"mtime":0}]}] from [192.168.188.232:10051] 72019/12/20 10:22:44.040232 [1] cannot parse list of active checks from [192.168.188.232:10051]: json: cannot unmarshal number into Go struct field Request.data.delay of type string 82019/12/20 10:22:44.040284 [1] End of refreshActiveChecks() from [192.168.188.232:10051]

##設定ファイル

zabbix_agent2.conf

1# This is a configuration file for Zabbix agent 2 (Unix) 2# To get more information about Zabbix, visit http://www.zabbix.com 3 4############ GENERAL PARAMETERS ################# 5 6### Option: PidFile 7# Name of PID file. 8# 9# Mandatory: no 10# Default: 11# PidFile=/tmp/zabbix_agent2.pid 12 13PidFile=/var/run/zabbix/zabbix_agent2.pid 14 15### Option: LogType 16# Specifies where log messages are written to: 17# system - syslog 18# file - file specified with LogFile parameter 19# console - standard output 20# 21# Mandatory: no 22# Default: 23# LogType=file 24 25### Option: LogFile 26# Log file name for LogType 'file' parameter. 27# 28# Mandatory: yes, if LogType is set to file, otherwise no 29# Default: 30# LogFile= 31 32LogFile=/var/log/zabbix/zabbix_agent2.log 33 34### Option: LogFileSize 35# Maximum size of log file in MB. 36# 0 - disable automatic log rotation. 37# 38# Mandatory: no 39# Range: 0-1024 40# Default: 41# LogFileSize=1 42 43LogFileSize=0 44 45### Option: DebugLevel 46# Specifies debug level: 47# 0 - basic information about starting and stopping of Zabbix processes 48# 1 - critical information 49# 2 - error information 50# 3 - warnings 51# 4 - for debugging (produces lots of information) 52# 5 - extended debugging (produces even more information) 53# 54# Mandatory: no 55# Range: 0-5 56# Default: 57# DebugLevel=3 58DebugLevel=5 59 60### Option: SourceIP 61# Source IP address for outgoing connections. 62# 63# Mandatory: no 64# Default: 65# SourceIP= 66 67##### Passive checks related 68 69### Option: Server 70# List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies. 71# Incoming connections will be accepted only from the hosts listed here. 72# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally 73# and '::/0' will allow any IPv4 or IPv6 address. 74# '0.0.0.0/0' can be used to allow any IPv4 address. 75# Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com 76# 77# Mandatory: yes, if StartAgents is not explicitly set to 0 78# Default: 79# Server= 80Server=192.168.188.232 81 82### Option: ListenPort 83# Agent will listen on this port for connections from the server. 84# 85# Mandatory: no 86# Range: 1024-32767 87# Default: 88# ListenPort=10050 89 90### Option: ListenIP 91# List of comma delimited IP addresses that the agent should listen on. 92# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks. 93# 94# Mandatory: no 95# Default: 96# ListenIP=0.0.0.0 97ListenIP=192.168.188.209 98 99### Option: StatusPort 100# Agent will listen on this port for HTTP status requests. 101# 102# Mandatory: no 103# Range: 1024-32767 104# Default: 105# StatusPort= 106 107##### Active checks related 108 109### Option: ServerActive 110# List of comma delimited IP:port (or DNS name:port) pairs of Zabbix servers and Zabbix proxies for active checks. 111# If port is not specified, default port is used. 112# IPv6 addresses must be enclosed in square brackets if port for that host is specified. 113# If port is not specified, square brackets for IPv6 addresses are optional. 114# If this parameter is not specified, active checks are disabled. 115# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1] 116# 117# Mandatory: no 118# Default: 119# ServerActive= 120ServerActive=192.168.188.232:10051 121 122### Option: Hostname 123# Unique, case sensitive hostname. 124# Required for active checks and must match hostname as configured on the server. 125# Value is acquired from HostnameItem if undefined. 126# 127# Mandatory: no 128# Default: 129# Hostname= 130 131Hostname=net 132 133### Option: HostnameItem 134# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. 135# Does not support UserParameters or aliases. 136# 137# Mandatory: no 138# Default: 139# HostnameItem=system.hostname 140 141### Option: HostMetadata 142# Optional parameter that defines host metadata. 143# Host metadata is used at host auto-registration process. 144# An agent will issue an error and not start if the value is over limit of 255 characters. 145# If not defined, value will be acquired from HostMetadataItem. 146# 147# Mandatory: no 148# Range: 0-255 characters 149# Default: 150# HostMetadata= 151 152### Option: HostMetadataItem 153# Optional parameter that defines an item used for getting host metadata. 154# Host metadata is used at host auto-registration process. 155# During an auto-registration request an agent will log a warning message if 156# the value returned by specified item is over limit of 255 characters. 157# This option is only used when HostMetadata is not defined. 158# 159# Mandatory: no 160# Default: 161# HostMetadataItem= 162 163### Option: RefreshActiveChecks 164# How often list of active checks is refreshed, in seconds. 165# 166# Mandatory: no 167# Range: 60-3600 168# Default: 169# RefreshActiveChecks=120 170 171### Option: BufferSend 172# Do not keep data longer than N seconds in buffer. 173# 174# Mandatory: no 175# Range: 1-3600 176# Default: 177# BufferSend=5 178 179### Option: BufferSize 180# Maximum number of values in a memory buffer. The agent will send 181# all collected data to Zabbix Server or Proxy if the buffer is full. 182# 183# Mandatory: no 184# Range: 2-65535 185# Default: 186# BufferSize=100 187 188############ ADVANCED PARAMETERS ################# 189 190### Option: Alias 191# Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one. 192# Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed. 193# Different Alias keys may reference the same item key. 194# For example, to retrieve the ID of user 'zabbix': 195# Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1] 196# Now shorthand key zabbix.userid may be used to retrieve data. 197# Aliases can be used in HostMetadataItem but not in HostnameItem parameters. 198# 199# Mandatory: no 200# Range: 201# Default: 202 203### Option: Timeout 204# Spend no more than Timeout seconds on processing 205# 206# Mandatory: no 207# Range: 1-30 208# Default: 209# Timeout=3 210 211### Option: Include 212# You may include individual files or all files in a directory in the configuration file. 213# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. 214# 215# Mandatory: no 216# Default: 217# Include= 218 219Include=/etc/zabbix/zabbix_agent2.d/*.conf

##Zabbixのアイテム
名前 hostname
タイプ Zabbixエージェント(アクティブ)
キー agent.hostname
データ型 ログ
監視間隔 1m
ヒストリの保存期間 Storage period 90d
ログの時間の形式
アプリケーションの作成
アプリケーション -なし-
説明

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

自己解決しました。ZabbixServerとAgent間のバージョンの違いが原因だったようです。

投稿2019/12/20 02:07

kobaya

総合スコア14

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問