operator-framework / ansible-operator-plugins

Experimental extraction/refactoring of the Operator SDK's ansible operator plugin
Apache License 2.0
9 stars 20 forks source link

Add the ability to create custom metrics in an Ansible Operator #25

Closed nicknezis closed 6 months ago

nicknezis commented 3 years ago

Feature Request

Describe the problem you need a feature to resolve.

When running an Ansible Operator, there is no easy way to provide metrics based on the operation of the operator. Operator SDK provides various metrics, but there is no ability to create custom metrics.

Describe the solution you'd like.

I would like to have an Ansible module/task that provides some syntactic sugar for the creation and updating of custom metrics.

There were a couple of implementation approaches proposed by @fabianvf . I'm quoting him below to capture the ideas.

From a discussion I had with @joelanford and @fabianvf in Slack.

a generic metrics server that allows posting of metrics could be pretty useful, and integration from Ansible definitely wouldn't be hard. For the Ansible-based Operators we can also pass information back to the Golang process as it is watching the Ansible event stream, so we could also do something like create a dummy metrics module that doesn't do anything but accept/validate metrics information, and intercept the event from the Golang binary to handle the updates. The generic server seems cleaner and more useful though, just mentioning that as another possibility

< /language ansible >

estroz commented 3 years ago

/kind feature /language ansible

jobcespedes commented 3 years ago

Are alerts possible too, when using Ansible?

openshift-bot commented 3 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot commented 3 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

estroz commented 3 years ago

/lifecycle frozen

piec commented 6 months ago

This was done in:

To be used with operator_sdk.util.osdk_metric

I think this issue can be closed