of 22 /22
NAS4FreeZabbix Agent導入してみた。 kometchtech

Nas4 freeへzabbix agentを導入してみた

Embed Size (px)

DESCRIPTION

 

Text of Nas4 freeへzabbix agentを導入してみた

  • NAS4FreeZabbix Agent kometchtech
  • Agenda NAS4Free Zabbix Agent FAQ
  • NAS4Free FreeBSD9NAS FreeNAS FreeBSD89 NAS4Free http://www.nas4free.org/
  • GEOMRAIDZFS Web
  • SNMPZFS FreeBSD
  • Zabbix
  • Zabbix Agent
  • hp Microserver N36L Mem: 8GB USB boot HDD: 1TB *4
  • Zabbix Agent # wget http://downloads.sourceforge. net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.7 /zabbix-2.0.7.tar.gz wget: Command not found. wget /: write failed, filesystem is full
  • orz HDD
  • Zabbix Agent # pkg_add -r zabbix2-agent Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1- release/Latest/zabbix2-agent.tbz... Done. Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1- release/All/libiconv-1.14.tbz... Done. ===> Creating users and/or groups. Creating group 'zabbix' with gid '122'. Creating user 'zabbix' with uid '122'.
  • config/usr/local/etc/zabbix2/ # ls -l /usr/local/etc/zabbix2/ total 8 -rw-r--r-- 1 root wheel 1605 Apr 10 20:08 zabbix_agent. conf.sample -rw-r--r-- 1 root wheel 5718 Apr 10 20:08 zabbix_agentd. conf.sample
  • Zabbix Server FreeBSD
  • Zabbix config USB Boot
  • NAS4Free
  • #!/bin/sh # Valiable ZBX_CONF=/usr/local/etc/zabbix2/zabbix_agentd.conf ZBX_RC=/usr/local/etc/rc.d ZABBIX_SERVER_IP="" SERVER_NAME="" # add Zabbix-agent /usr/sbin/pkg_add -r zabbix2-agent # copy configure /bin/cp ${ZBX_CONF}.sample ${ZBX_CONF} # Value reWritable sed -i '' -e 's/Server=127.0.0.1/Server='${ZABBIX_SERVER_IP}'/' ${ZBX_CONF} sed -i '' -e 's/ServerActive=127.0.0.1/ServerActive='${ZABBIX_SERVER_IP}'/' ${ZBX_CONF} sed -i '' -e 's/Hostname=Zabbix server/Hostname='${SERVER_NAME}'/' ${ZBX_CONF} sed -i '' -e 's/# EnableRemoteCommands=0/EnableRemoteCommands=1/' ${ZBX_CONF} # auto start config echo "zabbix_agentd_enable="YES"" >> /etc/rc.conf # Zabbix agent start ${ZBX_RC}/zabbix_agentd start
  • 1. zabbix-agent 2. config 3. zabbix-agentd 4. zpool NAS4Free https://github. com/kometchtech/zabbix_nas4free
  • system.run
  • NAS4FreeZabbix Agent