Hello guys,
I have the following error message when I try to install the zabbix phyton libraries to monitor an IBM Storwize V7000:
*****************************
root@zabbix:/tmp# sudo pip install pywbem pyzabbix zbxsend simplejson
Collecting pywbem
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 512, in _prepare_file
finder, self.upgrade, require_hashes)
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 273, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 442, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 400, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 545, in _get_pages
page = self._get_page(location)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 648, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 757, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send
timeout=timeout
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
root@zabbix:/tmp#
************************
Basically I'm using the following procedure to configure the V7000 monitoring:
************************************************** *********************************
====== Installation ======
- Install Python modules pywbem and pyzabbix:
easy_install pywbem pyzabbix zbxsend simplejson
or
pip install pywbem pyzabbix zbxsend simplejson
- Copy files to appropriate locations, chmod +x shell scripts:
/etc/zabbix/externalscripts: (zabbix scripts)
svc_mon.py
svc_mon (chmod +x)
svc_perf (chmod +x)
svc_perf.conf (Storwize/Zabbix server authentication configuration)
svc_perf_discovery_sender (chmod +x)
svc_perf_discovery_sender.py
svc_perf_graph.py
svc_perf_graph (chmod +x)
svc_perf_wbem.py
svc_status.awk
svc_status.sh (chmod +x)
/etc/cron.d:
svc_perf_cron (Storwize name and schedule configuration)
/var/cache/zabbix: (script-generated cache files and logs)
svc_mon.errlog
svc_perf.XXX.cache (cache files must be persistent)
svc_perf.XXX.errlog
svc_perf_graph.log
====== Configuration guide ======
svc_* scripts connect to configured Storwize cluster(s) with single login/password specified in the /etc/zabbix/externalscripts/svc_perf.conf ($SVC_USER and $SVC_PWD).
That account must have the Storwize Administrator role (it seems like account with Monitor role can't refresh performance stats).
svc_perf_graph uses Zabbix API to create storage pool aggregate graphs in Zabbix server. Zabbix connection settings is specified in /etc/zabbix/externalscripts/svc_perf.conf ($ZABBIX_SERVER, $ZABBIX_USER, $ZABBIX_PASSWORD)
$ZABBIX_SERVER specifies Zabbix API URL (http://zabbix.domain.com), script connects to "$ZABBIX_SERVER/api_jsonrpc.php". Zabbix account $ZABBIX_USER must have read-write permissions to Storwize nodes in Zabbix.
Storwize cluster name(s) is specified in the /etc/cron.d/svc_perf_cron file. Use short unqualified DNS name paying attention to match Zabbix node name with cluster name.
Note for Storwize V7000 Unified customers: configure scripts to connect to corresponding Storwize V7000 block device cluster management address!
All svc_* scripts is called from /etc/cron.d/svc_perf_cron file. svc_perf script is called for each cluster, specified job repeat interval (*/3) must match Storwize perfstats refresh interval ("startstats -interval 3").
Storwize configuration:
- Open Storwize GUI, navigate to "Access - Users" and create account named "zabbix", assign it to Administrator role
Note for Storwize V7000 Unified customers: use Storwize V7000 block device management GUI!
- Open SSH connection to Storwize and run command to change Storwize stats refresh interval to a practical value as default (15 minutes) is too long
startstats -interval 3
- Check /etc/cron.d/svc_perf_cron to match svc_perf script repeat interval with Storwize stats interval
- Configure key-based SSH access for zabbix user to Storwize CLI:
sudo -u zabbix ssh-keygen
sudo -u zabbix ssh-keygen -e
save ssh2 public key to file
- Assign ssh2 public key to Storwize "zabbix" account
Storwize GUI - Access - Users - zabbix - Properties - SSH Public Key - Browse to public key file
- Check svc_status.sh script:
sudo -u zabbix /etc/zabbix/externalscripts/svc_status.sh <storwize>
Zabbix configuration:
- Import Zabbix template from file _Special_Storwize_Perf.xml
- Create node for Storwize cluster, set node name to short unqualified DNS name, link template _Special_Storwize_Perf
- Create Zabbix account "svc_perf" with read-write permissions to new Storwize nodes
====== Usage ======
- Wait 15 min for cron to run svc_perf_discovery_sender script, check /var/cache/zabbix/svc_perf_discovery_sender log for errors
- Check Storwize nodes in Zabbix GUI: volume and mdisk items will be created
- After 6 min (two svc_perf job repeat intervals) volume/mdisk performance stats will appear in Latest Data tab (check /var/cache/zabbix/svc_perf.XXX.errlog for errors)
- After 15 min aggregate storage pool graphs will appear on Graphs tab
- Every 3 min cron will run svc_perf script and feed fresh stats to Zabbix
- Every 10 min svc_mon script will check Storwize for mdisk status and storage pool space usage
- Every 3 min Zabbix will call svc_status.sh external check for Storwize alerts
************************************************** ****************************************
Can you help me with this problem?
Thanks in advance.
Regards.
I have the following error message when I try to install the zabbix phyton libraries to monitor an IBM Storwize V7000:
*****************************
root@zabbix:/tmp# sudo pip install pywbem pyzabbix zbxsend simplejson
Collecting pywbem
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 512, in _prepare_file
finder, self.upgrade, require_hashes)
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 273, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 442, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 400, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 545, in _get_pages
page = self._get_page(location)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 648, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 757, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send
timeout=timeout
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
root@zabbix:/tmp#
************************
Basically I'm using the following procedure to configure the V7000 monitoring:
************************************************** *********************************
====== Installation ======
- Install Python modules pywbem and pyzabbix:
easy_install pywbem pyzabbix zbxsend simplejson
or
pip install pywbem pyzabbix zbxsend simplejson
- Copy files to appropriate locations, chmod +x shell scripts:
/etc/zabbix/externalscripts: (zabbix scripts)
svc_mon.py
svc_mon (chmod +x)
svc_perf (chmod +x)
svc_perf.conf (Storwize/Zabbix server authentication configuration)
svc_perf_discovery_sender (chmod +x)
svc_perf_discovery_sender.py
svc_perf_graph.py
svc_perf_graph (chmod +x)
svc_perf_wbem.py
svc_status.awk
svc_status.sh (chmod +x)
/etc/cron.d:
svc_perf_cron (Storwize name and schedule configuration)
/var/cache/zabbix: (script-generated cache files and logs)
svc_mon.errlog
svc_perf.XXX.cache (cache files must be persistent)
svc_perf.XXX.errlog
svc_perf_graph.log
====== Configuration guide ======
svc_* scripts connect to configured Storwize cluster(s) with single login/password specified in the /etc/zabbix/externalscripts/svc_perf.conf ($SVC_USER and $SVC_PWD).
That account must have the Storwize Administrator role (it seems like account with Monitor role can't refresh performance stats).
svc_perf_graph uses Zabbix API to create storage pool aggregate graphs in Zabbix server. Zabbix connection settings is specified in /etc/zabbix/externalscripts/svc_perf.conf ($ZABBIX_SERVER, $ZABBIX_USER, $ZABBIX_PASSWORD)
$ZABBIX_SERVER specifies Zabbix API URL (http://zabbix.domain.com), script connects to "$ZABBIX_SERVER/api_jsonrpc.php". Zabbix account $ZABBIX_USER must have read-write permissions to Storwize nodes in Zabbix.
Storwize cluster name(s) is specified in the /etc/cron.d/svc_perf_cron file. Use short unqualified DNS name paying attention to match Zabbix node name with cluster name.
Note for Storwize V7000 Unified customers: configure scripts to connect to corresponding Storwize V7000 block device cluster management address!
All svc_* scripts is called from /etc/cron.d/svc_perf_cron file. svc_perf script is called for each cluster, specified job repeat interval (*/3) must match Storwize perfstats refresh interval ("startstats -interval 3").
Storwize configuration:
- Open Storwize GUI, navigate to "Access - Users" and create account named "zabbix", assign it to Administrator role
Note for Storwize V7000 Unified customers: use Storwize V7000 block device management GUI!
- Open SSH connection to Storwize and run command to change Storwize stats refresh interval to a practical value as default (15 minutes) is too long
startstats -interval 3
- Check /etc/cron.d/svc_perf_cron to match svc_perf script repeat interval with Storwize stats interval
- Configure key-based SSH access for zabbix user to Storwize CLI:
sudo -u zabbix ssh-keygen
sudo -u zabbix ssh-keygen -e
save ssh2 public key to file
- Assign ssh2 public key to Storwize "zabbix" account
Storwize GUI - Access - Users - zabbix - Properties - SSH Public Key - Browse to public key file
- Check svc_status.sh script:
sudo -u zabbix /etc/zabbix/externalscripts/svc_status.sh <storwize>
Zabbix configuration:
- Import Zabbix template from file _Special_Storwize_Perf.xml
- Create node for Storwize cluster, set node name to short unqualified DNS name, link template _Special_Storwize_Perf
- Create Zabbix account "svc_perf" with read-write permissions to new Storwize nodes
====== Usage ======
- Wait 15 min for cron to run svc_perf_discovery_sender script, check /var/cache/zabbix/svc_perf_discovery_sender log for errors
- Check Storwize nodes in Zabbix GUI: volume and mdisk items will be created
- After 6 min (two svc_perf job repeat intervals) volume/mdisk performance stats will appear in Latest Data tab (check /var/cache/zabbix/svc_perf.XXX.errlog for errors)
- After 15 min aggregate storage pool graphs will appear on Graphs tab
- Every 3 min cron will run svc_perf script and feed fresh stats to Zabbix
- Every 10 min svc_mon script will check Storwize for mdisk status and storage pool space usage
- Every 3 min Zabbix will call svc_status.sh external check for Storwize alerts
************************************************** ****************************************
Can you help me with this problem?
Thanks in advance.
Regards.