You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm starting to use this module and finaly I made it work, but I've noticed that use_config options seems to be ignoring the includes of config file.
I've the config file with the default options (I preffer to leave it). Then I have a custon config inside /etc/zabbix/zabbix_agentd.d folder that replace those default options, and is working fine on the zabbix agent and also on zabbix_sender command.
One of those options is the zabbix server, and I'm thinking that are no being loaded, because I'm getting this error trying to send data with use_config=True:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pyzabbix/sender.py", line 398, in _chunk_send
connection.connect(host_addr)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./get_memory.py", line 167, in <module>
sender.send(packet)
File "/usr/local/lib/python3.5/dist-packages/pyzabbix/sender.py", line 433, in send
result.parse(self._chunk_send(metrics[m:m + self.chunk_size]))
File "/usr/local/lib/python3.5/dist-packages/pyzabbix/sender.py", line 408, in _chunk_send
logger.warn('Sending failed: %s', err.msg)
AttributeError: 'ConnectionRefusedError' object has no attribute 'msg'
I was trying to figure out what was the problem until I've decided to use the host IP instead that option, and then has worked perfectly. After looking into the code to see if maybe I did something wrong, I've seen that looks like the problem is the configparser library, because looks like is not able to manage the imports (or at least I was not able to found a way beyond the manual import of every file).
Is there any way to manage this?.
I know that just setting the file where the serverIP is located works, but I preffer something more generic, to avoid problems later because the "out of default" customizations.
Best regards.
The text was updated successfully, but these errors were encountered:
Hello,
I'm starting to use this module and finaly I made it work, but I've noticed that use_config options seems to be ignoring the includes of config file.
I've the config file with the default options (I preffer to leave it). Then I have a custon config inside /etc/zabbix/zabbix_agentd.d folder that replace those default options, and is working fine on the zabbix agent and also on zabbix_sender command.
One of those options is the zabbix server, and I'm thinking that are no being loaded, because I'm getting this error trying to send data with use_config=True:
I was trying to figure out what was the problem until I've decided to use the host IP instead that option, and then has worked perfectly. After looking into the code to see if maybe I did something wrong, I've seen that looks like the problem is the configparser library, because looks like is not able to manage the imports (or at least I was not able to found a way beyond the manual import of every file).
Is there any way to manage this?.
I know that just setting the file where the serverIP is located works, but I preffer something more generic, to avoid problems later because the "out of default" customizations.
Best regards.
The text was updated successfully, but these errors were encountered: