monitoring

netdata

Docker
docker run -d --name=netdata \
-p 8080:19999 \
-v /proc:/host/proc:ro \
-v /sys:/host/sys:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--cap-add SYS_PTRACE \
--security-opt apparmor=unconfined \
netdata/netdata

# URL
http://SERVER_IP:8080

Links
https://github.com/netdata/netdata

Zabbix

Download
https://www.zabbix.com/download?zabbix=3.4&os_distribution=ubuntu&os_version=xenial&db=MySQL

vi /var/www/zabbix/conf/zabbix.conf.php

netstat -tulpen | grep 10051

sudo service zabbix-server restart

tail -f /var/log/zabbix-agent/zabbix_agentd.log

# reset password
sudo -u postgres psql
ALTER USER zabbix WITH PASSWORD 'linux01';
\c zabbix
zabbix=# update users set passwd=md5('') where alias='Admin';
service zabbix-server restart

WebGui
http://zabbix_server/zabbix/
user: Admin
pass: zabbix

Debian: Install Cacti

# create container
export CONTAINER=cacti
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/lxc/master/create.jessie.sh -O - | bash -s -- -f
sudo lxc-attach -n ${CONTAINER} -- sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|' /etc/ssh/sshd_config
sudo lxc-attach -n ${CONTAINER} -- service ssh restart

# fix dns
echo nameserver 8.8.8.8 > /var/lib/lxc/${CONTAINER}/rootfs/etc/resolv.conf

# install applications
lxc-attach -n ${CONTAINER} --
LANG=en_US.UTF-8

apt-get update

# server
debconf-set-selections <<\EOF