jbfavre / python-protobix

Very simple python module implementing Zabbix Sender protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reading ServerActive from zabbix_agentd.conf is broken

gcmsch opened this issue · comments

It looks like reading ServerActive from zabbix_agentd.conf is broken in my environment.

On CentOS 6:

Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import protobix
>>> zbx_items = protobix.DataContainer(data_type = 'items')
>>> zbx_items._config
{'dryrun': False, 'data_type': 'items', 'server': '1', 'log_output': '/var/log/zabbix/zabbix_agentd.log', 'timeout': 3, 'log_level': 3, 'port': 10051}

On CentOS 7:

Python 2.7.5 (default, Nov 20 2015, 02:00:19) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import protobix
>>> zbx_items = protobix.DataContainer(data_type = 'items')
>>> zbx_items._config
{'dryrun': False, 'data_type': 'items', 'server': '1', 'log_output': '/var/log/zabbix/zabbix_agentd.log', 'timeout': 3, 'log_level': 3, 'port': 10051}

That's what my Zabbix Agent config looks like:

$ fgrep ServerActive /etc/zabbix/zabbix_agentd.conf
ServerActive=192.1.1.1

To me it looks like d88e2cd broke it, but my Python is not really good enough to judge.