aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Roques <oroques+fdio@cisco.com>2020-03-05 19:10:21 +0100
committerOlivier Roques <oroques+fdio@cisco.com>2020-03-05 20:18:58 +0100
commit0f7b6da4aeeb6ed9baffb47d72aa176556145501 (patch)
treee82d8c17792de4a4998a6d99bdb7ec00d3885a4a
parent24841120071b95f1a05167898b33091576ba15b8 (diff)
[HICN-541] Add custom type database of collectd plugins
This patch adds the database containing the types that the two collectd plugins, vpp and vpp-hicn, defines. It is useful when using InfluxDB as it requires the type database for multi-value metrics (see https://docs.influxdata.com/influxdb/v1.7/supported_protocols/collectd/). Change-Id: Ia3e630b134e58e942be38cacb9b23379066c6e63 Signed-off-by: Olivier Roques <oroques+fdio@cisco.com>
-rw-r--r--docs/source/telemetry.md13
-rw-r--r--telemetry/vpp-collectd/CMakeLists.txt1
-rw-r--r--telemetry/vpp-collectd/custom_types.db39
3 files changed, 49 insertions, 4 deletions
diff --git a/docs/source/telemetry.md b/docs/source/telemetry.md
index 84800c8..041c032 100644
--- a/docs/source/telemetry.md
+++ b/docs/source/telemetry.md
@@ -61,19 +61,26 @@ 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.
+If you need the custom types that the two plugins define, they are present in
+`telemetry/custom_types.db`. It is useful if you are using InfluxDB as it requires
+the type database for multi-value metrics
+(see [CollectD protocol support in InfluxDB](https://docs.influxdata.com/influxdb/v1.7/supported_protocols/collectd/)).
+
### Example: storing statistics from vpp and vpp-hicn
We'll use the rrdtool and csv plugins to store statistics from vpp and vpp-hicn.
+Copy the configuration below in a file called `collectd.conf` and move
+it to `/etc/collectd`:
-Edit the configuration file as the following:
-
-```html
+```
######################################################################
# Global #
######################################################################
FQDNLookup true
BaseDir "/var/lib/collectd"
Interval 1
+# if you are using custom_types.db, you can specify it
+TypesDB "/usr/share/collectd/types.db" "/etc/collectd/custom_types.db"
######################################################################
# Logging #
diff --git a/telemetry/vpp-collectd/CMakeLists.txt b/telemetry/vpp-collectd/CMakeLists.txt
index 18926b1..89e0085 100644
--- a/telemetry/vpp-collectd/CMakeLists.txt
+++ b/telemetry/vpp-collectd/CMakeLists.txt
@@ -20,7 +20,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Mo
include(BuildMacros)
-
add_subdirectory(vpp)
add_subdirectory(vpp-hicn)
diff --git a/telemetry/vpp-collectd/custom_types.db b/telemetry/vpp-collectd/custom_types.db
new file mode 100644
index 0000000..98cd801
--- /dev/null
+++ b/telemetry/vpp-collectd/custom_types.db
@@ -0,0 +1,39 @@
+# vpp
+if_drops packets:DERIVE:0:U
+if_punt packets:DERIVE:0:U
+if_ip4 packets:DERIVE:0:U
+if_ip6 packets:DERIVE:0:U
+if_rx_no_buf packets:DERIVE:0:U
+if_rx_miss packets:DERIVE:0:U
+if_rx_error packets:DERIVE:0:U
+if_tx_error packets:DERIVE:0:U
+if_mpls packets:DERIVE:0:U
+if_rx packets:DERIVE:0:U, bytes:DERIVE:0:U
+if_rx_unicast packets:DERIVE:0:U, bytes:DERIVE:0:U
+if_rx_multicast packets:DERIVE:0:U, bytes:DERIVE:0:U
+if_rx_broadcast packets:DERIVE:0:U, bytes:DERIVE:0:U
+if_tx packets:DERIVE:0:U, bytes:DERIVE:0:U
+if_tx_unicast packets:DERIVE:0:U, bytes:DERIVE:0:U
+if_tx_multicast packets:DERIVE:0:U, bytes:DERIVE:0:U
+if_tx_broadcast packets:DERIVE:0:U, bytes:DERIVE:0:U
+
+# vpp-hicn
+pkts_processed packets:GAUGE:0:U
+pkts_interest_count packets:GAUGE:0:U
+pkts_data_count packets:GAUGE:0:U
+pkts_from_cache_count packets:GAUGE:0:U
+pkts_no_pit_count packets:GAUGE:0:U
+pit_expired_count interests:GAUGE:0:U
+cs_expired_count data:GAUGE:0:U
+cs_lru_count data:GAUGE:0:U
+pkts_drop_no_buf packets:GAUGE:0:U
+interests_aggregated interests:GAUGE:0:U
+interests_retx interests:GAUGE:0:U
+interests_hash_collision interests:GAUGE:0:U
+pit_entries_count interests:GAUGE:0:U
+cs_entries_count data:GAUGE:0:U
+cs_entries_ntw_count data:GAUGE:0:U
+irx packets:DERIVE:0:U, bytes:DERIVE:0:U
+itx packets:DERIVE:0:U, bytes:DERIVE:0:U
+drx packets:DERIVE:0:U, bytes:DERIVE:0:U
+dtx packets:DERIVE:0:U, bytes:DERIVE:0:U