-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dev.icinga.com #10979] Mistake in mongodb command definition (mongodb_replicaset) #3848
Comments
Updated by Napsty on 2016-01-18 13:48:16 00:00 Sorry for the ugly format above, I had some problems with the WYSIWYG form. When checking the primary server of a replica set (replica_primary) in MongoDB this requires the usage of -r/--replicaset parameter.
The value is mandatory to use, see command line:
I adapted it in the following way so the value is used:
In the Service object I set replchck to true and define the replicaset:
Works now. |
Updated by jflach on 2016-01-18 13:52:25 00:00 I don't know much about mongodb but since you already have a solution you can make our life a lot easier with a git formatted patch :) |
Updated by Napsty on 2016-01-18 14:08:00 00:00 Was already on it ;-) |
Updated by Napsty on 2016-01-18 14:44:24 00:00
Applied in changeset da85c7a. |
Updated by jflach on 2016-01-18 14:46:04 00:00
|
Updated by mfriedrich on 2016-01-25 10:39:49 00:00
|
Updated by gbeutner on 2016-02-23 09:58:41 00:00
|
This issue has been migrated from Redmine: https://dev.icinga.com/issues/10979
Created by Napsty on 2016-01-18 13:32:35 00:00
Assignee: (none)
Status: Resolved (closed on 2016-01-18 14:44:24 00:00)
Target Version: 2.4.2
Last Update: 2016-02-23 09:58:41 00:00 (in Redmine)
When hecking the primary server of a replica set (replica_primary) in MongoDB this requires the usage of -r/--replicaset parameter.
In the current config the command definition lacks the value of the option:
"--replicaset" = { set\_if = "$mongodb\_replicaset$" description = "Connect to replicaset" }
The value is mandatory to use, see command line:
$ /usr/lib/nagios/plugins/check\_mongodb.py -H mongodbserver -P 27001 -A replica\_primary replicaset must be passed in when using replica\_primary check
$ /usr/lib/nagios/plugins/check_mongodb.py -H mongodbserver -P 27001 -A replica_primary -r my-set
OK - Primary server has not changed
I adapted it in the following way so the value is used:
"--replicaset" = { value = "$mongodb\_replicaset$" set\_if = "$mongodb\_replcheck$" description = "Connect to replicaset" }
In the Service object I set replchck to true and define the replicaset:
check\_command = "mongodb" vars.mongodb\_port = "30000" vars.mongodb\_action = "replica\_primary" vars.mongodb\_replicaset = "rs-cache" vars.mongodb\_replcheck= true
Works now.
Changesets
2016-01-18 14:43:51 00:00 by Napsty da85c7a
2016-02-23 08:28:15 00:00 by Napsty a19527f
Subtasks:
The text was updated successfully, but these errors were encountered: