Steps to install node_exporter
-
Add user for node_exporter
sudo useradd --no-create-home --shell /bin/false node_exporter
| # Clean the exited containers | |
| docker rm $(sudo docker ps -a | grep Exit | cut -d ' ' -f 1) | |
| # Clean the untagged images (or old images) | |
| docker rmi $(docker images | tail -n +2 | awk '$1 == "<none>" {print $'3'}') | |
| # On Docker 1.9+ you can remove the orphan volumes with the next command | |
| docker volume rm $(docker volume ls -qf dangling=true) |
| # Modify this file accordingly for your specific requirement. | |
| # http://www.thegeekstuff.com | |
| # 1. Delete all existing rules | |
| iptables -F | |
| # 2. Set default chain policies | |
| iptables -P INPUT DROP | |
| iptables -P FORWARD DROP | |
| iptables -P OUTPUT DROP |