Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatched interval in description and generated sql for cpu-max-all-X series #215

Open
JackieTien97 opened this issue Nov 23, 2022 · 0 comments

Comments

@JackieTien97
Copy link

JackieTien97 commented Nov 23, 2022

In the descriptions of README for cpu-max-all-X series, it says that aggregate across all CPU metrics per hour over 1 hour for a single host/eight hosts.
However, in the generated sql for InfluxDB and TimescaleDB(I just checked these two, don't whether others are mismatched), it's per hour over 8 hours instead of per hour over 1 hour

Sql generated for cpu-max-all-1

InfluxDB

SELECT max(usage_user),max(usage_system),max(usage_idle),max(usage_nice),max(usage_iowait),max(usage_irq),max(usage_softirq),max(usage_steal),max(usage_guest),max(usage_guest_nice) from cpu where (hostname = 'host_249' or hostname = 'host_1403' or hostname = 'host_1435' or hostname = 'host_3539' or hostname = 'host_3639' or hostname = 'host_3075' or hostname = 'host_815' or hostname = 'host_2121') and **time >= '2016-01-01T11:48:31Z' and time < '2016-01-01T19:48:31Z'** group by time(1h)

TimescaleDB

SELECT time_bucket('3600 seconds', time) AS hour,
        max(usage_user) as max_usage_user, max(usage_system) as max_usage_system, max(usage_idle) as max_usage_idle, max(usage_nice) as max_usage_nice, max(usage_iowait) as max_usage_iowait, max(usage_irq) as max_usage_irq, max(usage_softirq) as max_usage_softirq, max(usage_steal) as max_usage_steal, max(usage_guest) as max_usage_guest, max(usage_guest_nice) as max_usage_guest_nice
        FROM cpu
        WHERE tags_id IN (SELECT id FROM tags WHERE hostname IN ('host_249','host_1403','host_1435','host_3539','host_3639','host_3075','host_815','host_2121')) AND **time >= '2016-01-01 11:48:31.646325 +0000' AND time < '2016-01-01 19:48:31.646325 +0000'**
        GROUP BY hour ORDER BY hour
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

No branches or pull requests

1 participant