Skip to content

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

@JackieTien97

Description

@JackieTien97

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions