Workflow Jobs Monitoring - Capturing all jobs data for Custom reporting

I am using the latest “Workflow Jobs Monitoring” admin routine. I have a few questions for the community and hopefully someone out there is trying to do the same thing.

  1. By default it shows the latest 1000 jobs. Would anyone know have I can change this to show the maximum number of jobs available so I do not have to enter the maximum count and reset every time?

  2. The maximum job count made available shows data for the last 30 days. I would able to go back 6 months to a year. How can I make this adjustment?

  3. I am using this workflow to capture JOB information into a PostgreSQL database. I have modified the workflow to load the retrieved data into the database. Would there be a better way to capture all jobs data outside of this workflow as I would like to schedule it to run every 6 hours and capture the latest job data.

Thanks.

  1. Yes, it is possible, but the workflow needs to be adjusted, specifically the Query Jobs Component. You can follow the steps shown in screenshot 1. Once that change is made, the integer widget outside the component is no longer needed, since the workflow will always retrieve the maximum number of jobs available (screenshot 2). Reach out if any step is not clear.
  2. The data app queries the job instrumentation database. To change the behavior, you need to adjust the Job Info Expiration parameter in the KOTS Console settings. I can point you to the relevant section of the documentation.
  3. For your particular case, you may need to build a custom workflow, especially if you increase the Job Info Expiration period to 6 months. For example, if the workflow is scheduled to run every 6 hours, you must ensure that jobs already loaded into PostgreSQL are not reloaded. This can be handled in two ways:
  • Exclude already-loaded job IDs by comparing against the current table in PostgreSQL.
  • Save only jobs within the defined time window, i.e., those with a start time between t (current execution) and t – 6 hours (previous schedule execution).

Screenshot 1

Screenshot 2

3 Likes