Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 5d9ef2e

Browse files
authored
Merge pull request #11 from tarantool/fix_prometheus_true_false_parsing
fix prometheus true/false parsing
2 parents 55eb876 + 939a532 commit 5d9ef2e

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

rockspecs/prometheus-1.1.0.rockspec

Lines changed: 0 additions & 22 deletions
This file was deleted.

tarantool-metrics.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ local function measure_tarantool_replication_lag()
9191

9292
if idle ~= 0 then
9393
local replication_timeout = box.cfg.replication_timeout
94-
replication_state_normal:set(idle <= replication_timeout)
94+
if idle <= replication_timeout then
95+
replication_state_normal:set(1)
96+
else
97+
replication_state_normal:set(0)
98+
end
9599
end
96100
end
97101

0 commit comments

Comments
 (0)