2019-10-21 15:52:14 -07:00
|
|
|
from flexmock import flexmock
|
|
|
|
|
|
|
|
from borgmatic.hooks import healthchecks as module
|
|
|
|
|
|
|
|
|
2022-06-09 11:05:44 -07:00
|
|
|
def mock_logger():
|
|
|
|
logger = flexmock()
|
|
|
|
logger.should_receive('addHandler')
|
|
|
|
logger.should_receive('removeHandler')
|
|
|
|
flexmock(module.logging).should_receive('getLogger').and_return(logger)
|
|
|
|
|
|
|
|
|
2022-05-24 12:23:38 -07:00
|
|
|
def test_initialize_monitor_creates_log_handler_with_ping_body_limit():
|
|
|
|
ping_body_limit = 100
|
|
|
|
monitoring_log_level = 1
|
|
|
|
|
2022-06-09 11:05:44 -07:00
|
|
|
mock_logger()
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').with_args(
|
|
|
|
module.HANDLER_IDENTIFIER,
|
|
|
|
ping_body_limit - len(module.borgmatic.hooks.logs.PAYLOAD_TRUNCATION_INDICATOR),
|
|
|
|
monitoring_log_level,
|
2022-05-24 12:23:38 -07:00
|
|
|
).once()
|
|
|
|
|
|
|
|
module.initialize_monitor(
|
2023-07-09 17:40:02 -07:00
|
|
|
{'ping_body_limit': ping_body_limit}, {}, 'test.yaml', monitoring_log_level, dry_run=False
|
2022-05-24 12:23:38 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def test_initialize_monitor_creates_log_handler_with_default_ping_body_limit():
|
|
|
|
monitoring_log_level = 1
|
|
|
|
|
2022-06-09 11:05:44 -07:00
|
|
|
mock_logger()
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').with_args(
|
|
|
|
module.HANDLER_IDENTIFIER,
|
|
|
|
module.DEFAULT_PING_BODY_LIMIT_BYTES
|
|
|
|
- len(module.borgmatic.hooks.logs.PAYLOAD_TRUNCATION_INDICATOR),
|
2022-05-24 12:23:38 -07:00
|
|
|
monitoring_log_level,
|
|
|
|
).once()
|
|
|
|
|
2023-07-09 17:40:02 -07:00
|
|
|
module.initialize_monitor({}, {}, 'test.yaml', monitoring_log_level, dry_run=False)
|
2022-05-24 12:23:38 -07:00
|
|
|
|
|
|
|
|
|
|
|
def test_initialize_monitor_creates_log_handler_with_zero_ping_body_limit():
|
|
|
|
ping_body_limit = 0
|
|
|
|
monitoring_log_level = 1
|
|
|
|
|
2022-06-09 11:05:44 -07:00
|
|
|
mock_logger()
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').with_args(
|
|
|
|
module.HANDLER_IDENTIFIER, ping_body_limit, monitoring_log_level
|
2022-05-24 12:23:38 -07:00
|
|
|
).once()
|
|
|
|
|
|
|
|
module.initialize_monitor(
|
2023-07-09 17:40:02 -07:00
|
|
|
{'ping_body_limit': ping_body_limit}, {}, 'test.yaml', monitoring_log_level, dry_run=False
|
2022-05-24 12:23:38 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-24 14:44:33 -07:00
|
|
|
def test_initialize_monitor_creates_log_handler_when_send_logs_true():
|
2022-06-09 11:05:44 -07:00
|
|
|
mock_logger()
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').once()
|
2022-05-24 14:44:33 -07:00
|
|
|
|
|
|
|
module.initialize_monitor(
|
2023-07-09 17:40:02 -07:00
|
|
|
{'send_logs': True}, {}, 'test.yaml', monitoring_log_level=1, dry_run=False
|
2022-05-24 14:44:33 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def test_initialize_monitor_bails_when_send_logs_false():
|
2022-06-09 11:05:44 -07:00
|
|
|
mock_logger()
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
2022-05-24 14:44:33 -07:00
|
|
|
|
|
|
|
module.initialize_monitor(
|
2023-07-09 17:40:02 -07:00
|
|
|
{'send_logs': False}, {}, 'test.yaml', monitoring_log_level=1, dry_run=False
|
2022-05-24 14:44:33 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2019-11-12 15:31:07 -08:00
|
|
|
def test_ping_monitor_hits_ping_url_for_start_state():
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com'}
|
2019-11-17 16:54:27 -08:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
2022-07-23 22:07:06 +02:00
|
|
|
'https://example.com/start', data=''.encode('utf-8'), verify=True
|
2022-06-29 21:19:40 -07:00
|
|
|
).and_return(flexmock(ok=True))
|
2019-11-12 15:31:07 -08:00
|
|
|
|
2020-01-22 15:10:47 -08:00
|
|
|
module.ping_monitor(
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2020-01-22 15:10:47 -08:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
2019-11-12 15:31:07 -08:00
|
|
|
|
|
|
|
|
|
|
|
def test_ping_monitor_hits_ping_url_for_finish_state():
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com'}
|
2019-11-30 14:51:32 -08:00
|
|
|
payload = 'data'
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('get_handler')
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive(
|
|
|
|
'format_buffered_logs_for_payload'
|
|
|
|
).and_return(payload)
|
2019-11-30 14:51:32 -08:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
2022-07-23 22:07:06 +02:00
|
|
|
'https://example.com', data=payload.encode('utf-8'), verify=True
|
2022-06-29 21:19:40 -07:00
|
|
|
).and_return(flexmock(ok=True))
|
2019-10-21 15:52:14 -07:00
|
|
|
|
2020-01-22 15:10:47 -08:00
|
|
|
module.ping_monitor(
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2020-01-22 15:10:47 -08:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.FINISH,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
2019-10-21 15:52:14 -07:00
|
|
|
|
|
|
|
|
2019-11-12 15:31:07 -08:00
|
|
|
def test_ping_monitor_hits_ping_url_for_fail_state():
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com'}
|
2019-11-30 14:51:32 -08:00
|
|
|
payload = 'data'
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('get_handler')
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive(
|
|
|
|
'format_buffered_logs_for_payload'
|
|
|
|
).and_return(payload)
|
2019-11-17 16:54:27 -08:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
2022-07-23 22:07:06 +02:00
|
|
|
'https://example.com/fail', data=payload.encode('utf'), verify=True
|
2022-06-29 21:19:40 -07:00
|
|
|
).and_return(flexmock(ok=True))
|
2019-10-21 15:52:14 -07:00
|
|
|
|
2020-01-22 15:10:47 -08:00
|
|
|
module.ping_monitor(
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2020-01-22 15:10:47 -08:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.FAIL,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
2019-10-21 15:52:14 -07:00
|
|
|
|
|
|
|
|
2023-03-06 03:38:08 +05:30
|
|
|
def test_ping_monitor_hits_ping_url_for_log_state():
|
|
|
|
hook_config = {'ping_url': 'https://example.com'}
|
|
|
|
payload = 'data'
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('get_handler')
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive(
|
|
|
|
'format_buffered_logs_for_payload'
|
|
|
|
).and_return(payload)
|
2023-03-06 03:38:08 +05:30
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
|
|
|
'https://example.com/log', data=payload.encode('utf'), verify=True
|
|
|
|
).and_return(flexmock(ok=True))
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2023-03-06 03:38:08 +05:30
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.LOG,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2019-11-12 15:31:07 -08:00
|
|
|
def test_ping_monitor_with_ping_uuid_hits_corresponding_url():
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config = {'ping_url': 'abcd-efgh-ijkl-mnop'}
|
2019-11-30 14:51:32 -08:00
|
|
|
payload = 'data'
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('get_handler')
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive(
|
|
|
|
'format_buffered_logs_for_payload'
|
|
|
|
).and_return(payload)
|
2019-11-17 16:54:27 -08:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
2023-04-14 19:35:24 -07:00
|
|
|
f"https://hc-ping.com/{hook_config['ping_url']}",
|
|
|
|
data=payload.encode('utf-8'),
|
|
|
|
verify=True,
|
2022-07-23 22:07:06 +02:00
|
|
|
).and_return(flexmock(ok=True))
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2022-07-23 22:07:06 +02:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.FINISH,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def test_ping_monitor_skips_ssl_verification_when_verify_tls_false():
|
|
|
|
hook_config = {'ping_url': 'https://example.com', 'verify_tls': False}
|
|
|
|
payload = 'data'
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('get_handler')
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive(
|
|
|
|
'format_buffered_logs_for_payload'
|
|
|
|
).and_return(payload)
|
2022-07-23 22:07:06 +02:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
|
|
|
'https://example.com', data=payload.encode('utf-8'), verify=False
|
|
|
|
).and_return(flexmock(ok=True))
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2022-07-23 22:07:06 +02:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.FINISH,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def test_ping_monitor_executes_ssl_verification_when_verify_tls_true():
|
|
|
|
hook_config = {'ping_url': 'https://example.com', 'verify_tls': True}
|
|
|
|
payload = 'data'
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('get_handler')
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive(
|
|
|
|
'format_buffered_logs_for_payload'
|
|
|
|
).and_return(payload)
|
2022-07-23 22:07:06 +02:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
|
|
|
'https://example.com', data=payload.encode('utf-8'), verify=True
|
2022-06-29 21:19:40 -07:00
|
|
|
).and_return(flexmock(ok=True))
|
2019-10-21 15:52:14 -07:00
|
|
|
|
2020-01-22 15:10:47 -08:00
|
|
|
module.ping_monitor(
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2020-01-22 15:10:47 -08:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.FINISH,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
2019-11-07 10:08:44 -08:00
|
|
|
|
|
|
|
|
2019-11-12 15:31:07 -08:00
|
|
|
def test_ping_monitor_dry_run_does_not_hit_ping_url():
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com'}
|
2019-11-17 16:54:27 -08:00
|
|
|
flexmock(module.requests).should_receive('post').never()
|
2019-11-07 10:08:44 -08:00
|
|
|
|
2020-01-22 15:10:47 -08:00
|
|
|
module.ping_monitor(
|
2022-05-23 20:02:10 -07:00
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2020-01-22 15:10:47 -08:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=True,
|
|
|
|
)
|
2022-05-24 13:59:28 -07:00
|
|
|
|
|
|
|
|
2022-05-24 14:09:42 -07:00
|
|
|
def test_ping_monitor_does_not_hit_ping_url_when_states_not_matching():
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
2022-05-24 14:09:42 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com', 'states': ['finish']}
|
2022-05-24 13:59:28 -07:00
|
|
|
flexmock(module.requests).should_receive('post').never()
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2022-05-24 13:59:28 -07:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=True,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-24 14:09:42 -07:00
|
|
|
def test_ping_monitor_hits_ping_url_when_states_matching():
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
2022-05-24 14:09:42 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com', 'states': ['start', 'finish']}
|
2022-05-24 13:59:28 -07:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
2022-07-23 22:07:06 +02:00
|
|
|
'https://example.com/start', data=''.encode('utf-8'), verify=True
|
2022-06-29 21:19:40 -07:00
|
|
|
).and_return(flexmock(ok=True))
|
2022-05-24 13:59:28 -07:00
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2022-05-24 13:59:28 -07:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
2022-05-24 15:50:04 -07:00
|
|
|
|
|
|
|
|
2024-04-19 10:36:40 +02:00
|
|
|
def test_ping_monitor_adds_create_query_parameter_when_create_slug_true():
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
|
|
|
hook_config = {'ping_url': 'https://example.com', 'create_slug': True}
|
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
|
|
|
'https://example.com/start?create=1', data=''.encode('utf-8'), verify=True
|
|
|
|
).and_return(flexmock(ok=True))
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
|
|
|
{},
|
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def test_ping_monitor_does_not_add_create_query_parameter_when_create_slug_false():
|
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
|
|
|
hook_config = {'ping_url': 'https://example.com', 'create_slug': False}
|
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
|
|
|
'https://example.com/start', data=''.encode('utf-8'), verify=True
|
|
|
|
).and_return(flexmock(ok=True))
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
|
|
|
{},
|
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def test_ping_monitor_does_not_add_create_query_parameter_when_ping_url_is_uuid():
|
2024-04-22 20:44:20 +02:00
|
|
|
hook_config = {'ping_url': 'b3611b24-df9c-4d36-9203-fa292820bf2a', 'create_slug': True}
|
2024-04-19 10:36:40 +02:00
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
|
|
|
f"https://hc-ping.com/{hook_config['ping_url']}",
|
|
|
|
data=''.encode('utf-8'),
|
|
|
|
verify=True,
|
|
|
|
).and_return(flexmock(ok=True))
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
|
|
|
{},
|
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.FINISH,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2024-04-22 20:45:36 +02:00
|
|
|
def test_ping_monitor_issues_warning_when_ping_url_is_uuid_and_create_slug_true():
|
|
|
|
hook_config = {'ping_url': 'b3611b24-df9c-4d36-9203-fa292820bf2a', 'create_slug': True}
|
2024-05-16 16:06:40 +02:00
|
|
|
|
|
|
|
flexmock(module.requests).should_receive('post').and_return(flexmock(ok=True))
|
|
|
|
|
2024-04-22 20:45:36 +02:00
|
|
|
flexmock(module.logger).should_receive('warning').once()
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
|
|
|
{},
|
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.FINISH,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-06-29 21:19:40 -07:00
|
|
|
def test_ping_monitor_with_connection_error_logs_warning():
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
2022-05-24 15:50:04 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com'}
|
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
2022-07-23 22:07:06 +02:00
|
|
|
'https://example.com/start', data=''.encode('utf-8'), verify=True
|
2022-05-24 15:50:04 -07:00
|
|
|
).and_raise(module.requests.exceptions.ConnectionError)
|
2022-06-29 21:19:40 -07:00
|
|
|
flexmock(module.logger).should_receive('warning').once()
|
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2022-06-29 21:19:40 -07:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def test_ping_monitor_with_other_error_logs_warning():
|
2024-03-10 16:18:49 -07:00
|
|
|
flexmock(module.borgmatic.hooks.logs).should_receive('Forgetful_buffering_handler').never()
|
2022-06-29 21:19:40 -07:00
|
|
|
hook_config = {'ping_url': 'https://example.com'}
|
|
|
|
response = flexmock(ok=False)
|
|
|
|
response.should_receive('raise_for_status').and_raise(
|
|
|
|
module.requests.exceptions.RequestException
|
|
|
|
)
|
|
|
|
flexmock(module.requests).should_receive('post').with_args(
|
2022-07-23 22:07:06 +02:00
|
|
|
'https://example.com/start', data=''.encode('utf-8'), verify=True
|
2022-06-29 21:19:40 -07:00
|
|
|
).and_return(response)
|
|
|
|
flexmock(module.logger).should_receive('warning').once()
|
2022-05-24 15:50:04 -07:00
|
|
|
|
|
|
|
module.ping_monitor(
|
|
|
|
hook_config,
|
2023-07-08 23:14:30 -07:00
|
|
|
{},
|
2022-05-24 15:50:04 -07:00
|
|
|
'config.yaml',
|
|
|
|
state=module.monitor.State.START,
|
|
|
|
monitoring_log_level=1,
|
|
|
|
dry_run=False,
|
|
|
|
)
|