Skip to content

Fixed TypeError in "ch-monitoring backup" command#62

Merged
Alex-Burmak merged 1 commit intomainfrom
backup_fix
Sep 5, 2023
Merged

Fixed TypeError in "ch-monitoring backup" command#62
Alex-Burmak merged 1 commit intomainfrom
backup_fix

Conversation

@Alex-Burmak
Copy link
Member

2023-09-05 17:35:36,155 518168 [ERROR] backup: Got error TypeError("'>=' not supported between instances of 'datetime.timedelta' and 'str'",)
Traceback (most recent call last):
  File "/opt/yandex/clickhouse-tools/lib/python3.6/site-packages/ch_tools/monrun_checks/main.py", line 77, in callback_wrapper
    result = ctx.invoke(cmd_callback, *args, **kwargs)
  File "/opt/yandex/clickhouse-tools/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/opt/yandex/clickhouse-tools/lib/python3.6/site-packages/ch_tools/monrun_checks/ch_backup.py", line 53, in backup_command
    check_backup_age(ch_client, backups, crit=crit_absent)
  File "/opt/yandex/clickhouse-tools/lib/python3.6/site-packages/ch_tools/monrun_checks/ch_backup.py", line 123, in check_backup_age
    if crit is not None and uptime >= crit and backup_age >= crit:
TypeError: '>=' not supported between instances of 'datetime.timedelta' and 'str'

@Alex-Burmak Alex-Burmak requested review from myrrc and yahor-s September 5, 2023 15:53
@Alex-Burmak Alex-Burmak merged commit f48b6dc into main Sep 5, 2023
@Alex-Burmak Alex-Burmak deleted the backup_fix branch September 5, 2023 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants