maczabbix

MacBookをZABBIXで監視する

MacBookは、クライアントなので監視するのは、HDDの残量だけです。
こんな感じで稼動しているときだけ空容量のサイズと割り合いが記録されて10%を切るとメールで通知されます。

MacPortsでエージェントインストール

$ sudo port install zabbix +agent_only
Password:
--->  Computing dependencies for zabbix
--->  Fetching zabbix
--->  Attempting to fetch zabbix-1.6.8.tar.gz from http://distfiles.macports.org/zabbix
--->  Verifying checksum(s) for zabbix
--->  Extracting zabbix
--->  Applying patches to zabbix
--->  Configuring zabbix
--->  Building zabbix
--->  Staging zabbix into destroot
--->  Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting zabbix with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist
###########################################################
--->  Installing zabbix @1.6.8_3+agent_only
--->  Activating zabbix @1.6.8_3+agent_only
#### To complete the ZABBIX agent installation ####
1) Edit the sample .conf file /opt/local/etc/zabbix/zabbix_agentd.conf (rename & omit .sample)
Set the following variable to the ip address of your ZABBIX server to
allow it access to the agent.
Server=x.x.x.x
2) Set zabbix_agentd to run at system boot
sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist
To start Zabbix manually, use: /opt/local/share/zabbix/zabbix_agentd.init start (stop|status)
3) A Win32 agent is in /opt/local/share/zabbix/zabbix_agent_win32 for
installation on Windows NT 4.0, Windows 2000, and Windows XP.
--->  Cleaning zabbix
$

設定

$ cd /opt/local/etc/zabbix
$ cp zabbix_agentd.conf.sample zabbix_agentd.conf
cp: zabbix_agentd.conf: Permission denied
$ sudo cp zabbix_agentd.conf.sample zabbix_agentd.conf
$ sudo vi zabbix_agentd.conf
$ diff -u zabbix_agentd.conf.sample zabbix_agentd.conf
--- zabbix_agentd.conf.sample	2010-03-14 22:42:22.000000000 +0900
+++ zabbix_agentd.conf	2010-03-14 22:55:46.000000000 +0900
@@ -8,7 +8,7 @@
# Note that hostnames must resolve hostname->IP address and
# IP address->hostname.
-Server=127.0.0.1
+Server=zabbix.local
# Server port for sending active checks
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist
$ /opt/local/share/zabbix/zabbix_agentd.init start
-n Starting zabbix_agentd
$
$ 
タイトルとURLをコピーしました