]> arthur.barton.de Git - netdata.git/blob - README.md
automatic installation
[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 ![image](https://f.cloud.github.com/assets/2662304/664777/3dad6c32-d78d-11e2-9ecf-b921afebfb0b.png)
9
10 # How it works
11
12 1. You run a daemon on your linux: netdata.
13 This deamon is written in C and is extremely lightweight.
14 What it does is that it reads /proc/net/dev and for every interface present there, it creates a JSON data file.
15 This JSON file contains all the data needed for the web graphs.
16 Since these files are created too often (e.g. once per second) it is adviced to put them on tmpfs.
17 The files have a fixed length, around just 3k for 60 seconds of graphs.
18
19 2. On your web page, you add a few javascript lines and a DIV for every graph you need.
20 Your browser will hit the web server to fetch the JSON data and refresh the graphs.
21
22 3. Graphs are generated using Google Charts API.
23
24
25
26 # Installation
27
28 ## Automatic installation
29
30 1. Download everything in a directory inside your web server.
31 2. cd to that directory
32 3. run:
33
34 ```sh
35 ./netdata.start
36 ```
37
38 For this to work, you need to have persmission to create a directory in /run.
39 If you run into problems, try to become root to verify it works.
40
41 ---
42
43 ## Installation by hand
44
45 ### download everything in a directory inside your web docs.
46 You don't need apache. Any web server able to provide static files will do the job fine.
47
48 ### Compile netdata
49 step into the directory you downloaded everything and compile netdata
50
51 ```sh
52 gcc -O3 -o netdata netdata.c
53 ```
54
55 ### run netdata
56 Run netdata and instruct it to create json files in the current directory.
57
58 ```sh
59 ./netdata -d -l 60 -u 1 -o "`pwd`"
60 ```
61  - -d says to go daemon mode
62  - -l 60 says to show 60 seconds of history
63  - -u 1 says to create json files every second
64  - -o sets the save path for the json files
65
66 You should now have one .json file per interface you have active, in the current directory.
67 All these files are updated once per second.
68
69 ### edit index.html
70 Set in index.html the interfaces you would like to monitor on the web page.
71
72 ** REMEMBER: there are 2 sections in index.html to edit. A javascript section and an HTML section. **
73
74
75 ### hit index.html from a web browser
76 Enjoy real time monitor web graphs for your interfaces.
77