正確なバージョンまで調べていないが、
nagios-plugins が2.0 系から 2.1 系へ移動するあたりで、
check_log プラグインが egrep ではなく grep を使うようになっている。
このため、grep が gnu grep ではない Solaris では、
'-q query' に正規表現を書くと必ず match しないので、
常に ok が返ってしまう。
[ Read More... ]
正確なバージョンまで調べていないが、
nagios-plugins が2.0 系から 2.1 系へ移動するあたりで、
check_log プラグインが egrep ではなく grep を使うようになっている。
このため、grep が gnu grep ではない Solaris では、
'-q query' に正規表現を書くと必ず match しないので、
常に ok が返ってしまう。
[ Read More... ]
Nagios 4.0 系が Solaris でビルドできない件 [2014-02-17-1] から、
Nagios のアップデートをちゃんと確認していなかったが、
4.1.1 が出ていたので Solaris 上でビルドできるか試してみた。
結果としては、spec file のバージョン番号を変えるくらいで、
あっさりとビルドできた。
あとは、パッケージ構成をどうするかとか考えてパッケージ作成。
メモ
- Goでcheck_smtpを書き直した go-check-smtp をリリースしました · ~nabeken/tech/
http://mahiru.moe/post/go-check-smtp/
- nabeken/go-check-smtp
https://github.com/nabeken/go-check-smtp
- nabeken/nagiosplugin
https://github.com/nabeken/nagiosplugin
Go の勉強の目標として、Nagios Plugin を書くというくらいが
自分にはちょうどいいかもしれない。
最近の OpenSSL の heart bleed 問題をチェックする
Nagios Plugin があったのでメモ。
check_heartbleed - Nagios Exchange
http://exchange.nagios.org/directory/Plugins/Security/check_heartbleed/details
Nagios を 4 系にアップデートしてみようかと、4.0.2 をビルドしようとしたところ、
ビルドに失敗。
4.0.1 も試したけど同じように、以下のようなログを出して失敗。
$ CC=/usr/gcc/4.7/bin/gcc gmake all cd ./base && /opt/dtbld/bin/make make[1]: Entering directory `/home/tonaka/packages/BUILD/nagios-4.0.1/base' /usr/gcc/4.7/bin/gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o nagios.o nagios.c In file included from nagios.c:38:0: ../include/comments.h:61:16: error: redefinition of 'struct comment' In file included from ../include/config.h:144:0, from nagios.c:35: /usr/include/pwd.h:37:8: note: originally defined here nagios.c: In function 'nagios_core_worker': nagios.c:164:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'pid_t' [-Wformat] nagios.c:164:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'pid_t' [-Wformat] make[1]: *** [nagios.o] Error 1 make[1]: Leaving directory `/home/tonaka/packages/BUILD/nagios-4.0.1/base' gmake: *** [all] Error 2
ぐぐると以下のチケットが見つかった。
Nagios Tracker - 0000476: Nagios fails to build on Solaris 11 - Mantis
http://tracker.nagios.org/view.php?id=476
include/comments.h で定義されている 'struct comment' というやつがあり、
Solaris の /usr/include/pwd.h で定義されている同名の 'struct comment' と
衝突することが原因とのこと。
この問題の解決には ABI の変更が必要なため、
次のマイナーリリースである 4.1.0 での解決になるそう。
nagios-4.1 branch では修正され Solaris 10 で動作しているらしい。
nagios-4.1 branch は以下
Nagios / Nagios Core / [c3776c]
http://sourceforge.net/p/nagios/nagioscore/ci/nagios-4.1/tree/
出ていたので、#jposug のパッケージをアップデート。
http://www.nagios.org/news/77-news-announcements/347-nagios-core-350-released