danone89 / zabbixmonitoringxencenter Goto Github PK
View Code? Open in Web Editor NEWPython script used to monitoring XenServer for zabbix server 3.x
Python script used to monitoring XenServer for zabbix server 3.x
I get the this error:
{
"data":[Traceback (most recent call last):
File "citrix.xenserver.py", line 499, in
main(sys.argv[1:])
File "citrix.xenserver.py", line 491, in main
if ( command == 'list' ): printoutKeysByRegex(filename,host,filter)
File "citrix.xenserver.py", line 327, in printoutKeysByRegex
sys.stdout.write (outstring)
UnboundLocalError: local variable 'outstring' referenced before assignment
Zabbix Version: 5.0.4
Phyton Version is 3.7
OS: Debian 10.6
Hi,
I'm trying to setup this monitoring on our POC zabbix 4.2. I'm having following error while running it manually. Can you please help.
File "/usr/local/lib/python3.4/urllib/request.py", line 1182, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/local/lib/python3.4/http/client.py", line 1088, in request
self._send_request(method, url, body, headers)
File "/usr/local/lib/python3.4/http/client.py", line 1126, in _send_request
self.endheaders(body)
File "/usr/local/lib/python3.4/http/client.py", line 1084, in endheaders
self._send_output(message_body)
File "/usr/local/lib/python3.4/http/client.py", line 922, in _send_output
self.send(msg)
File "/usr/local/lib/python3.4/http/client.py", line 857, in send
self.connect()
File "/usr/local/lib/python3.4/http/client.py", line 1223, in connect
super().connect()
File "/usr/local/lib/python3.4/http/client.py", line 834, in connect
self.timeout, self.source_address)
File "/usr/local/lib/python3.4/socket.py", line 512, in create_connection
raise err
File "/usr/local/lib/python3.4/socket.py", line 503, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./citrix.xenserver.py", line 499, in
main(sys.argv[1:])
File "./citrix.xenserver.py", line 482, in main
refreshdatefiles(xenmaster, username, password, maxage)
File "./citrix.xenserver.py", line 296, in refreshdatefiles
values = getStats(xenhosts, username, password, maxage)
File "./citrix.xenserver.py", line 195, in getStats
page = getStatsXML(hostname, username, password, delay)
File "./citrix.xenserver.py", line 186, in getStatsXML
pagehandle = request.urlopen(theurl)
File "/usr/local/lib/python3.4/urllib/request.py", line 161, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.4/urllib/request.py", line 463, in open
response = self._open(req, data)
File "/usr/local/lib/python3.4/urllib/request.py", line 481, in _open
'_open', req)
File "/usr/local/lib/python3.4/urllib/request.py", line 441, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.4/urllib/request.py", line 1225, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/local/lib/python3.4/urllib/request.py", line 1184, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>
Regards,
Avinasha
Execuse me,where is the zbx_template_xenserver_host.xml and another?
I have 2 issues found after implementing this template:
zabbix_server.log is flooded with below "became not supported"/"became supported" errors.
Zabbix seems like not report any problems but logs are full of these:
2404683:20240524:024302.813 item ":citrix.xenserver.py["-m","{$XENMASTER}","-u","{$XENUSERNAME}","-p","{$XENPASSWORD}","-t","host","-H","{HOST.NAME}","-c","value","-f","pif_aggr_rx"]" became not supported: Value of type "string" is not suitable for value type "Numeric (float)". Value "Exception ignored in: <function Lock.del at 0x7f71f0f4ef20>
2404683:20240524:024402.191 item ":citrix.xenserver.py["-m","{$XENMASTER}","-u","{$XENUSERNAME}","-p","{$XENPASSWORD}","-t","host","-H","{HOST.NAME}","-c","value","-f","pif_aggr_rx"]" became supported
some externally mounted / shared storage is erroring with similar exceptions in zabbix itself this time:
Value of type "string" is not suitable for value type "Numeric (float)". Value ""
Any tips on what might be the issue and/or how to debug it? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.