moira
moira copied to clipboard
perSecond function doesn't calculate any value
BUG REPORT
What version of Moira are you using ([binary] --version)?
amd64--2.5.1.0-1
$ api --version
2.5.1.0-1
$ checker --version
2.5.1.0-1
$ cli --version
2.5.1.0-1
$ filter --version
2.5.1.0-1
$ notifier --version
2.5.1.0-1
Configuration
api.yaml
redis:
host: localhost
port: "6379"
dbid: 0
graphite:
enabled: false
runtime_stats: false
uri: "localhost:2003"
prefix: DevOps.Moira
interval: 60s
remote:
enabled: false
timeout: 60s
api:
listen: ":8081"
enable_cors: false
web:
contacts:
- type: mail
label: E-mail
- type: pushover
label: Pushover
- type: slack
label: Slack
- type: telegram
label: Telegram
help: required to grant @MoiraBot admin privileges
- type: twilio sms
label: Twilio SMS
- type: twilio voice
label: Twilio voice
log:
log_file: stdout
log_level: info
checker.yaml
redis:
host: localhost
port: "6379"
dbid: 0
graphite:
enabled: false
runtime_stats: false
uri: "localhost:2003"
prefix: DevOps.Moira
interval: 60s
remote:
enabled: false
check_interval: 60s
timeout: 60s
checker:
nodata_check_interval: 60s
check_interval: 10s
metrics_ttl: 3h
stop_checking_interval: 30s
log:
log_file: stdout
log_level: info
cli.yaml
redis:
host: localhost
port: "6379"
dbid: 0
log_file: stdout
log_level: info
filter.yaml
redis:
host: localhost
port: "6379"
dbid: 0
graphite:
enabled: false
runtime_stats: false
uri: "localhost:2003"
prefix: DevOps.Moira
interval: 60s
filter:
listen: ":3003"
retention_config: /etc/moira/storage-schemas.conf
cache_capacity: 10
max_parallel_matches: 0
log:
log_file: stdout
log_level: info
notifier.yaml
redis:
host: localhost
port: "6379"
dbid: 0
graphite:
enabled: false
runtime_stats: false
uri: "localhost:2003"
prefix: DevOps.Moira
interval: 60s
remote:
enabled: false
timeout: 60s
notifier:
sender_timeout: 10s
resending_timeout: "1:00"
senders:
- type: slack
api_token: XXXXXX
use_emoji: true
moira_selfstate:
enabled: true
remote_triggers_enabled: false
redis_disconect_delay: 60s
last_metric_received_delay: 120s
last_check_delay: 120s
last_remote_check_delay: 300s
notice_interval: 600s
contacts:
- type: slack
value: XXXXXX
front_uri: https://XXXXXX
timezone: Europe/Brussels
date_time_format: "15:04 02.01.2006"
log:
log_file: stdout
log_level: info
What did you expect to see?
perSecond() metric calculated.
What did you see instead?

127.0.0.1:6379> zrange moira-metric-data:servers.beip.test.skinotix.beip.opensips.tm_5xx_transactions 0 -1
1) "1591265232 0"
2) "1591265532 0"
3) "1591265832 0"
4) "1591266132 0"
5) "1591266432 0"
6) "1591266732 0"
7) "1591267032 0"
8) "1591267332 0"
9) "1591267632 0"
10) "1591267932 0"
11) "1591268232 0"
12) "1591268532 0"
13) "1591268832 0"
14) "1591269132 0"
15) "1591269432 0"
16) "1591269732 0"
17) "1591270032 0"
18) "1591270332 0"
19) "1591270632 0"
20) "1591270932 0"
21) "1591271232 0"
22) "1591271532 0"
23) "1591271832 0"
24) "1591272132 0"
25) "1591272432 0"
26) "1591272732 0"
27) "1591273032 0"
28) "1591273332 0"
29) "1591273632 0"
30) "1591273932 0"
31) "1591274232 0"
32) "1591274532 0"
33) "1591274832 0"
34) "1591275132 0"
35) "1591275432 0"
36) "1591275732 0"
This is the one of examples. Other having non-0 values give the same result. But they do have correct values in Redis:
127.0.0.1:6379> zrange moira-metric-data:servers.XXXXXX.prod.XXXXXX.beip.opensips.tm_5xx_transactions 0 -1
1) "1591265421 14"
2) "1591265721 16"
3) "1591266021 16"
4) "1591266320 20"
5) "1591266621 24"
6) "1591266920 24"
7) "1591267220 24"
8) "1591267520 29"
9) "1591267820 29"
10) "1591268120 29"
11) "1591268420 30"
12) "1591268721 32"
13) "1591269020 34"
14) "1591269320 37"
15) "1591269620 37"
16) "1591269920 37"
17) "1591270220 41"
18) "1591270520 42"
19) "1591270820 42"
20) "1591271121 44"
21) "1591271421 51"
22) "1591271720 53"
23) "1591272020 57"
24) "1591272320 123"
25) "1591272621 295"
26) "1591272921 337"
27) "1591273220 380"
28) "1591273521 413"
29) "1591273821 436"
30) "1591274121 444"
31) "1591274421 464"
32) "1591274721 466"
33) "1591275021 485"
34) "1591275321 487"
35) "1591275621 513"
36) "1591275921 519"