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

cursor error with mongodb-stats.sh #3

Open
tandar17 opened this issue Aug 22, 2017 · 2 comments
Open

cursor error with mongodb-stats.sh #3

tandar17 opened this issue Aug 22, 2017 · 2 comments

Comments

@tandar17
Copy link

tandar17 commented Aug 22, 2017

./mongodb-stats.sh

Traceback (most recent call last):
File "/usr/local/bin/zabbix-mongodb.py", line 208, in
MongoDB.getOplog()
File "/usr/local/bin/zabbix-mongodb.py", line 93, in getOplog
op_fst = (op_first.next())['ts'].time
File "/usr/lib64/python2.7/site-packages/pymongo/cursor.py", line 1142, in next
raise StopIteration
StopIteration
1

@tandar17
Copy link
Author

Solved the issue:

was using a stand alone MangoDB server, so there was no Oplog. Had to enable a replication set.

dahlinPL added a commit to dahlinPL/zabbix-mongodb that referenced this issue Feb 18, 2018
1. remove unneeded socket and json import
2. change oplog query to avoid stopIteration issue (issue omni-lchen#3)
3. check if storage engine is wiredTiger before try to get metrics to avoid error
4. unified database connection method
@dahlinPL
Copy link
Contributor

Hi, this issue should be solved in my last commit.

Regards
Marcin

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