mamonsu
mamonsu copied to clipboard
integer division or modulo by zero
hello, all! I hit the following issue:
[ERROR] 2017-09-03 23:53:22,575 - CFS - catch error: integer division or modulo by zero [INFO] 2017-09-03 23:53:22,575 - CFS - hint: enable debug level to full exception trace [DEBUG] 2017-09-03 23:53:22,575 - CFS - Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/mamonsu/lib/plugin.py", line 140, in _loop self.run(self.sender) File "/usr/lib/python2.7/site-packages/mamonsu/plugins/pgsql/cfs.py", line 63, in run zbx.send('pgsql.cfs.activity[total_compress_ratio]', non_compressed_size / compressed_size) ZeroDivisionError: integer division or modulo by zero
what's wrong with my installation/configuration of mamonsu?
the way I install/initialize mamonsu is the following:
sudo yum install -y python-setuptools sudo rpm -ivh mamonsu-2.2.9-1.el7.centos.noarch.rpm
psql --dbname=postgres --username=postgres --port=5433 --host=127.0.0.1 -c "create user mamonsu with superuser" psql --dbname=postgres --username=mamonsu --port=5433 --host=127.0.0.1 -c "create database mamonsu" psql --dbname=mamonsu --username=mamonsu --port=5433 --host=127.0.0.1 -c "create extension pg_buffercache" psql --dbname=mamonsu --username=mamonsu --port=5433 --host=127.0.0.1 -c "create extension pg_stat_statements" psql --dbname=mamonsu --username=mamonsu --port=5433 --host=127.0.0.1 -c "create extension pg_wait_sampling" mamonsu bootstrap --dbname mamonsu --username mamonsu --host 127.0.0.1 --port 5433 mamonsu export template ~/PostgresProEnterprise-template.xml --add-plugins /etc/mamonsu/plugins --template-name PostgresProEnterprise-Linux mamonsu zabbix template export ~/PostgresProEnterprise-template.xml --url=http://127.0.0.1/zabbix/ --user=Admin --password=zabbix mamonsu zabbix template list | sort | head -1 mamonsu zabbix template id PostgresProEnterprise-Linux mamonsu zabbix hostgroup create PostgresProEnterprise mamonsu zabbix host create 'PostgresProEnterprise server' 8 10105 127.0.0.1 sudo cp /etc/mamonsu/agent.conf /etc/mamonsu/agent.conf.ORIG sudo mamonsu export config /etc/mamonsu/agent.conf --add-plugins /etc/mamonsu/plugins sudo sed -i 's|user = postgres|user = mamonsu|' /etc/mamonsu/agent.conf sudo sed -i 's|database = postgres|database = mamonsu|' /etc/mamonsu/agent.conf sudo sed -i 's|host = localhost|host = 127.0.0.1|' /etc/mamonsu/agent.conf sudo sed -i 's|port = 5432|port = 5433|' /etc/mamonsu/agent.conf sudo sed -i 's|port = 10052|port = 10053|' /etc/mamonsu/agent.conf sudo sed -i 's|client = .*|client = PostgresProEnterprise server|' /etc/mamonsu/agent.conf sudo sed -i '/metric_log/,/enabled = False/s|enabled = False|enabled = True|' /etc/mamonsu/agent.conf sudo sed -i 's|file = None|file = /var/log/mamonsu/agent.log|' /etc/mamonsu/agent.conf sudo sed -i 's|level = INFO|level = DEBUG|' /etc/mamonsu/agent.conf
the issue is reproduced in PostgresPro Enterprise (9.6.3) the issue is not reproduced in PostgresPro Standard (9.6.3)