Mudanças entre as edições de "Netdata"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
(Criou página com 'Página do projeto * https://github.com/firehol/netdata == Instalando == <source lang="bash"> apt-get install zlib1g-dev gcc make git autoconf autogen automake pkg-config git...')
 
 
(9 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 4: Linha 4:
 
== Instalando ==
 
== Instalando ==
 
<source lang="bash">
 
<source lang="bash">
apt-get install zlib1g-dev gcc make git autoconf autogen automake pkg-config
+
apt-get install zlib1g-dev uuid-dev libmnl-dev gcc make autoconf autoconf-archive \
 +
autogen automake pkg-config curl git python-mysqldb lm-sensors netcat iproute
 +
cd /usr/src
 
git clone https://github.com/firehol/netdata
 
git clone https://github.com/firehol/netdata
 
cd netdata/
 
cd netdata/
 
./netdata-installer.sh
 
./netdata-installer.sh
 
</source>
 
</source>
 +
 +
== Kernel ==
 +
<source lang="bash">
 +
sed -i "13s#^#\necho 1 > /sys/kernel/mm/ksm/run\n#" /etc/rc.local
 +
sed -i "15s#^#echo 1000 > /sys/kernel/mm/ksm/sleep_millisecs\n#" /etc/rc.local
 +
</source>
 +
 +
== MySQL ==
 +
 +
criando banco de dados pro Netdata coleta informações
 +
<source lang="mysql">
 +
create user 'netdata'@'localhost';
 +
grant usage on *.* to 'netdata'@'localhost' with grant option;
 +
flush privileges;
 +
</source>
 +
 +
== No Nginx ==
 +
 +
geral senha
 +
<source lang="bash">
 +
printf "yourusername:$(openssl passwd -crypt 'yourpassword')" > /etc/nginx/passwords
 +
</source>
 +
 +
<source lang="nginx">
 +
upstream netdata {
 +
    server 127.0.0.1:19999;
 +
    keepalive 64;
 +
}
 +
 +
server {
 +
  listen 80;
 +
 +
  location /netdata {
 +
        return 301 /netdata/;
 +
  }
 +
 +
  location ~ /netdata/(?<ndpath>.*) {
 +
        proxy_redirect off;
 +
        proxy_set_header Host $host;
 +
 +
        proxy_set_header X-Forwarded-Host $host;
 +
        proxy_set_header X-Forwarded-Server $host;
 +
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 +
        proxy_http_version 1.1;
 +
        proxy_pass_request_headers on;
 +
        proxy_set_header Connection "keep-alive";
 +
        proxy_store off;
 +
        proxy_pass http://netdata/$ndpath$is_args$args;
 +
 +
        gzip on;
 +
        gzip_proxied any;
 +
        gzip_types *;
 +
    }
 +
 +
    location /stub_status {
 +
        stub_status on;
 +
        access_log  off;
 +
        allow 127.0.0.1;
 +
        deny all;
 +
    }
 +
 +
    auth_basic "Authentication Required";
 +
    auth_basic_user_file /etc/nginx/passwords;
 +
 +
}
 +
</source>
 +
 +
  
 
Acessa em http://192.168.0.1:19999
 
Acessa em http://192.168.0.1:19999
  
Configuração em http://192.168.0.1:19999/netdata.conf  
+
Configuração em http://192.168.0.1:19999/netdata.conf
  
 
== Referência ==
 
== Referência ==
 
* https://blog.butecopensource.org/monitoramento-de-servidor-com-netdata/
 
* https://blog.butecopensource.org/monitoramento-de-servidor-com-netdata/
 +
* http://yallalabs.com/linux/how-to-install-netdata-to-monitor-your-linux-environment/
 +
* https://easyengine.io/tutorials/nginx/status-page/
 +
* http://www.techietown.info/2017/02/monitor-nginx-using-netdata/
 +
* https://www.digitalocean.com/community/tutorials/how-to-set-up-real-time-performance-monitoring-with-netdata-on-ubuntu-16-04
 +
* https://github.com/firehol/netdata/wiki/Running-behind-nginx
 +
* https://github.com/firehol/netdata/wiki/Installation
 +
* https://blog.selectel.com/netdata-monitoring-real-time/

Edição atual tal como às 01h32min de 21 de julho de 2017

Página do projeto

Instalando

apt-get install zlib1g-dev uuid-dev libmnl-dev gcc make autoconf autoconf-archive \
autogen automake pkg-config curl git python-mysqldb lm-sensors netcat iproute
cd /usr/src
git clone https://github.com/firehol/netdata
cd netdata/
./netdata-installer.sh

Kernel

sed -i "13s#^#\necho 1 > /sys/kernel/mm/ksm/run\n#" /etc/rc.local
sed -i "15s#^#echo 1000 > /sys/kernel/mm/ksm/sleep_millisecs\n#" /etc/rc.local

MySQL

criando banco de dados pro Netdata coleta informações

create user 'netdata'@'localhost';
grant usage on *.* to 'netdata'@'localhost' with grant option;
flush privileges;

No Nginx

geral senha

printf "yourusername:$(openssl passwd -crypt 'yourpassword')" > /etc/nginx/passwords
upstream netdata {
    server 127.0.0.1:19999;
    keepalive 64;
}

server {
   listen 80;

   location /netdata {
        return 301 /netdata/;
   }

   location ~ /netdata/(?<ndpath>.*) {
        proxy_redirect off;
        proxy_set_header Host $host;

        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_pass_request_headers on;
        proxy_set_header Connection "keep-alive";
        proxy_store off;
        proxy_pass http://netdata/$ndpath$is_args$args;

        gzip on;
        gzip_proxied any;
        gzip_types *;
    }

    location /stub_status {
        stub_status on;
        access_log   off;
        allow 127.0.0.1;
        deny all;
    }

    auth_basic "Authentication Required";
    auth_basic_user_file /etc/nginx/passwords;

}


Acessa em http://192.168.0.1:19999

Configuração em http://192.168.0.1:19999/netdata.conf

Referência