Open dennispost opened 2 years ago
Hi @dennispost , what do you mean by user/usergroup? Can you give me an example?
Hey @NorseGaud , my idea was to calculate the sum of every minute where a user has an anka_instance in running_state. So that we can report the sum of all running minutes per month.
I know that this does work in Enterprise Plus license tier only.
Do you mean the users of a certificate using certificate authentication? What sort of authentication method are you using?
As user I mean the user who has started the instance (e.g. with his acces token via a gitlab-runner). We've not configured authentication in our setup yet.
Got it -- thanks for the clarification.
In order to achieve this, the gitlab runner executor we created needs to post metadata
with all of the available/relevant information that you want available in the exporter. This is because the exporter is a consumer of the API JSON from the Controller. If you start an instance with specific metadata (see API docs), it will be available on the instance object.
While we could modify both the runner executor to do this and then set up the exporter to consume it, this creates a situation where a feature of the exporter will only work if you're using the gitlab runner. I'm not sure if our dev team wants to accomplish it this way. I'll have a conversation with them about it and see what they recommend.
Thanks for reaching out to your dev team.
The runner authenticates with credentials of a specific user or group. So these information are not stored currently? If these would be stored, they could be available to the exporter. This is also not specific for gitlab, but maybe a general feature which should be added.
The runner and Controller are only able to communicate over the Controller's API (when it goes to request or terminate a VM). It only receives and sees what we pass into the API by the runner anka
executor code.
Hey,
we need to get the run duration of each instance per user/usergroup. So that we can report the sum of total duration in minutes per user / month.
Can you report such a metric? E.g.
anka_instance_state_per_user
oranka_instance_state_per_usergroup
Thanks