2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Zabbix unreachable poller processesを探せ

Last updated at Posted at 2022-11-18

「Zabbix unreachable poller processes more than 75%」という警告が心当たりが無いのに来ていて(根拠無き自信)原因究明に重い腰を上げた記録です。

pingでUnreachableなサーバーはエラーになっているのでわかりますが、SNMPの取得エラーになっているとはっきりわかりません。ということで放置していたのですが、アラートが頻繁になって気になってきたので調査しました。

pollerプロセスを調べる

ps axu|grep -i unreachableでプロセスを確認します。

$ ps axu|grep -i unreachable
zabbix   13920  0.0  0.0  14168  1124 pts/0    S+   18:19   0:00 grep --color=auto -i unreachabl
zabbix   15099  0.0  0.2 316760 21756 ?        S     9月15  14:26 /usr/sbin/zabbix_server:
 unreachable poller #1 [got 2 values in 10.592765 sec, idle 5 sec]
zabbix   15100  0.0  0.2 316756 21772 ?        S     9月15  14:28 /usr/sbin/zabbix_server:
 unreachable poller #2 [got 3 values in 11.996739 sec, getting values]
zabbix   15101  0.0  0.2 316752 21680 ?        S     9月15  14:27 /usr/sbin/zabbix_server:
 unreachable poller #3 [got 1 values in 9.009887 sec, getting values]
zabbix   15102  0.0  0.2 316772 21768 ?        S     9月15  14:27 /usr/sbin/zabbix_server:
 unreachable poller #4 [got 1 values in 9.009850 sec, getting values]
zabbix   15103  0.0  0.2 316768 21764 ?        S     9月15  14:29 /usr/sbin/zabbix_server:
 unreachable poller #5 [got 3 values in 11.751342 sec, getting values]
....

これでプロセスIDがわかります。たしかに時間のかかってるプロセスがありそうです。実行されるプロセスはランダムで解放されるので適当にあたりをつけます。PIDは変わらないので、どでれも良さそうです。

straceで調べる

straceコマンドで調査します。#5のPIDが15103なので、なんとなくこれを調べて見ることにします。straceは流れていくので(Timeout)が見えた当たりで適当にストップしてログを見ます。

$ sudo strace -p 15103

strace: Process 15103 attached
....
uname({sysname="Linux", nodename="zabbix", ...}) = 0
getsockopt(10, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0
getsockopt(10, SOL_SOCKET, SO_RCVBUF, [212992], [4]) = 0
sendmsg(10, {msg_name={sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("172.17.9.111")}, msg_namelen=16, msg_iov=[{iov_base="0.\2\1\1\4\6public\245!\2\4\17\357]y\2\1\0\2\1\0220\0230\21\6"..., iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 48
select(11, [10], NULL, NULL, {tv_sec=2, tv_usec=999998}) = 0 (Timeout)
sendmsg(10, {msg_name={sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("172.17.9.111")}, msg_namelen=16, msg_iov=[{iov_base="0.\2\1\1\4\6public\245!\2\4\17\357]z\2\1\0\2\1\t0\0230\21\6"..., iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 48
select(11, [10], NULL, NULL, {tv_sec=2, tv_usec=999998}) = 0 (Timeout)
sendmsg(10, {msg_name={sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("172.17.9.111")}, msg_namelen=16, msg_iov=[{iov_base="0.\2\1\1\4\6public\245!\2\4\17\357]{\2\1\0\2\1\0010\0230\21\6"..., iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 48
select(11, [10], NULL, NULL, {tv_sec=2, tv_usec=999987}) = 0 (Timeout)
close(10)                               = 0
....

これを見ると「172.17.9.111」でTimeoutになっているようです。ということで172.17.9.111のSMNPを無効にするか、取得するプロファイルの見直しを行います。

めでたしめでたし...でなくてまだunreachableは残っているようですが、とりあえずアラート基準から大幅に下げることには成功しました。

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?