From 0bdcd08e0240e009e6de635854dae625449260a5 Mon Sep 17 00:00:00 2001 From: Markus Weber Date: Fri, 27 Jan 2023 16:59:40 +0100 Subject: [PATCH] Add the Option to disable RetryWrites to CheckCommand of mongodb (#9539) * Add the Option to disable RetryWrites to CheckCommand for newer check_mongodb.py * Add documentation foor the Option to disable RetryWrites in the MongoDB-Check --- doc/10-icinga-template-library.md | 1 + itl/plugins-contrib.d/databases.conf | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index e38a7fad5..0488cd4d0 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2566,6 +2566,7 @@ mongodb_replcheck | **Optional.** If set to true, will enable the mongodb_querytype | **Optional.** The query type to check [query\|insert\|update\|delete\|getmore\|command] from queries_per_second. mongodb_collection | **Optional.** Specify the collection to check. mongodb_sampletime | **Optional.** Time used to sample number of pages faults. +mongodb_disableretrywrites | **Optional.** If set to true, will disable Retry Writes, to allow counting the QPS. #### elasticsearch diff --git a/itl/plugins-contrib.d/databases.conf b/itl/plugins-contrib.d/databases.conf index 7d3a1cbe4..29b12463f 100644 --- a/itl/plugins-contrib.d/databases.conf +++ b/itl/plugins-contrib.d/databases.conf @@ -700,6 +700,10 @@ object CheckCommand "mongodb" { value = "$mongodb_warning$" description = "The warning threshold we want to set" } + "--disable_retry_writes" = { + set_if = "$mongodb_disableretrywrites$" + description = "Disable Retry Writes" + } } vars.mongodb_host = {{