Skip to content
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

Incompatible with MongoDB 5.0.X? #257

Open
MoBlockbuster opened this issue Feb 21, 2022 · 1 comment
Open

Incompatible with MongoDB 5.0.X? #257

MoBlockbuster opened this issue Feb 21, 2022 · 1 comment

Comments

@MoBlockbuster
Copy link

MoBlockbuster commented Feb 21, 2022

I want to use this script to monitor my MongoDB 5.0.6 ReplicaSet Cluster with 3 nodes.
The following checks works on each node:

check_mongodb.py -D -H localhost -A connect -C 10 -W 5
check_mongodb.py -D -H localhost -A memory -C 10 -W 5

Only the following check doesn't work on the current primary node:

check_mongodb.py -D -H localhost -A queries_per_second -C 2000 -W 1500

The output with the errormesage is:

CRITICAL - General MongoDB Error: retryable writes is not supported for unreplicated ns: local.nagios_check, full error: {'index': 0, 'code': 20, 'errmsg': 'retryable writes is not supported for unreplicated ns: local.nagios_check'}

The check works on each secondarynode.

PyMongo ist already available on all nodes.

The usage told me:

-M MONGO_VERSION, --mongoversion=MONGO_VERSION
The MongoDB version you are talking with, either 2 or 3

Is this script compatible with mongodb 5?

The ReplicaSet is installed on Ubuntu 20.04.3 LTS systems.

Let me know if you need further information

BR

@Napsty
Copy link

Napsty commented Jan 18, 2023

@MoBlockbuster Try appending --disable_retry_writes, in your case:

./check_mongodb.py -D -H localhost -A queries_per_second -C 2000 -W 1500 --disable_retry_writes

Ran into this as well (but on MongoDB 4.x). This was fixed in #253 .

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

No branches or pull requests

2 participants