b3lab / safir_monitor_dashboard

Safir Monitor Dashboard (Horizon plugin)
Apache License 2.0
10 stars 6 forks source link

Error: Unable to retrieve gnocchi meaures #4

Open Jimmy88888 opened 6 years ago

Jimmy88888 commented 6 years ago

Hi

When following with existing Openstack Installation Step, I’ve receive the message - Error: Unable to retrieve gnocchi measures.

http error log also show as : [Tue Aug 07 20:44:30.012447 2018] [:error] [pid 10120] ERROR openstack_dashboard.api.rest.utils error invoking apiclient [Tue Aug 07 20:44:30.012555 2018] [:error] [pid 10120] Traceback (most recent call last): [Tue Aug 07 20:44:30.012565 2018] [:error] [pid 10120] File "/usr/share/openstack-dashboard/openstack_dashboard/api/rest/utils.py", line 127, in _wrapped [Tue Aug 07 20:44:30.012573 2018] [:error] [pid 10120] data = function(self, request, *args, **kw) [Tue Aug 07 20:44:30.012579 2018] [:error] [pid 10120] File "/usr/lib/python2.7/site-packages/monitor_dashboard/api/rest/gnocchi.py", line 66, in get [Tue Aug 07 20:44:30.012586 2018] [:error] [pid 10120] end) [Tue Aug 07 20:44:30.012592 2018] [:error] [pid 10120] File "/usr/lib/python2.7/site-packages/monitor_dashboard/api/rest/gnocchi.py", line 133, in get_measures [Tue Aug 07 20:44:30.012599 2018] [:error] [pid 10120] printf("
") [Tue Aug 07 20:44:30.012605 2018] [:error] [pid 10120] TypeError: 'tuple' object does not support item assignment

My configuration: OpenStack version Queens with CentOS-7-x86_64-Minimal-1804.

And confirm measures can show with command as : openstack metric resource show openstack metric measures show

The gnocchi/ceilometer config as attached. gnocchi.txt ceilometer.txt

Hope you can give me a help/suggest, not sure which step I was mistaken or wrong, many thanks.

zhuxiaochun1995 commented 5 years ago

my log show as:

[Tue Jul 16 06:29:16.433164 2019] [wsgi:error] [pid 10655:tid 140334712723200] error invoking apiclient
[Tue Jul 16 06:29:16.433249 2019] [wsgi:error] [pid 10655:tid 140334712723200] Traceback (most recent call last):
[Tue Jul 16 06:29:16.433254 2019] [wsgi:error] [pid 10655:tid 140334712723200]   File "/openstack/venvs/horizon-17.1.10.dev1/lib/python2.7/site-packages/openstack_
dashboard/api/rest/utils.py", line 127, in _wrapped
[Tue Jul 16 06:29:16.433259 2019] [wsgi:error] [pid 10655:tid 140334712723200]     data = function(self, request, *args, **kw)
[Tue Jul 16 06:29:16.433262 2019] [wsgi:error] [pid 10655:tid 140334712723200]   File "/usr/local/lib/python2.7/dist-packages/monitor_dashboard/api/rest/gnocchi.py
", line 66, in get
[Tue Jul 16 06:29:16.433267 2019] [wsgi:error] [pid 10655:tid 140334712723200]     end)
[Tue Jul 16 06:29:16.433270 2019] [wsgi:error] [pid 10655:tid 140334712723200]   File "/usr/local/lib/python2.7/dist-packages/monitor_dashboard/api/rest/gnocchi.py
", line 131, in get_measures
[Tue Jul 16 06:29:16.433273 2019] [wsgi:error] [pid 10655:tid 140334712723200]     data[2] = "{0:.2f}".format(data[2] * 8.0 * bps_to_mbps)
[Tue Jul 16 06:29:16.433277 2019] [wsgi:error] [pid 10655:tid 140334712723200] TypeError: 'tuple' object does not support item assignment

line 131, the gnocchi.get_measures return

Return value:.. [(datetime.datetime(2019, 7, 15, 6, 55, tzinfo=<...0' datetime.timedelta(0)>), 300.0, 0.1466631393)]

each item in measures is a tuple