]> arthur.barton.de Git - netdata.git/blob - README.md
updates
[netdata.git] / README.md
1 netdata
2 =======
3
4 linux network traffic web monitoring
5
6 This little program will allow you to create embedable live monitoring charts on any web page.
7
8 # How it works
9
10 1. You run a daemon on your linux: netdata.
11 This deamon is written in C and is extremely lightweight.
12 What it does is that it reads /proc/net/dev and for every interface present there, it creates a JSON data file.
13 This JSON file contains all the data needed for the web graphs.
14
15 Since these files are created too often (e.g. once per second) it is adviced to put them on tmpfs.
16 The files have a fixed length, around just 4k for 60 seconds of graphs.
17
18 2. On your web page, you add a few javascript lines and a DIV for every graph you need.
19 Your browser will hit the web server to fetch the JSON data and refresh the graphs.
20
21 3. Graphs are generated using Google Charts API - they are pretty eye candy!
22
23
24
25 # Installation
26
27 ### download everything in a directory inside your web docs.
28 You don't need apache. Any web server able to provide static files will do the job fine.
29
30 ### Compile netdata
31 step into the directory you downloaded everything and compile netdata
32
33 ```sh
34 gcc -O3 -o netdata netdata.c
35 ```
36
37 ### run netdata
38 Run netdata and instruct it to create json files in the current directory.
39
40 ```sh
41 ./netdata -d -l 60 -u 1 -o `pwd`
42 ```
43  - -d says to go daemon mode
44  - -l 60 says to show 60 seconds of history
45  - -u 1 says to create json files every second
46  - -o sets the save path for the json files
47
48 You should now have one .json file per interface you have active, in the current directory.
49 All these files are updated once per second.
50
51 ### edit index.html
52 Set in index.html the interfaces you would like to monitor on the web page.
53
54 ### hit index.html from a web browser
55 Enjoy real time monitor web graphs for your interfaces.
56