Hello, everyone.
I’m newbie on influx db.
I try to monitoring my gitlab instance using influxdb and I need help
First, I use influxdb 1.2.4 version on docker container.
I have some problem on continuous query.
My cq exmaple is
CREATE CONTINUOUS QUERY rails_allocated_memory_per_action ON gitlab
BEGIN
SELECT percentile(allocated_memory, 95) AS allocated_memory_95th,
percentile(allocated_memory, 99) AS allocated_memory_99th,
mean(allocated_memory) AS allocated_memory_mean,
max(allocated_memory) AS allocated_memory_max
INTO downsampled.rails_allocated_memory_per_action
FROM one_hour.rails_transactions
WHERE action =~ /.+/
AND action !~ /^Grape#/
GROUP BY time(1m), action
END
From log I found this.
[I] 2017-06-21T06:17:00Z executing continuous query rails_allocated_memory_per_action (2017-06-21 06:16:00 +0000 UTC to 2017-06-21 06:17:00 +0000 UTC) service=continuous_querier
[I] 2017-06-21T06:17:00Z SELECT percentile(allocated_memory, 95) AS allocated_memory_95th, percentile(allocated_memory, 99) AS allocated_memory_99th, mean(allocated_memory) AS allocated_memory_mean, max(allocated_memory) AS allocated_mem
ory_max INTO gitlab.downsampled.rails_allocated_memory_per_action FROM gitlab.one_hour.rails_transactions WHERE action =~ /.+/ AND action !~ /^Grape#/ AND time >= '2017-06-21T06:16:00Z' AND time < '2017-06-21T06:17:00Z' GROUP BY time(1m)
, action service=query
[I] 2017-06-21T06:17:00Z finished continuous query rails_allocated_memory_per_action (2017-06-21 06:16:00 +0000 UTC to 2017-06-21 06:17:00 +0000 UTC) in 5.363964ms service=continuous_querier
I guess CQ executed well however when I execute SHOW MEASUREMENTS
, there isn’t rails_allocated_memory_per_action
.
If I execute below query
SELECT percentile(allocated_memory, 95) AS allocated_memory_95th, percentile(allocated_memory, 99) AS allocated_memory_99th, mean(allocated_memory) AS allocated_memory_mean, max(allocated_memory) AS allocated_memory_max
FROM gitlab.one_hour.rails_transactions
WHERE action =~ /.+/ AND action !~ /^Grape#/ AND time >= '2017-06-21T06:16:00Z' AND time < '2017-06-21T06:17:00Z'
GROUP BY time(1m), action
it has data something like this
...
time allocated_memory_95th allocated_memory_99th allocated_memory_mean allocated_memory_max
---- --------------------- --------------------- --------------------- --------------------
1498025760000000000 4.759552e+06 5.607424e+06 1.3684254117647058e+06 5.607424e+06
name: rails_transactions
tags: action=Projects::GitHttpController#info_refs.txt
time allocated_memory_95th allocated_memory_99th allocated_memory_mean allocated_memory_max
---- --------------------- --------------------- --------------------- --------------------
1498025760000000000 718131.2 3.514368e+06
...
And if I execute INTO query
manually,
SELECT percentile(allocated_memory, 95) AS allocated_memory_95th, percentile(allocated_memory, 99) AS allocated_memory_99th, mean(allocated_memory) AS allocated_memory_mean, max(allocated_memory) AS allocated_memory_max
INTO gitlab.downsampled.rails_allocated_memory_per_action
FROM gitlab.one_hour.rails_transactions
WHERE action =~ /.+/ AND action !~ /^Grape#/ AND time >= '2017-06-21T06:16:00Z' AND time < '2017-06-21T06:17:00Z'
GROUP BY time(1m), action
rails_allocated_memory_per_action
MEASUREMENTS is created however no more data stored.
I think the CQs doesn’t work well so they can’t store data to MEASUREMENTS.
If anyone has hints why this happen, I’d really appreciate it!