Closed jspaleta closed 2 years ago
@jspaleta can you check my understanding?
A full journey of this would be.
If I've gorked this correctly, I think this needs to be a sensu-go issue rather than a sunsu-plugin-sdk issue because the agent is the component that is unmarshaling the text check output.
No this is not a sensu-go issue. I've rewritten the feature request to be make the check plugin executable use case need clearer.
Okay I think we have this released now in sdk 0.15.0 version. Closing.
Feature Description
Check plugin use case
Prometheus exposition format is desirable across several metric check plugins, it would be useful to have a set of SDK functions that check plugins could make use of for consistent well formed Prometheus exposition output instead of having each plugin roll its own process.
Handler plugin use case
Sensu handlers based on this SDK would also benefit from helper function that know how to take Sensu internal metrics format and convert them into Prometheus exposition in a consistent manner.
Considerations
Straw Implementation
Helper function to populate Sensu Metrics object programmatically
Helper function must be able to store optional TYPE and HELP comments consistent with how Sensu Agent ingests prom exposition metrics.
Check plugin use case
Check plugin executable would use this function to populate a Sensu Metrics structure as part of metrics collection business logic.
Handler plugin use case
Handlers are not expected to need this function
Helper function to output Sensu Metrics in prom exposition format
Helper function must be able to take Sensu Metrics object and export it in prometheus exposition formatted string building TYPE and HELP comment strings from Metrics tag information consistent with how sensu-agent currently ingests prometheus comment strings.
Check plugin use case
Check plugin executable would use this function to export metrics collected into Sensu Metrics object as Prometheus exposition formatted string.
Handler plugin use case
Handler plugin executable would use this function to export Sensu Metrics object as Prometheus exposition formatted string.
Minimum Viable Goal