Skip to content

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Sep 2, 2025

The idea is to reduce the amount of hosts we collect from all the hosts, ever, to only hosts active during the collection period.

draft: fix typing issues re timezone vs timezoneless sql datetimes

& But we still need inactive host data, just not necessarily daily.
So, TODO: parametrize enabling this,
so people can run daily with since/until enabled, and then separate weekly cronjob for just all-hosts snaphot

& update generator to allow both snapshots and dailies for main_host

the idea is to reduce the amount of hosts we collect from all the hosts ever to hosts active during the collection period,
but also to allow collecting inactive hosts too

so, the main_host optional collector remains as-is, using limit_slicing,
but there's a new optional main_host_daily collector, which uses daily_slicing

That way, you can run a daily cronjob with:

METRICS_UTILITY_OPTIONAL_COLLECTORS=main_host_daily

and a weekly cronjob with:

METRICS_UTILITY_OPTIONAL_COLLECTORS=main_host
METRICS_UTILITY_DISABLE_JOB_HOST_SUMMARY_COLLECTOR=true

Fix undefined table handling in main_indirectmanagednodeaudit collector

@himdel himdel added post-freeze Should probably wait for after 2.6 dev freeze and removed post-freeze Should probably wait for after 2.6 dev freeze labels Sep 2, 2025
@himdel himdel force-pushed the main_host_since_until branch from ed23771 to 08e252f Compare September 4, 2025 00:18
…d OR modified OR last_automation)

the idea is to reduce the amount of hosts we collect from all the hosts ever to hosts active during the collection period,
but also to allow collecting inactive hosts too

so, the `main_host` optional collector remains as-is, using `limit_slicing`,
but there's a new optional `main_host_daily` collector, which uses `daily_slicing`

That way, you can run a daily cronjob with:

```
METRICS_UTILITY_OPTIONAL_COLLECTORS=main_host_daily
```

and a weekly cronjob with:

```
METRICS_UTILITY_OPTIONAL_COLLECTORS=main_host
METRICS_UTILITY_DISABLE_JOB_HOST_SUMMARY_COLLECTOR=true
```
@himdel himdel force-pushed the main_host_since_until branch from 08e252f to b76efee Compare September 4, 2025 00:53
Copy link

sonarqubecloud bot commented Sep 4, 2025

OR
(main_host.modified >= '{since.isoformat()}' AND main_host.modified < '{until.isoformat()}')
OR
(main_unifiedjob.created >= '{since.isoformat()}' AND main_unifiedjob.created < '{until.isoformat()}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add another OR with main_unifiedjob.finished so we got also all hosts that were used in jobs? Because we are collecting jobs data at the finish of the job, not at the job created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants