Raspberry Pi2 に Raspbian(debian)のリソース状況を確認したく
Munin を導入して postgres を監視する設定を実施しました。
また、postgres の設定が難しかったのでメモ書きする事にしました
シンボリックを設定する事で監視する事が出来るようになりました
シンボリック情報
ln -s /usr/share/munin/plugins/postgres_autovacuum /etc/munin/plugins/ ln -s /usr/share/munin/plugins/postgres_bgwriter /etc/munin/plugins/ ln -s /usr/share/munin/plugins/postgres_cache_ /etc/munin/plugins/postgres_cache_ALL ln -s /usr/share/munin/plugins/postgres_checkpoints /etc/munin/plugins/ ln -s /usr/share/munin/plugins/postgres_connections_ /etc/munin/plugins/postgres_connections_ALL ln -s /usr/share/munin/plugins/postgres_connections_db /etc/munin/plugins/ ln -s /usr/share/munin/plugins/postgres_locks_ /etc/munin/plugins/postgres_locks_ALL ln -s /usr/share/munin/plugins/postgres_oldest_prepared_xact_ /etc/munin/plugins/postgres_oldest_prepared_xact_ALL ln -s /usr/share/munin/plugins/postgres_prepared_xacts_ /etc/munin/plugins/postgres_prepared_xacts_ALL ln -s /usr/share/munin/plugins/postgres_querylength_ /etc/munin/plugins/postgres_querylength_ALL ln -s /usr/share/munin/plugins/postgres_scans_ /etc/munin/plugins/postgres_scans_ALL ln -s /usr/share/munin/plugins/postgres_size_ /etc/munin/plugins/postgres_size_ALL ln -s /usr/share/munin/plugins/postgres_streaming_ /etc/munin/plugins/postgres_streaming_ALL ln -s /usr/share/munin/plugins/postgres_transactions_ /etc/munin/plugins/postgres_transactions_ALL ln -s /usr/share/munin/plugins/postgres_tuples_ /etc/munin/plugins/postgres_tuples_ALL ln -s /usr/share/munin/plugins/postgres_users /etc/munin/plugins/ ln -s /usr/share/munin/plugins/postgres_xlog /etc/munin/plugins/
※.postgres_cache_ ⇒ postgres_cache_ALL として
ALLを記入して登録する必要があります
また、以下のエラーになる場合は
正しくシンボリックの設定出来てない状態になります
■エラー内容①
[1167] DBI connect(‘dbname=template1’,”,…) failed: FATAL: ロール”nobody”は存在しません at /usr/share/perl5/Munin/Plugin/Pgsql.pm line 430.
[1167] Service ‘postgres_connections_’ exited with status 1/0.
[1167] Error output from irqstats:
■エラー内容②
[7913] DBD::Pg::st execute failed: ERROR: ディレクトリ一覧を得るにはスーパーユーザでなければなりません at /usr/share/perl5/Munin/Plugin/Pgsql.pm line 450.
[7913] Service ‘postgres_xlog’ exited with status 1/0.
[7913] Error output from postgres_transactions_:
■エラー内容③
[9459] Service ‘postgres_querylength_’ exited with status 255/0.
[9459] Error output from postgres_transactions_:
[9459] Piece 0 not found in wildcard parameter.