Zabbix-PyOra-ActiveCheck
Zabbix-PyOra-ActiveCheck copied to clipboard
UnboundLocalError: local variable 'hostname' referenced before assignment
Hello all,
I have an error like this. Could you help please to solve that ? Thank you.
./pyora-active.py --address 10.0.0.5 --database ORCL
{"failed": 0, "chunk": 0, "total": 0, "processed": 0, "time": "0"}
Traceback (most recent call last):
File "./pyora-active.py", line 709, in
my be this could help?
my be this could help?
Thank you Dan. I cant follow you sorry. I'm not very familiar with Oracle so my question will be very low-level. Should I add the --hostname at end of my command ?
Can you send an example please ? Thank you.
Not sure. Didn't use this script for long time. Yet you should provide hostname = zabbix agent's hostname somewhere in configs.
@Lelik13a 我也出现这样的提示,zabbix agent的配置文件的hostname也改成pyora-items-list.py指定时的名称了,还是会出现这样的提示
my be this could help?
Thank you Dan. I cant follow you sorry. I'm not very familiar with Oracle so my question will be very low-level. Should I add the --hostname at end of my command ?
Can you send an example please ? Thank you.
pyora-active.py:
change
` Data = []
try:
with open("/usr/lib/zabbix/cache/items-" + self.args.address + "-"
` to
` Data = [] hostname = self.args.address
try:
with open("/usr/lib/zabbix/cache/items-" + self.args.address + "-"
`