Open eligiable opened 5 years ago
Hi @eligiable thanks for sharing your environment. I have a similar set up with the differences being I am using Ubuntu 18.04 and Python 2.7.15rc1
When I run python zabbix-mongodb.py
I am getting all the stats and they are being written on the screen. So I am assuming that there are no issues with python versino.
But when I run sh mongodb-stats.sh
I keep getting the following error.
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
zabbix_sender [26855]: invalid parameter "/etc/zabbix/zabbix_agentd.conf"
Looks like the issue is when the python script is being called form shell script. Any pointers to fix the issue would be great. Thanks in advance.
Hi @nkgokul just install zabbix_sender, which is not by default installed with zabbix-agent or zabbix-server.
sudo apt install zabbix_sender and then try,
Boa tarde,
No meu mongo que é um replica set ele apresenta esse erro [gandalf@node10-mongodb bin]$ sudo vim zabbix-mongodb.py
[gandalf@node10-mongodb bin]$ sudo sh -x mongodb-stats.sh
++ get_MongoDB_metrics
++ python3 /usr/local/bin/zabbix-mongodb.py
++ /usr/bin/zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -i -
Traceback (most recent call last):
File "/usr/local/bin/zabbix-mongodb.py", line 245, in
This is a Great Script, I've done some modifications according to the following environment:
Below are my configuration:
sudo apt-get install build-essential python-dev python3-pip
sudo pip3 install pymongo
sudo apt-get install zabbix-sender
python /usr/local/bin/zabbix-mongodb.py -- to --> python3 /usr/local/bin/zabbix-mongodb.py
self.mongo_host = "hostname"
self.mongo_user = "username"
self.mongo_password = "password"
Appriciate your effort ...