munin インストール ラズベリーパイ 多分正しい方法
固定IP /etc/dhcpcd.conf を編集
interface eth-0
static ip_address=192.168.3.253/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.3.254
#static domain_name_servers=192.168.3.254 8.8.8.8
static domain_name_servers= 192.168.3.254
apache の導入
$ sudo apt install apache2 apache2-doc php php-gd php-pear libapache2-mod-encoding libapache2-mod-php php-mbstring php-cgi php-common libapache2-mod-fcgid libcgi-fast-perl
modencodingの有効化
有効化(インストール時点で有効化されているはず) この時点でfastcgiつかえてない気がする
$ sudo a2enmod encoding
$ sudo a2enmod rewrite
munin等のインストール
$ sudo apt install munin munin-node munin-plugins-extra
$ sudo apt install rrdcached
$ sudo apt install munin libnet-snmp-perl
/etc/default/rrdcached の編集
WRITE_TIMEOUT=1800
WRITE_JITTER=1800
SOCKGROUP=www-data
BASE_OPTIONS="-F -f 3600"
に変更
アクセスグループの変更
sudo gpasswd -a munin www-data
sudo gpasswd -a www-data munin
/etc/apache2/conf-enabled/munin.conf の編集
ここでアクセス制限を取り除くだけどOK
<Directory /var/cache/munin/www> と <Directory /usr/lib/munin/cgi>の
Require local
を、アクセス制限にあわせて変更、全アクセスなら以下の設定に変更
Require all granted
/etc/munin/munin.conf の編集
多分帰る必要ないけど、コメントアウトを削除
dbdir /var/lib/muninhtmldir /var/cache/munin/wwwlogdir /var/log/muninrundir /var/run/munin
cgiで書くために、以下に変更
graph_strategy cgihtml_strategy cgi
データを移行するなら、とりあえずこのタイミングがいいのではないかと思う。
RRDcachedを有効にする
/etc/munin/munin.confの以下を有効にする
再起動して
Yamaha RTX系の情報をとる
Yamaha RTX系の情報をとるにはここからスクリプトをダウンロード
/usr/share/munin/plugins/
に配置
ln -s /usr/share/munin/plugins/rtx__memusage /etc/munin/plugins/snmp_hoge_memory
でリンクを作る。
/etc/munin/plugin-conf.d/munin-node を編集
最終行あたりに以下を追加
[snmp_rtx1210*]
env.version snmpv2c
env.community public
SNMPの取り方
sudo munin-node-configure --snmp URL,ip address --snmpversion 2 --snmpcommunity public
ではかれるモノ一覧
sudo munin-node-configure --snmp URL,ip address --snmpversion 2 --snmpcommunity public --shell
リンクの作成コマンドができる。
コメント
コメントを投稿