Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access extended Horizon API #1

Open
andybrucenet opened this issue Oct 11, 2017 · 3 comments
Open

Unable to access extended Horizon API #1

andybrucenet opened this issue Oct 11, 2017 · 3 comments

Comments

@andybrucenet
Copy link

Hello - Followed the install instructions for a non-devstack OpenStack install and I have the monitor plugin running in horizon.

On the monitor dashboard I receive the message "Error: Unable to retrieve host list." Looking at the httpd error_log, I see:

WARNING django.request Not Found: /dashboard/api/instancemonitor/hostlist/

So django cannot find the API extensions your plugin provides.

I bet the answer is simple...just have to register the API location with horizon on startup - somewhere.

My configuration: OpenStack version Pike community edition (CentOS 7). I do indeed have Keystone, Nova, Glance, Neutron, Ceilometer, Aodh and Horizon installed:

[root@lvoskeyst120 ~(lvosksclu120-rc-admin)]# openstack endpoint list | grep -e '\(nova\|neutron\|glance\|aodh ceilometer\|keystone\)'
| 0155b490fe2f41fe91c75f404edbc168 | lmilNAE01 | neutron      | network         | True    | admin     | http://lvosksclu120.hlsdev.local:9696/                    |
| 13cb34b835e64313bb9598a2c8b12128 | lmilNAE01 | nova         | compute         | True    | public    | http://lvosksclu120.hlsdev.local:8774/v2.1                |
| 21f13e6b31af48f09d0e7dc4dfe265ef | lmilNAE01 | keystone     | identity        | True    | public    | http://lvosksclu120.hlsdev.local:5000/v3                  |
| 38f4744a0db54604be9974583cac58b2 | lmilNAE01 | glance       | image           | True    | internal  | http://lvosksclu120.hlsdev.local:9292                     |
| 4c72ebb4311845269842c63baaedec89 | lmilNAE01 | keystone     | identity        | True    | admin     | http://lvosksclu120.hlsdev.local:35357/v3                 |
| 543e9486412a4c399c6363ec74991a49 | lmilNAE01 | neutron      | network         | True    | public    | http://lvosksclu120.hlsdev.local:9696/                    |
| 7c4490d2f6b148ae8e66c49d25cf8221 | lmilNAE01 | neutron      | network         | True    | internal  | http://lvosksclu120.hlsdev.local:9696/                    |
| 95b1b2c6d0e64353b7b9479f060f7d75 | lmilNAE01 | keystone     | identity        | True    | internal  | http://lvosksclu120.hlsdev.local:5000/v3                  |
| aec0a4b03fc047699c95177d0f0c7e72 | lmilNAE01 | glance       | image           | True    | admin     | http://lvosksclu120.hlsdev.local:9292                     |
| b631453006d441a79caa95dce170ff24 | lmilNAE01 | nova         | compute         | True    | internal  | http://lvosksclu120.hlsdev.local:8774/v2.1                |
| e726e0d809094569969e38818b312440 | lmilNAE01 | nova         | compute         | True    | admin     | http://lvosksclu120.hlsdev.local:8774/v2.1                |
| fce695c5cddb47359a9b57bf2b3716c9 | lmilNAE01 | glance       | image           | True    | public    | http://lvosksclu120.hlsdev.local:9292                     |

Here is the setup on my Horizon controller:
/usr/lib/python2.7/site-packages/monitor_dashboard - contains the code from pip install. Under this folder are the API handlers:

[root@lvosnovax120 safir_monitor_dashboard(lvosksclu120-rc-admin)]# ls -la /usr/lib/python2.7/site-packages/monitor_dashboard/api/rest/
total 64
drwxr-xr-x. 2 root root  4096 Oct 11 17:33 .
drwxr-xr-x. 3 root root  4096 Oct 11 17:32 ..
-rw-r--r--. 1 root root  6717 Oct 11 16:13 aodh.py
-rw-r--r--. 1 root root  5345 Oct 11 16:15 aodh.pyc
-rw-r--r--. 1 root root 13326 Oct 11 16:13 gnocchi.py
-rw-r--r--. 1 root root  6999 Oct 11 16:15 gnocchi.pyc
-rw-r--r--. 1 root root  1104 Oct 11 16:13 __init__.py
-rw-r--r--. 1 root root   693 Oct 11 16:15 __init__.pyc
-rw-r--r--. 1 root root  3390 Oct 11 16:13 instance_monitor.py
-rw-r--r--. 1 root root  3499 Oct 11 16:15 instance_monitor.pyc

The horizon dashboard integrations are under /usr/share/openstack-dashboard/openstack_dashboard/local/enabled; here's a list of all of them (including the compiled files):

