Skip to content

Conversation

@kellybyrd
Copy link

Provide a JSON output of all templates for all Netflow sources on the configured TemplatePath HTTP endpoint. This will only be active if there is a NetflowPipe and TemplatePath is not null.

The changes to do this work:

  • Implement GetTemplates() for NetFlowTemplateSystem
  • Call the wrapped GetTemplates() for PromTemplateSystem
  • GetTemplatesForAllSources() for NetflowPipe, this does a deep copy of all templates for each source key.

Example output (I restarted my Netflow observer so there are two sources)

{
   "[::ffff:172.16.1.254]:50050": {},
   "[::ffff:172.16.1.254]:50861": {
      "2533274790396160": {
         "template-id": 256,
         "field-count": 20,
         "fields": [...]
      },
      "2533274790396163": {...}
   }
}

Provide a JSON output of all templates for all Netflow sources
on the configured TemplatePath HTTP endpoint. This will only
be active if there is a NetflowPipe and TemplatePath is not null.

The JSON format is: "source string": { <template map> }

The changes to do this work:
* Implement GetTemplates() for NetFlowTemplateSystem

* Call the wrapped GetTemplates() for PromTemplateSystem

* GetTemplatesForAllSources() for NetflowPipe, this does a deep
  copy of all templates for each source key.
@kellybyrd
Copy link
Author

Any feedback on this?

@synfinatic
Copy link

Would like to include this with netflow2ng as being able to view the templates is super useful in debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants