diff options
-rw-r--r-- | docs/source/telemetry.md | 19 | ||||
-rw-r--r-- | telemetry/vpp-collectd/CMakeLists.txt | 1 | ||||
-rw-r--r-- | telemetry/vpp-collectd/custom_types.db | 39 | ||||
-rw-r--r-- | telemetry/vpp-collectd/vpp-hicn/CMakeLists.txt | 2 | ||||
-rw-r--r-- | telemetry/vpp-collectd/vpp/CMakeLists.txt | 2 |
5 files changed, 54 insertions, 9 deletions
diff --git a/docs/source/telemetry.md b/docs/source/telemetry.md index 5cc751525..041c032b4 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 "/collectd" +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 # @@ -99,12 +106,12 @@ LoadPlugin vpp_hicn # Plugin configuration # ###################################################################### <Plugin csv> - DataDir "/collectd/csv" # the folder under which statistics are written in csv + DataDir "/var/lib/collectd/csv" # the folder where statistics are stored in csv StoreRates true </Plugin> <Plugin rrdtool> - DataDir "/collectd/rrd" # the folder under which statistics are written in rrd + DataDir "/var/lib/collectd/rrd" # the folder where statistics are stored in rrd </Plugin> ``` diff --git a/telemetry/vpp-collectd/CMakeLists.txt b/telemetry/vpp-collectd/CMakeLists.txt index 18926b1c5..89e0085d0 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 000000000..98cd801f4 --- /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 diff --git a/telemetry/vpp-collectd/vpp-hicn/CMakeLists.txt b/telemetry/vpp-collectd/vpp-hicn/CMakeLists.txt index ab048b730..fc39b9385 100644 --- a/telemetry/vpp-collectd/vpp-hicn/CMakeLists.txt +++ b/telemetry/vpp-collectd/vpp-hicn/CMakeLists.txt @@ -48,7 +48,7 @@ build_library(vpp_hicn SOURCES ${SOURCE_FILES} LINK_LIBRARIES ${LIBRARIES} INCLUDE_DIRS ${INCLUDE_DIRS} - INSTALL_FULL_PATH_DIR ${CMAKE_INSTALL_PREFIX}/collectd + INSTALL_FULL_PATH_DIR ${CMAKE_INSTALL_PREFIX}/lib/collectd COMPONENT "${COLLECTD_PLUGINS}" DEPENDS ${DEPENDENCIES} EMPTY_PREFIX true diff --git a/telemetry/vpp-collectd/vpp/CMakeLists.txt b/telemetry/vpp-collectd/vpp/CMakeLists.txt index 71fb7fc3d..36248b17a 100644 --- a/telemetry/vpp-collectd/vpp/CMakeLists.txt +++ b/telemetry/vpp-collectd/vpp/CMakeLists.txt @@ -36,7 +36,7 @@ build_library(vpp SOURCES ${SOURCE_FILES} LINK_LIBRARIES ${LIBRARIES} INCLUDE_DIRS ${INCLUDE_DIRS} - INSTALL_FULL_PATH_DIR ${CMAKE_INSTALL_PREFIX}/collectd + INSTALL_FULL_PATH_DIR ${CMAKE_INSTALL_PREFIX}/lib/collectd COMPONENT ${COLLECTD_PLUGINS} EMPTY_PREFIX true ) |