aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/telemetry.md
blob: 0af3b0e026d804618250cf340d7ae6cfa0f70be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Telemetry

Tools to collect telemetry from hICN forwarders.

## Introduction ##

The project containes two plugins for [collectd](https://github.com/collectd/collectd):
* vpp: to collect statistics for VPP
* vpp-hicn: to collect statistics for [hICN](https://github.com/FDio/hicn)


Currently the two plugins provide the followign funtionalities:

* VPP: statistics (rx/tx bytes and packets) for each available interface.
* HICN-VPP: statistics (rx/tx bytes and packets) for each available face.

## Quick Start ##

```
From the code tree root

$ cd telemetry
$ mkdir -p build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
$ make
$ sudo make install
```

## Using hICN collectd plugins ##

### Platforms ###

hICN collectd plugins have been tested in:

- Ubuntu 16.04 LTS (x86_64)
- Ubuntu 18.04 LTS (x86_64)
- Debian Stable/Testing
- Red Hat Enterprise Linux 7
- CentOS 7


### Dependencies ###

Build dependencies:

- VPP 20.01
  - DEB packages (can be found https://packagecloud.io/fdio/release/install):
  - vpp
  - libvppinfra-dev
  - vpp-dev
  - hicn-plugin-dev

## Getting started ##

Collectd needs to be configured in order to use the hICN collectd plugins.
The configuration can be achieved editing the file '/etc/collectd/collectd.conf' and adding the following lines:

```
LoadPlugin vpp
LoadPlugin vpp_hicn
```

Before running collectd, a vpp forwarder must be started. If the vpp-hicn plugin is used, the hicn-plugin must be available in the vpp forwarder

### Example: use rrdtool and csv plugin to store statistics from vpp and vpp-hicn plugins

Edit the configuration file as the following:

```
######################################################################
# Global                                                             #
######################################################################
FQDNLookup true
BaseDir "/collectd"
Interval 2

######################################################################
# Logging                                                            #
######################################################################
LoadPlugin logfile

<Plugin logfile>
  LogLevel "info"
  File "/var/log/collectd.log"
  Timestamp true
  PrintSeverity true
</Plugin>

######################################################################
# Plugins                                                            #
######################################################################
LoadPlugin csv
LoadPlugin rrdtool
LoadPlugin vpp
LoadPlugin vpp_hicn

######################################################################
# Plugin configuration                                               #
######################################################################
<Plugin csv>
  DataDir "/collectd/csv" # the folder under which statistics are written in csv
  StoreRates true
</Plugin>

<Plugin rrdtool>
  DataDir "/collectd/rrd" # the folder under which statistics are written in csv
</Plugin>
```

Run vpp and collectd

```
$ systemctl start vpp
$ systemctl start collectd
```