diff --git a/pkg/pipeline/write/write_ipfix.go b/pkg/pipeline/write/write_ipfix.go index 724eda370..32fd3a395 100644 --- a/pkg/pipeline/write/write_ipfix.go +++ b/pkg/pipeline/write/write_ipfix.go @@ -85,6 +85,10 @@ func addKubeContextToTemplate(elements *[]entities.InfoElementWithValue, registr if err != nil { return err } + err = addElementToTemplate("timeFlowRttNs", nil, elements, registryID) + if err != nil { + return err + } return nil } @@ -124,6 +128,11 @@ func loadCustomRegistry(EnterpriseID uint32) error { ilog.WithError(err).Errorf("Failed to register element") return err } + err = registry.PutInfoElement((*entities.NewInfoElement("timeFlowRttNs", 7740, 13, EnterpriseID, 65535)), EnterpriseID) + if err != nil { + ilog.WithError(err).Errorf("Failed to register element") + return err + } return nil } @@ -445,7 +454,13 @@ func setKubeIEValue(record config.GenericMap, ieValPtr *entities.InfoElementWith } else { ieVal.SetStringValue("none") } - } + case "timeFlowRttNs": + if record["TimeFlowRttNs"] != nil { + ieVal.SetUnsigned64Value(record["TimeFlowRttNs"].(uint64)) + } else { + // nothing here for now + } + } } func setEntities(record config.GenericMap, enrichEnterpriseID uint32, elements *[]entities.InfoElementWithValue) error { for _, ieVal := range *elements {