Open prabhinmp opened 5 years ago
Hello, prabhinmp, please install latest mongodb-org-tools and mongodb-org-shell packages. It tries to find and execute mongostat command in PATH.
As you said installed the required package, still no data fetched from the mongodb server.
I confirm this problem.
Traceback (most recent call last): File "/usr/lib/zabbix/externalscripts/mongod-db.py", line 35, in <module> r = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
both packages mongodb-org-tools and mongodb-org-shell up to date
This because of subprocess.Popen(...) can't find mongostat binary in PATH. I can't reproduce it in Ubuntu and have no capabilities to debug it in Centos/RHEL. You can fix it yourself. In line 34 cmd = ['mongostat', "-u", muser, "-p", mpass, "-h",.... add full path to mongostat binary. Like this cmd = ['/full/path/to/mongostat', "-u", muser, "-p", mpass, "-h",...
Traceback (most recent call last): File "/usr/lib/zabbix/externalscripts/mongod-db.py", line 35, in
r = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory