Skip to content

[BUG] Metric backmon_backup_file_young_count reports incorrectly #21

@thomashoell

Description

@thomashoell

Given the following definitions file

'./pfsense-backup':
  defaults:
    schedule: 05 04 * * *
    purge: false
  files:
    '%Y%M%D-config.xml':
      alias: pfSense
      retention-count: 14
      retention-age: 14d
'./freeipa-backup/{{date}}':
  fuse:
    - 'date'
  defaults:
    schedule: 30 21 * * *
    purge: false
  files:
    'header':
      retention-count: 14
      retention-age: 14d
    'ipa-full.tar':
      retention-count: 14
      retention-age: 14d

Backmon reports the following metrics:

# HELP backmon_backup_file_young_count The amount of backup files in this group that are younger than the maximum age (file_age_aim_seconds).
# TYPE backmon_backup_file_young_count gauge
backmon_backup_file_young_count{dir="./freeipa-backup/{{date}}",disk="ws3-backup",file="header",group="freeipa-backup/{{date}}"} 0
backmon_backup_file_young_count{dir="./freeipa-backup/{{date}}",disk="ws3-backup",file="ipa-full.tar",group="freeipa-backup/{{date}}"} 0
backmon_backup_file_young_count{dir="./pfsense-backup",disk="ws3-backup",file="pfSense",group="pfsense-backup"} 0

However, since retention-age is set, the metric should report properly (value 0 for each metric is probably wrong).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions