Install Netdata ubuntu - linux mint
install dep:
Terminal:
apt-get install zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autogen automake pkg-config
and
Terminal:
apt-get install curl jq nodejs
now clone netdata and installl
Terminal:
git clone https://github.com/firehol/netdata.git --depth=1
Terminal:
cd netdata
Terminal:
./netdata-installer.sh
message of installation
Welcome to netdata!
Nice to see you are giving it a try!
You are about to build and install netdata to your system.
It will be installed at these locations:
- the daemon at /usr/sbin/netdata
- config files at /etc/netdata
- web files at /usr/share/netdata
- plugins at /usr/libexec/netdata
- cache files at /var/cache/netdata
- db files at /var/lib/netdata
- log files at /var/log/netdata
- pid file at /var/run
This installer allows you to change the installation path.
Press Control-C and run the same command with --help for help.
Press ENTER to build and install netdata to your system >
[...]
-------------------------------------------------------------------------------
OK. NetData is installed and it is running (listening to *:19999).
-------------------------------------------------------------------------------
Hit http://localhost:19999/ from your browser.
To stop netdata, just kill it, with:
killall netdata
To start it, just run it:
now you can acces for http://localhost:19999/
if you want protected and change por netdata with nginx use this:
Terminal:
apt-get install nginx
Terminal:
nano /etc/nginx/sites-available/default
replace with this:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/web/;
index index.php index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
client_max_body_size 10G;
location /monit/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:19999/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
auth_basic "Restricted"; #For Basic Auth
auth_basic_user_file /etc/nginx/.htpasswd; #For Basic Auth
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
now generate user and password for access:
Terminal:
sudo htpasswd -c /etc/nginx/.htpasswd exampleuser
Terminal:
service nginx restart
Soucer:
http://rm-rf.es/como-monitorizar-un-sistema-gnulinux-en-5-minutos/
https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10
2 comentarios :