[pidora][Zabbix][自分用メモ] RaspberryPi Pidora に Zabbix Agent 2.0.7を入れてみた。

zabbix

先日Zabbixの2.0.7が公開されていたので、RaspberryPi(Pidora環境)にレポジトリからではなく、ソースからコンパイルして導入してみることにしました。

cat /etc/redhat-release
Pidora 18 (Raspberry Pi Fedora Remix)

確認環境

以下から最新のソースファイルをダウンロードしてくる。

Download and install Zabbix
Zabbix is being downloaded over 4 000 000 times every year for a reason. Download and install Zabbix for free and try it...

ダウンロードしたファイルを解凍し、以下のオプションでコンパイルする。
(オプションは適宜変更してください)

./configure --enable-agent --enable-ipv6 --sysconfdir=/etc/zabbix/
make install

/usr/lib/systemd/system/配下にzabbix-agent.serviceなどの名前のファイルを作成し、以下の様な内容を記述する。

[Unit]
Description=Zabbix Monitor Agent
After=syslog.target network.target

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/zabbix_agentd #自分の環境に合わせてください
RemainAfterExit=yes
User=zabbix
PrivateTmp=yes

[Install]
WantedBy=multi-user.target

systemdにユニットとして追加する。

systemctl load zabbix-agent.service

自動起動を有効にする。

systemctl enable zabbix-agent.service
ln -s '/usr/lib/systemd/system/zabbix-agent.service' '/etc/systemd/system/multi-user.target.wants/zabbix-agent.service'

サービスを起動し、問題なく起動していることを確認する。問題があるようであればエラーメッセージを参考にし、修正する。

# systemctl start zabbix-agent.service
# systemctl status zabbix-agent.service
zabbix-agent.service - Zabbix Monitor Agent
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled)
Active: active (exited) since Wed, 2013-08-07 22:39:09 JST; 9s ago
Process: 31395 ExecStart=/usr/local/sbin/zabbix_agentd (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/zabbix-agent.service
t 31398 /usr/local/sbin/zabbix_agentd
t 31399 /usr/local/sbin/zabbix_agentd
t 31400 /usr/local/sbin/zabbix_agentd
t 31401 /usr/local/sbin/zabbix_agentd
t 31402 /usr/local/sbin/zabbix_agentd
m 31403 /usr/local/sbin/zabbix_agentd

Aug 07 22:39:09 patty.kometch.local zabbix_agentd[31395]: zabbix_agentd [31395]: /etc/z...y
Aug 07 22:39:09 patty.kometch.local systemd[1]: Started Zabbix Monitor Agent.

以上です。問題があるようであればご指摘ください。

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました