common: rename augment to hydrate

Funnier word.
This commit is contained in:
Vincent Bernat
2022-03-18 07:50:03 +01:00
parent 7c5a7bdbef
commit ae31596423
5 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# Akvorado: flow collector, augmenter and exporter. # Akvorado: flow collector, hydrater and exporter.
This program receives flows (currently Netflow), augments them with This program receives flows (currently Netflow), hydrates them with
interface names (using SNMP), geo information (using MaxMind), and interface names (using SNMP), geo information (using MaxMind), and
exports them to Kafka. exports them to Kafka.

View File

@@ -59,7 +59,7 @@ var ServeOptions serveOptions
var serveCmd = &cobra.Command{ var serveCmd = &cobra.Command{
Use: "serve", Use: "serve",
Short: "Start akvorado", Short: "Start akvorado",
Long: `Akvorado is a Netflow collector. It augments flows with information from SNMP and GeoIP Long: `Akvorado is a Netflow collector. It hydrates flows with information from SNMP and GeoIP
and exports them to Kafka.`, and exports them to Kafka.`,
Args: cobra.ExactArgs(0), Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

View File

@@ -10,8 +10,8 @@ import (
"akvorado/snmp" "akvorado/snmp"
) )
// AugmentFlow adds more data to a flow. // HydrateFlow adds more data to a flow.
func (c *Component) AugmentFlow(sampler string, flow *flow.FlowMessage) (skip bool) { func (c *Component) HydrateFlow(sampler string, flow *flow.FlowMessage) (skip bool) {
errLimiter := rate.NewLimiter(rate.Every(time.Minute), 10) errLimiter := rate.NewLimiter(rate.Every(time.Minute), 10)
if flow.InIf != 0 { if flow.InIf != 0 {
samplerName, iface, err := c.d.Snmp.Lookup(sampler, uint(flow.InIf)) samplerName, iface, err := c.d.Snmp.Lookup(sampler, uint(flow.InIf))

View File

@@ -98,7 +98,8 @@ func (c *Component) runWorker(workerID int) error {
sampler := net.IP(flow.SamplerAddress).String() sampler := net.IP(flow.SamplerAddress).String()
c.metrics.flowsReceived.WithLabelValues(sampler).Inc() c.metrics.flowsReceived.WithLabelValues(sampler).Inc()
if skip := c.AugmentFlow(sampler, flow); skip { // Hydratation
if skip := c.HydrateFlow(sampler, flow); skip {
continue continue
} }

View File

@@ -8,7 +8,7 @@ hide:
![](assets/akvorado.svg){ .akvorado-logo } ![](assets/akvorado.svg){ .akvorado-logo }
*Akvorado* is a flow collector, augmenter and exporter. It receives *Akvorado* is a flow collector, hydrater and exporter. It receives
flows, adds some data like interface names and geo information, and flows, adds some data like interface names and geo information, and
exports them to Kafka. [Akvorado][] means "water wheel" in Esperanto. exports them to Kafka. [Akvorado][] means "water wheel" in Esperanto.