[root@lvosnovax120 safir_monitor_dashboard(lvosksclu120-rc-admin)]# ls -la /usr/share/openstack-dashboard/openstack_dashboard/local/enabled/
total 128
drwxr-xr-x. 2 root root 4096 Oct 11 17:36 .
drwxr-xr-x. 4 root root 4096 Oct 11 16:22 ..
-rw-r--r--. 1 root root 1146 Oct 11 17:34 _1071_project_compute_monitor_panel.py
-rw-r--r--. 1 root root  555 Oct 11 17:36 _1071_project_compute_monitor_panel.pyc
-rw-r-----. 1 root root 1237 Aug 22 08:23 _1370_project_container_infra_panel_group.py
-rw-r--r--. 2 root root  744 Aug 24 08:46 _1370_project_container_infra_panel_group.pyc
-rw-r--r--. 2 root root  744 Aug 24 08:46 _1370_project_container_infra_panel_group.pyo
-rw-r-----. 1 root root  988 Aug 22 08:23 _1371_project_container_infra_clusters_panel.py
-rw-r--r--. 2 root root  380 Aug 24 08:46 _1371_project_container_infra_clusters_panel.pyc
-rw-r--r--. 2 root root  380 Aug 24 08:46 _1371_project_container_infra_clusters_panel.pyo
-rw-r-----. 1 root root 1014 Aug 22 08:23 _1372_project_container_infra_cluster_templates_panel.py
-rw-r--r--. 2 root root  415 Aug 24 08:46 _1372_project_container_infra_cluster_templates_panel.pyc
-rw-r--r--. 2 root root  415 Aug 24 08:46 _1372_project_container_infra_cluster_templates_panel.pyo
-rw-r--r--. 1 root root  951 Aug 30 07:12 _1810_data_processing_panel_group.py
-rw-r--r--. 2 root root  472 Aug 30 08:47 _1810_data_processing_panel_group.pyc
-rw-r--r--. 2 root root  472 Aug 30 08:47 _1810_data_processing_panel_group.pyo
-rw-r--r--. 1 root root 1464 Aug 30 07:12 _1820_data_processing_clusters_panel.py
-rw-r--r--. 2 root root  957 Aug 30 08:47 _1820_data_processing_clusters_panel.pyc
-rw-r--r--. 2 root root  957 Aug 30 08:47 _1820_data_processing_clusters_panel.pyo
-rw-r--r--. 1 root root 1177 Aug 30 07:12 _1830_data_processing_plugins_panel.py
-rw-r--r--. 2 root root  654 Aug 30 08:47 _1830_data_processing_plugins_panel.pyc
-rw-r--r--. 2 root root  654 Aug 30 08:47 _1830_data_processing_plugins_panel.pyo
-rw-r--r--. 1 root root 1402 Aug 30 07:12 _1840_data_processing_jobs_panel.py
-rw-r--r--. 2 root root  897 Aug 30 08:47 _1840_data_processing_jobs_panel.pyc
-rw-r--r--. 2 root root  897 Aug 30 08:47 _1840_data_processing_jobs_panel.pyo
-rw-r--r--. 1 root root 1075 Oct 11 16:18 _2021_admin_hypervisor_monitor_panel.py
-rw-r--r--. 1 root root  526 Oct 11 16:22 _2021_admin_hypervisor_monitor_panel.pyc
-rw-r--r--. 1 root root 1063 Oct 11 16:18 _2022_admin_project_monitor_panel.py
-rw-r--r--. 1 root root  511 Oct 11 16:22 _2022_admin_project_monitor_panel.pyc
-rw-r--r--. 1 root root  185 Aug 30 07:08 _50_settings.py.example
-rw-r--r--. 1 root root    0 Oct 11 16:18 __init__.py
-rw-r--r--. 1 root root  163 Oct 11 16:22 __init__.pyc
-rw-r--r--. 1 root root  163 Sep  4 17:37 __init__.pyo

So I think that I simply need to tell Horizon where to find the instancemonitor APIs (which will probably be in my local_settings file, yes?). However, I cannot find any documentation on how to register additional APIs to Horizon.

I hope you can help me here, perhaps there is a missing step from the README file for this project?

@esracelik
Copy link
Contributor

Hi,
I haven't tried the dashboard with Pike yet, now I am installing Pike on Devstack to try.
But I wonder if you have gnocchi installed on your system? Ceilometer api is deprecated so you should also have gnocchi endpoint in openstack endpoints list. If you are still using using Ceilometer API you need to use Safir Monitor Dashboard v1.0 [1]

[1] https://github.com/b3lab/safir_monitor_dashboard/tree/mitaka

@esracelik
Copy link
Contributor

Hi,
I have tried with Pike. there seems to be a difference with the Django version [1] and I got the following error.
from django.conf.urls import patterns
ImportError: cannot import name patterns

So we need to publish a new release for Pike version. I think we can publish the new release soon, but you will still need to Gnocchi service.

[1] openstack/horizon@a08d41d#diff-b4ef698db8ca845e5845c4618278f29a

esracelik pushed a commit that referenced this issue Dec 1, 2017
nova conf proper sections added
@ssearles1911
Copy link

ssearles1911 commented Mar 5, 2019

Hi,
I am having the same issue as Andy with Pike. I tried both Main and stable/pike branches. Did you guys ever find a resolution?

Running Ubuntu 16.04 Pike (Not Devstack)

The errors I am seeing in the error log are

When accessing the Hypervisor Tab
WARNING django.request Not Found: /api/instancemonitor/hostlist/

When accessing the Project Tab
WARNING django.request Not Found: /api/instancemonitor/instances/723aa12337a44f818b6d1e1a59f16e49/1/

The host metric data is in gnocchi, and I do believe I have the proper endpoints configured.

openstack endpoint list | grep -e gnocchi
| 0d3ad2e742cf479d90b279584c09f676 | us-east-dtw | gnocchi | metric | True | internal |
| c3475a64fb8d4704a2d5960d13cec453 | us-east-dtw | gnocchi | metric | True | public |
| fbe2fd2826be4d4b8919e38d441c2256 | us-east-dtw | gnocchi | metric | True | admin |

Any help would be greatly appreciated.
Thanks in Advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants