Netdata: mudanças entre as edições

De MochilaWiki
Ir para navegaçãoIr para pesquisar
Sem resumo de edição
Linha 19: Linha 19:


<source lang="nginx">
<source lang="nginx">
upstream netdata {
    server 127.0.0.1:19999;
    keepalive 64;
}
server {
server {
     auth_basic "Protected";
  listen 80;
     auth_basic_user_file passwords;
#  server_name localhost 127.0.0.1;
 
  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;
 
}
}
        location /stub_status {
          stub_status on;
          access_log  off;
          allow 127.0.0.1;
          deny all;
        }
</source>
</source>


Linha 36: Linha 67:
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 ==

Edição das 15h04min de 19 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
cd /usr/src
git clone https://github.com/firehol/netdata
cd netdata/
./netdata-installer.sh

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;
#   server_name localhost 127.0.0.1;

   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