Open smalenfant opened 1 year ago
I'm not sure I understand what you intend to do. If you want to group messages that don't have a lane tag (but have a source and interface name) just don't include the lane in the tag list. It should produce a list of messages each with a unique combination of (source, interface_name) with their values merged.
I'm trying to get full output from the router although it's down this morning. This issue is really about having "condition" around processors so they don't get executed. I provided an example only, but I would need to get this applied to different device type (for example, we have Juniper, Cisco, Nokia and Arista devices). Response varies depending on vendor. Now, we usually have this in different instance of gnmi, but if we would use gnmic with nats/kafka for example, they could be mixed together.
The reason some processors don't have a condition attribute is because their execution can be controlled using other attributes (like value-names
, tag-names`, etc...) with regexes.
I see that adding a condition to all processors gives a uniform way to control execution accros processors, will look into it.
I still want to understand what you are trying to achieve, there might be an easier way to get it done. I'm ok with discussing via chat or on a call if you don't want to put it out here.
It would be really useful to have the conditions available to all formatters. We receive multiple sensors and I don't want to apply formatters to all events.
One example here is group-by.
This works fine for all events that contains a lane number.
But I couldn't group-by when the lane number was not present. If I would, it would merge all of those documents together. merge didn't work correctly because it uses the timestamp only, and not the tags to merge documents together. That created a single JSON document with information only from the last lane. Different issue.