-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC, event processors using go-plugin #307
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This is great, thanks for giving it a go.
That's the way
This will be required yes, I can look into it.
I'm not sure that's possible, but what can be sent is the logger level (info, debug, etc...) and let the plugin decide where/how to log |
@fredsod can you allow edits on this PR for maintainers so I can fix the conflicts ? Thanks |
0347142
to
e1130bc
Compare
Edits are allowed, you should be able to add commits to this PR |
It looks like you resolved the conflicts, thanks. |
Have you had time to look into how to add support for configuration to the plugin_.manager? |
@fredsod: Yes, check #341 |
Hi,
I needed a way to dynamically add tags to Prometheus metrics and here is a POC using hashicorp go-plugin to build event processor plugins. In my case I would like to add metadata from our inventory to the metrics, but there could be many other use cases.
gNMIc loads plugins from './plugins/' and the name of the binary is also the plugin name, it then communicates with the plugin over RPC. Each plugin needs to implement the EventProcessor interface, due to the RPC the logging setup is a bit different in the plugin.
How to test the POC: Compile the examples/plugin/main.go to ./plugins/event-add-device_function and add 'event-add-device_function' as a processor for an output.
This is my first Golang project and I'm not a developer, but maybe we can get this up to shape and give gNMIc support for plugins together.
A couple of outstanding questions: