You can configure metrics-utility
to run at specified times and intervals. Run frequency is expressed in cronjobs. See How to schedule jobs using the Linux ‘Cron’ utility for more information.
-
From the command line, run:
crontab -e
-
After the code editor has opened, update the
gather
andbuild
parameters using cron syntax as shown below:*/2 * * * * metrics-utility gather_automation_controller_billing_data --ship --until=10m */5 * * * * metrics-utility build_report
-
Save and close the file.
-
From the navigation panel, select menu:Workloads[Deployments].
-
On the next screen, select automation-controller-operator-controller-manager.
-
Beneath the heading Deployment Details, click the down arrow button to change the number of pods to zero. This will pause the deployment so you can update the running schedule.
-
From the navigation panel, select Installed Operators. From the list of installed operators, select {PlatformNameShort}.
-
On the next screen, select the {ControllerName} tab.
-
From the list that appears, select your {ControllerName} instance.
-
On the next screen, select the
YAML
tab. -
In the
YAML
file, find the following parameters and enter a variable representing how oftenmetrics-utility
should gather data and how often it should produce a report:metrics_utility_cronjob_gather_schedule: metrics_utility_cronjob_report_schedule:
-
Click btn:[Save].
-
From the navigation menu, select menu:Deployments[] and then select automation-controller-operator-controller-manager.
-
Increase the number of pods to 1.
-
To verify that you have changed the
metrics-utility
running schedule successfully, you can take one or both of the following steps:-
return to the
YAML
file and ensure that the parameters described above reflect the correct variables. -
From the navigation menu, select menu:Workloads[Cronjobs] and ensure that your cronjobs show the updated schedule.
-