Giter Site home page Giter Site logo

gr0vity / netdata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netdata/netdata

0.0 1.0 0.0 28.81 MB

Real-time performance monitoring, done right! https://my-netdata.io/

License: GNU General Public License v3.0

Shell 6.83% CMake 0.27% Makefile 1.39% C 42.91% M4 0.78% C++ 0.22% POV-Ray SDL 0.09% JavaScript 18.21% Objective-C 0.06% Python 19.75% Dockerfile 0.11% HTML 4.39% CSS 4.91% PHP 0.09%

netdata's Introduction

Install netdata with Docker

โš ๏ธ As of Sep 9th, 2018 we ship new docker builds, running netdata in docker with an ENTRYPOINT directive, not a COMMAND directive. Please adapt your execution scripts accordingly. You can find more information about ENTRYPOINT vs COMMAND is presented by goinbigdata here and by docker docs here.

Also, the latest is now based on alpine, so alpine is not updated any more and armv7hf is now replaced with armhf (to comply with https://github.com/multiarch naming), so armv7hf is not updated either.

Limitations

Running netdata in a container for monitoring the whole host, can limit its capabilities. Some data is not accessible or not as detailed as when running netdata on the host.

Package scrambling in runtime (x86_64 only)

By default on x86_64 architecture our docker images use Polymorphic Polyverse Linux package scrambling. For increased security you can enable rescrambling of packages during runtime. To do this set environment variable RESCRAMBLE=true while starting netdata docker container.

For more information go to Polyverse site

Run netdata with docker command

Quickly start netdata with the docker command line. Netdata is then available at http://host:19999

This is good for an internal network or to quickly analyse a host.

docker run -d --name=netdata \
  -p 19999: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

The above can be converted to docker-compose file for ease of management:

version: '3'
services:
  netdata:
    image: netdata/netdata
    hostname: example.com # set to fqdn of host
    ports:
      - 19999:19999
    cap_add:
      - SYS_PTRACE
    security_opt:
      - apparmor:unconfined
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro

Docker container names resolution

If you want to have your container names resolved by netdata it needs to have access to docker group. To achive that just add environment variable PGID=999 to netdata container, where 999 is a docker group id from your host. This number can be found by running:

grep docker /etc/group | cut -d ':' -f 3

Pass command line options to Netdata

Since we use an ENTRYPOINT directive, you can provide netdata daemon command line options such as the IP address netdata will be running on, using the command instruction.

Install Netdata using Docker Compose with SSL/TLS enabled http proxy

For a permanent installation on a public server, you should secure the netdata instance. This section contains an example of how to install netdata with an SSL reverse proxy and basic authentication.

You can use use the following docker-compose.yml and Caddyfile files to run netdata with docker. Replace the Domains and email address for Letsencrypt before starting.

Prerequisites

Caddyfile

This file needs to be placed in /opt with name Caddyfile. Here you customize your domain and you need to provide your email address to obtain a Letsencrypt certificate. Certificate renewal will happen automatically and will be executed internally by the caddy server.

netdata.example.org {
  proxy / netdata:19999
  tls [email protected]
}

docker-compose.yml

After setting Caddyfile run this with docker-compose up -d to have fully functioning netdata setup behind HTTP reverse proxy.

version: '3'
volumes:
  caddy:

services:
  caddy:
    image: abiosoft/caddy
    ports:
      - 80:80
      - 443:443
    volumes:
      - /opt/Caddyfile:/etc/Caddyfile
      - caddy:/root/.caddy
    environment:
      ACME_AGREE: 'true'
  netdata:
    restart: always
    hostname: netdata.example.org
    image: netdata/netdata
    cap_add:
      - SYS_PTRACE
    security_opt:
      - apparmor:unconfined
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro

Restrict access with basic auth

You can restrict access by following official caddy guide and adding lines to Caddyfile.

analytics

netdata's People

Contributors

ktsaou avatar ilyam8 avatar paulfantom avatar vlvkobal avatar ferroin avatar cakrit avatar ccremer avatar alonbl avatar facetoe avatar lets00 avatar gmosx avatar wing924 avatar philwhineray avatar rda0 avatar rlefevre avatar arch273 avatar ntlug avatar n0guest avatar glensc avatar netdatabot avatar tycho avatar domschl avatar alibo avatar ecowed avatar manosf avatar shadycuz avatar fredericopissarra avatar jasonwbarnett avatar davidak avatar candrews avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.