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