Closed jdecalog closed 7 years ago
Bleh, it's the tempfile - sets delete to false by default... the fix SHOULD be change "delete=False" to "delete=True". Soon as I get some time will test this fix.
hrmm, nope, os.unlink is in there which is supposed to delete the file... checking.
@jdecalog Yeah near as I can tell, the code is actually removing files. Are you sure there isn't a umask or permissions issue on this one? E.g. if you run this user as zabbix, seeing any exceptions?
Haven't heard much on this, closing for now, re-open as needed.
Hello
Sorry for the late. I still have these empty files. I have two files by minutes :
-rw------- 1 zabbix zabbix 0 juil. 19 16:04 tmpbalKnI -rw------- 1 zabbix zabbix 0 juil. 19 16:04 tmpL0uRbx -rw------- 1 zabbix zabbix 0 juil. 19 16:05 tmpLUZIsJ -rw------- 1 zabbix zabbix 0 juil. 19 16:05 tmpqDxb0g -rw------- 1 zabbix zabbix 0 juil. 19 16:06 tmpJRI7R6 -rw------- 1 zabbix zabbix 0 juil. 19 16:06 tmpofqiWK -rw------- 1 zabbix zabbix 0 juil. 19 16:07 tmp5AzeD_ -rw------- 1 zabbix zabbix 0 juil. 19 16:07 tmpUjLE_Q
And I have these entries in the log (rabbitmq_zabbix.log ) :
2017-07-19 16:04:04,011 INFO: Found return code of 0 2017-07-19 16:04:34,437 INFO: Found return code of 0 2017-07-19 16:05:04,644 INFO: Found return code of 0 2017-07-19 16:05:35,002 INFO: Found return code of 0 2017-07-19 16:06:05,209 INFO: Found return code of 0 2017-07-19 16:06:35,417 INFO: Found return code of 0 2017-07-19 16:07:05,626 INFO: Found return code of 0 2017-07-19 16:07:35,834 INFO: Found return code of 0
That's why I thinks the files are created by api.py
Yes these are most likely created by the api (though it could be some other python process in theory). But these are standard temporary files on the system. There's an unlink call that's supposed to remove them after creation. The question I have is that happening....
See... https://docs.python.org/2/library/os.html#os.unlink for more information. On my local system test, this DOES seem to be working. In the code this is done on lines.. https://github.com/jasonmcintosh/rabbitmq-zabbix/blob/master/scripts/rabbitmq/api.py#L123 and https://github.com/jasonmcintosh/rabbitmq-zabbix/blob/master/scripts/rabbitmq/api.py#L153
SO I'm wondering if there isn't a version issue or something else on your system?
Hello Seems that the api script api.py creates each call a temporary file that is never deleted, making the /tmp partition inodes full.
I tried to update the script, but my poor knwoledges in python are crippling