OpenSeaMap-dev:Server FreeBSD Monitoring

Aus OpenSeaMap-dev
Wechseln zu:Navigation, Suche

Installation

Download the latest source version from [1]. And copy the agent script.

cp /path/to/check_mk_agent.freebsd /usr/local/bin/check_mk_agent

Restrict ZFS to return only filesystem types. Otherwise all snapshots will be tracked as well and the script is running more than one minute.

vi /usr/local/bin/check_mk_agent
  -    zfs get -Hp name,quota,used,avail,mountpoint,type
  +    zfs get -t filesystem -Hp name,quota,used,avail,mountpoint,type

Create an extra user.

pw groupadd checkmk
pw useradd checkmk -g checkmk -s /usr/sbin/nologin

Register port in services file.

vi /etc/services
  check_mk   6556/tcp   #check_mk agent

Register the service.

vi /etc/inetd.conf
  check_mk   stream   tcp   nowait   checkmk   /usr/local/bin/check_mk_agent   check_mk_agent

Change firewall settings.

vi /etc/pf.conf
  (add allowed server)

Activate service.

vi /etc/rc.conf
  inetd_enable="YES"
  inetd_flags="-wW"

service inetd start