From 103379d9492bb19ca9b42baf292dda81e187670a Mon Sep 17 00:00:00 2001 From: Cyberes Date: Mon, 2 Oct 2023 15:09:12 -0600 Subject: [PATCH] media cdn: adjust defaults --- check_media_cdn.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/check_media_cdn.py b/check_media_cdn.py index 1ac614c..c6dfead 100755 --- a/check_media_cdn.py +++ b/check_media_cdn.py @@ -28,7 +28,7 @@ parser.add_argument('--check-domain', required=True, help='The domain that shoul parser.add_argument('--media-cdn-redirect', default='true', help='If set, the server must respond with a redirect to the media CDN domain.') parser.add_argument('--required-headers', nargs='*', help="If these headers aren't set to the correct value, critical. Use the format 'key=value") parser.add_argument('--auth-file', help="File to cache the bot's login details to.") -parser.add_argument('--retries', type=int, default=5, help="It may take a few seconds for Synapse to send the uploaded file to S3. Retry this many times with 1 second interval between.") +parser.add_argument('--retries', type=int, default=11, help="It may take a few seconds for Synapse to send the uploaded file to S3. Retry this many times with 1 second interval between.") parser.add_argument('--timeout', type=float, default=90, help='Request timeout limit.') parser.add_argument('--warn', type=float, default=2.0, help='Manually set warn level.') parser.add_argument('--crit', type=float, default=2.5, help='Manually set critical level.') @@ -231,12 +231,11 @@ async def main() -> None: for msg in prints: print(msg) - print(f'Took {int(end - start)} seconds to validate the file with {retried} retries.') - if clean_msg: print(clean_msg) - print(f'|retries={retried}') + if exit_code == nagios.STATE_OK: + print(f'Took {int(end - start)} seconds to with {retried} retries. | retries={retried}') sys.exit(exit_code)