Merge "New Horizon Dashboard plugin for Kiloeyes Metrics"
This commit is contained in:
commit
2d1a47f6fd
|
@ -0,0 +1,12 @@
|
||||||
|
include setup.py
|
||||||
|
recursive-include kiloeyes_ui/templates *
|
||||||
|
recursive-include kiloeyes_ui/static *
|
||||||
|
recursive-include kiloeyes_ui/load_avg/templates *
|
||||||
|
recursive-include kiloeyes_ui/cpu_perc/templates *
|
||||||
|
recursive-include kiloeyes_ui/process_thrdcount/templates *
|
||||||
|
recursive-include kiloeyes_ui/process_mem/templates *
|
||||||
|
recursive-include kiloeyes_ui/network/templates *
|
||||||
|
recursive-include kiloeyes_ui/disk_space/templates *
|
||||||
|
recursive-include kiloeyes_ui/inputoutput/templates *
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
===============================================================
|
||||||
|
Kiloeyes UI: Kiloeyes Extension for the OpenStack Dashboard (Horizon)
|
||||||
|
===============================================================
|
||||||
|
|
||||||
|
Kiloeyes UI is a Horizon Dashboard to monitor openstack metrics collected by Kiloeyes.
|
||||||
|
It uses the standard Horizon extension systems, and maintains code and styling
|
||||||
|
consistency where possible.
|
||||||
|
|
||||||
|
Most of the developer information, as well as an overview of Horizon, can be
|
||||||
|
found in the `Horizon documentation online`_.
|
||||||
|
|
||||||
|
.. _Horizon documentation online: http://docs.openstack.org/developer/horizon/index.html
|
||||||
|
|
||||||
|
Getting Started
|
||||||
|
===============
|
||||||
|
|
||||||
|
The quickest way to get up and running is:
|
||||||
|
|
||||||
|
1. Setup a basic `Devstack installation`_
|
||||||
|
2. Clone `Kiloeyes` with ``git clone https://github.com/openstack/kiloeyes``
|
||||||
|
3. Open ``/horizon/``
|
||||||
|
4. Run ``./tools/with_venv.sh pip install --upgrade <kiloeyes home>/kiloeyes/kiloeyes_horizon/dist/kiloeyes_horizon-0.0.1.tar.gz``.
|
||||||
|
5. Copy ``<kiloeyes home>/kiloeyes/kiloeyes_horizon/enabled/_50_kiloeyes_ui.py`` to ``/horizon/openstack_dashboard/enabled``
|
||||||
|
6. Copy and paste below configs to ``/horizon/openstack_dashboard/local/local_settings.py``
|
||||||
|
|
||||||
|
``KIBANA_HOST = "<IP Address of Kibana Host>"
|
||||||
|
KIBANA_URL = "http://%s:5601" % KIBANA_HOST``
|
||||||
|
|
||||||
|
Building Documentation
|
||||||
|
======================
|
||||||
|
|
||||||
|
This documentation is written by contributors who wats to add new panel to the dashboard.
|
||||||
|
After adding the desired panels
|
||||||
|
|
||||||
|
1. Add the panel name in ``/kiloeyes/kiloeyes_horizon/kiloeyes_ui/dashboard.py``
|
||||||
|
2. Include the new panel template in ``/kiloeyes/kiloeyes_horizon/MANIFEST.in``
|
||||||
|
example: ``recursive-include kiloeyes_ui/<new panel>/templates *``
|
||||||
|
3. Run ``python Setup.py sdist``
|
||||||
|
|
||||||
|
After this, Follow the steps in ``Getting Started``
|
|
@ -0,0 +1,10 @@
|
||||||
|
# The name of the dashboard to be added to HORIZON['dashboards']. Required.
|
||||||
|
DASHBOARD = 'kiloeyes_ui'
|
||||||
|
|
||||||
|
# If set to True, this dashboard will not be added to the settings.
|
||||||
|
DISABLED = False
|
||||||
|
|
||||||
|
# A list of applications to be added to INSTALLED_APPS.
|
||||||
|
ADD_INSTALLED_APPS = [
|
||||||
|
'kiloeyes_ui',
|
||||||
|
]
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
from kiloeyes_ui import dashboard
|
||||||
|
|
||||||
|
|
||||||
|
class Cpu_Perc(horizon.Panel):
|
||||||
|
name = _("CPU Perc")
|
||||||
|
slug = "cpu_perc"
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Kiloeyes_Ui.register(Cpu_Perc)
|
|
@ -0,0 +1,13 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Cpu_Perc" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_header %}
|
||||||
|
{% include "horizon/common/_page_header.html" with title=_("Cpu_Perc") %}
|
||||||
|
{% endblock page_header %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
{{ kibana_url }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from horizon.test import helpers as test
|
||||||
|
|
||||||
|
|
||||||
|
class Cpu_PercTests(test.TestCase):
|
||||||
|
# Unit tests for cpu_perc.
|
||||||
|
def test_me(self):
|
||||||
|
self.assertTrue(1 + 1 == 2)
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf.urls import url
|
||||||
|
|
||||||
|
from kiloeyes_ui.cpu_perc import views
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||||
|
]
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(views.APIView):
|
||||||
|
# A very simple class-based view...
|
||||||
|
template_name = 'kiloeyes_ui/cpu_perc/index.html'
|
||||||
|
|
||||||
|
def get_data(self, request, context, *args, **kwargs):
|
||||||
|
# Add data to the context here...
|
||||||
|
context['kibana_url'] = settings.KIBANA_URL
|
||||||
|
return context
|
|
@ -0,0 +1,27 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
|
||||||
|
|
||||||
|
class Kiloeyes_Ui(horizon.Dashboard):
|
||||||
|
name = _("Kiloeyes")
|
||||||
|
slug = "kiloeyes_ui"
|
||||||
|
panels = ('load_avg', 'process_thrdcount', 'process_mem', 'network',
|
||||||
|
'disk_space', 'inputoutput', ) # Add your panels here.
|
||||||
|
default_panel = 'load_avg' # Specify the slug of
|
||||||
|
# the dashboard's default panel.
|
||||||
|
|
||||||
|
|
||||||
|
horizon.register(Kiloeyes_Ui)
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
from kiloeyes_ui import dashboard
|
||||||
|
|
||||||
|
|
||||||
|
class Disk_Space(horizon.Panel):
|
||||||
|
name = _("Disk Space")
|
||||||
|
slug = "disk_space"
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Kiloeyes_Ui.register(Disk_Space)
|
|
@ -0,0 +1,27 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Disk Space" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_header %}
|
||||||
|
{% include "horizon/common/_page_header.html" with title=_("Disk Space") %}
|
||||||
|
{% endblock page_header %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
<div>
|
||||||
|
{% trans "Project ID:" %}
|
||||||
|
{{ project_id }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/Disk-Space-Utilization-By-Project?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),
|
||||||
|
time:(from:now-15m,mode:quick,to:now))&_a=(filters:!(('$state':(store:appState),meta:(alias:!n,apply:!t,disabled:!f,index:'data_*',
|
||||||
|
key:project_id,negate:!f,value:'{{ project_id }}'),query:(match:(project_id:(query:'{{ project_id }}',type:phrase))))),
|
||||||
|
linked:!f,query:(query:(bool:(must:!((wildcard:(name:disk.space_used_perc)),(term:(_type:metrics)))))),uiState:(),vis:(aggs:!((id:'1',params:(field:value),
|
||||||
|
schema:metric,type:avg),(id:'2',params:(extended_bounds:(),field:timestamp,interval:86400000),schema:segment,type:histogram),
|
||||||
|
(id:'3',params:(field:project_id,order:desc,orderBy:_term,row:!t,size:0),schema:split,type:terms)),listeners:(),
|
||||||
|
params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,
|
||||||
|
interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),
|
||||||
|
title:'Disk%20Space%20Utilization%20By%20Project',type:line))" height="600" width="800"></iframe>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from horizon.test import helpers as test
|
||||||
|
|
||||||
|
|
||||||
|
class Disk_Space(test.TestCase):
|
||||||
|
# Unit tests for load_avg.
|
||||||
|
def test_me(self):
|
||||||
|
self.assertTrue(1 + 1 == 2)
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf.urls import url
|
||||||
|
|
||||||
|
from kiloeyes_ui.disk_space import views
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||||
|
]
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(views.APIView):
|
||||||
|
# A very simple class-based view...
|
||||||
|
template_name = 'kiloeyes_ui/disk_space/index.html'
|
||||||
|
|
||||||
|
def get_data(self, request, context, *args, **kwargs):
|
||||||
|
# Add data to the context here...
|
||||||
|
context['project_id'] = kwargs.get('project_id',
|
||||||
|
request.user.tenant_id)
|
||||||
|
context['kibana_url'] = settings.KIBANA_URL
|
||||||
|
return context
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
from kiloeyes_ui import dashboard
|
||||||
|
|
||||||
|
|
||||||
|
class Inputoutput(horizon.Panel):
|
||||||
|
name = _("IO")
|
||||||
|
slug = "inputoutput"
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Kiloeyes_Ui.register(Inputoutput)
|
|
@ -0,0 +1,26 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "IO" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_header %}
|
||||||
|
{% include "horizon/common/_page_header.html" with title=_("IO") %}
|
||||||
|
{% endblock page_header %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
<div>
|
||||||
|
{% trans "Project ID:" %}
|
||||||
|
{{ project_id }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/IO?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),
|
||||||
|
time:(from:now-15m,mode:quick,to:now))&_a=(filters:!(('$state':(store:appState),meta:(alias:!n,apply:!t,disabled:!f,index:'data_*',key:project_id,negate:!f,
|
||||||
|
value:'{{ project_id }}'),query:(match:(project_id:(query:'{{ project_id }}',type:phrase))))),linked:!f,
|
||||||
|
query:(query:(bool:(must:!((wildcard:(name:'io*')),(term:(_type:metrics)))))),uiState:(),vis:(aggs:!((id:'1',params:(field:value),schema:metric,type:sum),
|
||||||
|
(id:'2',params:(extended_bounds:(),field:timestamp,interval:86400000),schema:segment,type:histogram),(id:'3',params:(field:name,order:desc,orderBy:_term,size:0),
|
||||||
|
schema:group,type:terms),(id:'4',params:(field:project_id,order:desc,orderBy:_term,row:!t,size:0),schema:split,type:terms)),listeners:(),
|
||||||
|
params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,
|
||||||
|
setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:IO,type:line))" height="600" width="80%"></iframe>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from horizon.test import helpers as test
|
||||||
|
|
||||||
|
|
||||||
|
class Inputoutput(test.TestCase):
|
||||||
|
# Unit tests for load_avg.
|
||||||
|
def test_me(self):
|
||||||
|
self.assertTrue(1 + 1 == 2)
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf.urls import url
|
||||||
|
|
||||||
|
from kiloeyes_ui.inputoutput import views
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||||
|
]
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(views.APIView):
|
||||||
|
# A very simple class-based view...
|
||||||
|
template_name = 'kiloeyes_ui/inputoutput/index.html'
|
||||||
|
|
||||||
|
def get_data(self, request, context, *args, **kwargs):
|
||||||
|
# Add data to the context here...
|
||||||
|
context['project_id'] = kwargs.get('project_id',
|
||||||
|
request.user.tenant_id)
|
||||||
|
context['kibana_url'] = settings.KIBANA_URL
|
||||||
|
return context
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
from kiloeyes_ui import dashboard
|
||||||
|
|
||||||
|
|
||||||
|
class Load_Avg(horizon.Panel):
|
||||||
|
name = _("Load Avg")
|
||||||
|
slug = "load_avg"
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Kiloeyes_Ui.register(Load_Avg)
|
|
@ -0,0 +1,26 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Load Average" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_header %}
|
||||||
|
{% include "horizon/common/_page_header.html" with title=_("Load Average") %}
|
||||||
|
{% endblock page_header %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
<div>
|
||||||
|
{% trans "Project ID: "%}
|
||||||
|
{{ project_id }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/Load-Average?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),
|
||||||
|
time:(from:now-15m,mode:quick,to:now))&_a=(filters:!(),linked:!f,query:(query:(match:(_type:metrics))),uiState:(vis:(colors:('Sum%20of%20value':%233F6833))),
|
||||||
|
vis:(aggs:!((id:'1',params:(field:value),schema:metric,type:avg),(id:'2',params:(extended_bounds:(),field:timestamp,interval:86400000),schema:segment,type:histogram),
|
||||||
|
(id:'3',params:(filters:!((input:(query:(term:(name:load.avg_1_min))),label:'Average%20Load%201%20min'),(input:(query:(term:(name:load.avg_5_min))),
|
||||||
|
label:'Average%20Load%205%20min'),(input:(query:(term:(name:load.avg_15_min))),label:'Average%20Load%2015%20min'))),schema:group,type:filters),(id:'4',
|
||||||
|
params:(filters:!((input:(query:(term:(project_id:'{{ project_id }}'))),label:'Project ID')),row:!t),schema:split,type:filters)),listeners:(),
|
||||||
|
params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,
|
||||||
|
showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Load%20Average',type:line))" height="600" width="80%"></iframe>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from horizon.test import helpers as test
|
||||||
|
|
||||||
|
|
||||||
|
class Load_AvgTests(test.TestCase):
|
||||||
|
# Unit tests for load_avg.
|
||||||
|
def test_me(self):
|
||||||
|
self.assertTrue(1 + 1 == 2)
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf.urls import url
|
||||||
|
|
||||||
|
from kiloeyes_ui.load_avg import views
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||||
|
]
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(views.APIView):
|
||||||
|
# A very simple class-based view...
|
||||||
|
template_name = 'kiloeyes_ui/load_avg/index.html'
|
||||||
|
|
||||||
|
def get_data(self, request, context, *args, **kwargs):
|
||||||
|
# Add data to the context here...
|
||||||
|
context['project_id'] = kwargs.get('project_id',
|
||||||
|
request.user.tenant_id)
|
||||||
|
context['kibana_url'] = settings.KIBANA_URL
|
||||||
|
return context
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
from kiloeyes_ui import dashboard
|
||||||
|
|
||||||
|
|
||||||
|
class Network(horizon.Panel):
|
||||||
|
name = _("Network")
|
||||||
|
slug = "network"
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Kiloeyes_Ui.register(Network)
|
|
@ -0,0 +1,26 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Network" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_header %}
|
||||||
|
{% include "horizon/common/_page_header.html" with title=_("Network") %}
|
||||||
|
{% endblock page_header %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
<div>
|
||||||
|
{% trans "Project ID:" %}
|
||||||
|
{{ project_id }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/Network?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),
|
||||||
|
time:(from:now-15m,mode:quick,to:now))&_a=(filters:!(('$state':(store:appState),meta:(alias:!n,apply:!t,disabled:!f,index:'data_*',key:project_id,negate:!f,
|
||||||
|
value:'{{ project_id }}'),query:(match:(project_id:(query:'{{ project_id }}',type:phrase))))),linked:!f,
|
||||||
|
query:(query:(bool:(must:!((wildcard:(name:'net*')),(term:(_type:metrics)))))),uiState:(),vis:(aggs:!((id:'1',params:(field:value),schema:metric,type:sum),(id:'2',
|
||||||
|
params:(extended_bounds:(),field:timestamp,interval:86400000),schema:segment,type:histogram),(id:'3',params:(field:name,order:desc,orderBy:_term,size:0),
|
||||||
|
schema:group,type:terms),(id:'4',params:(field:project_id,order:desc,orderBy:_term,row:!t,size:0),schema:split,type:terms)),listeners:(),params:(addLegend:!t,
|
||||||
|
addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,
|
||||||
|
smoothLines:!f,times:!(),yAxis:()),title:Network,type:line))" height="600" width="800"></iframe>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from horizon.test import helpers as test
|
||||||
|
|
||||||
|
|
||||||
|
class Network(test.TestCase):
|
||||||
|
# Unit tests for load_avg.
|
||||||
|
def test_me(self):
|
||||||
|
self.assertTrue(1 + 1 == 2)
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf.urls import url
|
||||||
|
|
||||||
|
from kiloeyes_ui.network import views
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||||
|
]
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(views.APIView):
|
||||||
|
# A very simple class-based view...
|
||||||
|
template_name = 'kiloeyes_ui/network/index.html'
|
||||||
|
|
||||||
|
def get_data(self, request, context, *args, **kwargs):
|
||||||
|
# Add data to the context here...
|
||||||
|
context['project_id'] = kwargs.get('project_id',
|
||||||
|
request.user.tenant_id)
|
||||||
|
context['kibana_url'] = settings.KIBANA_URL
|
||||||
|
return context
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
from kiloeyes_ui import dashboard
|
||||||
|
|
||||||
|
|
||||||
|
class Process_Mem(horizon.Panel):
|
||||||
|
name = _("Process Memory")
|
||||||
|
slug = "process_mem"
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Kiloeyes_Ui.register(Process_Mem)
|
|
@ -0,0 +1,35 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Process Memory" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_header %}
|
||||||
|
{% include "horizon/common/_page_header.html" with title=_("Process Memory in Bytes") %}
|
||||||
|
{% endblock page_header %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
<div>
|
||||||
|
{% trans "Project ID:" %}
|
||||||
|
{{ project_id }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/Process-Memory-Bytes?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),
|
||||||
|
time:(from:now-15m,mode:quick,to:now))&_a=(filters:!(('$state':(store:appState),meta:(alias:!n,apply:!t,disabled:!f,index:'data_*',key:project_id,
|
||||||
|
negate:!f,value:'{{project_id}}'),query:(match:(project_id:(query:'{{project_id}}',type:phrase))))),linked:!f,
|
||||||
|
query:(query:(bool:(must:!((term:(_type:metrics)),(term:(name:process.mem.rss_mbytes)))))),
|
||||||
|
uiState:(vis:(colors:('{{project_id}}':%23508642),legendOpen:!t)),
|
||||||
|
vis:(aggs:!((id:'1',params:(field:value),schema:metric,type:sum),(id:'2',params:(field:project_id,order:desc,orderBy:_term,row:!t,size:0),schema:split,type:terms),
|
||||||
|
(id:'3',params:(field:dimensions.process_name,order:desc,orderBy:_term,size:0),schema:segment,type:terms)),listeners:(),
|
||||||
|
params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'Process%20Memory%20Bytes',type:pie))" height="600" width="800"></iframe>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/Process-Mem-Bytes-vs-Time?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),
|
||||||
|
time:(from:now-15m,mode:quick,to:now))&_a=(filters:!(('$state':(store:appState),meta:(alias:!n,apply:!t,disabled:!f,index:'data_*',key:project_id,negate:!f,
|
||||||
|
value:'{{project_id}}'),query:(match:(project_id:(query:'{{project_id}}',type:phrase))))),
|
||||||
|
linked:!f,query:(query:(bool:(must:!((term:(_type:metrics)),(term:(name:process.mem.rss_mbytes)))))),uiState:(),vis:(aggs:!((id:'1',params:(field:value),
|
||||||
|
schema:metric,type:sum),(id:'2',params:(extended_bounds:(),field:timestamp,interval:86400000),schema:segment,type:histogram),
|
||||||
|
(id:'3',params:(field:dimensions.process_name,order:desc,orderBy:_term,size:0),schema:group,type:terms),(id:'4',
|
||||||
|
params:(field:project_id,order:desc,orderBy:_term,row:!t,size:0),schema:split,type:terms)),listeners:(),
|
||||||
|
params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,
|
||||||
|
shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Process%20Mem%20Bytes%20vs%20Time',type:line))" height="600" width="800"></iframe>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from horizon.test import helpers as test
|
||||||
|
|
||||||
|
|
||||||
|
class Process_Mem(test.TestCase):
|
||||||
|
# Unit tests for load_avg.
|
||||||
|
def test_me(self):
|
||||||
|
self.assertTrue(1 + 1 == 2)
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf.urls import url
|
||||||
|
|
||||||
|
from kiloeyes_ui.process_mem import views
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||||
|
]
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(views.APIView):
|
||||||
|
# A very simple class-based view...
|
||||||
|
template_name = 'kiloeyes_ui/process_mem/index.html'
|
||||||
|
|
||||||
|
def get_data(self, request, context, *args, **kwargs):
|
||||||
|
# Add data to the context here...
|
||||||
|
context['project_id'] = kwargs.get('project_id',
|
||||||
|
request.user.tenant_id)
|
||||||
|
context['kibana_url'] = settings.KIBANA_URL
|
||||||
|
return context
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
import horizon
|
||||||
|
from kiloeyes_ui import dashboard
|
||||||
|
|
||||||
|
|
||||||
|
class Process_Thrdcount(horizon.Panel):
|
||||||
|
name = _("Process Thread Count")
|
||||||
|
slug = "process_thrdcount"
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Kiloeyes_Ui.register(Process_Thrdcount)
|
|
@ -0,0 +1,40 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Process Thread Count" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_header %}
|
||||||
|
{% include "horizon/common/_page_header.html" with title=_("Process Thread Count") %}
|
||||||
|
{% endblock page_header %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
<div>
|
||||||
|
{% trans "Project ID:" %}
|
||||||
|
{{ project_id }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/Process-Thread-Count?embed=true
|
||||||
|
&_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))
|
||||||
|
&_a=(filters:!(('$state':(store:appState),meta:(alias:!n,apply:!t,disabled:!f,index:'data_*',
|
||||||
|
key:project_id,negate:!f,value:'{{project_id}}'),
|
||||||
|
query:(match:(project_id:(query:'{{project_id}}',type:phrase))))),linked:!f,
|
||||||
|
query:(query:(bool:(must:!((term:(_type:metrics)),(term:(name:process.thread_count)))))),
|
||||||
|
uiState:(vis:(colors:('{{project_id}}':%23962D82),
|
||||||
|
legendOpen:!t)),
|
||||||
|
vis:(aggs:!((id:'1',params:(field:value),schema:metric,type:sum),(id:'2',
|
||||||
|
params:(field:project_id,order:desc,orderBy:_term,row:!t,size:0),schema:split,type:terms),
|
||||||
|
(id:'3',params:(field:dimensions.process_name,order:desc,orderBy:_term,size:0),schema:segment,type:terms)),
|
||||||
|
listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'Process%20Thread%20Count',type:pie))"
|
||||||
|
height="600" width="800"></iframe>
|
||||||
|
<iframe src="{{ kibana_url }}/app/kibana#/visualize/edit/Process-Thread-Count-vs-Time?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))
|
||||||
|
&_a=(filters:!(('$state':(store:appState),meta:(alias:!n,apply:!t,disabled:!f,index:'data_*',
|
||||||
|
key:project_id,negate:!f,value:'{{project_id}}'),query:(match:(project_id:(query:'{{project_id}}',type:phrase))))),
|
||||||
|
linked:!f,query:(query:(bool:(must:!((term:(_type:metrics)),(term:(name:process.thread_count)))))),uiState:(),vis:(aggs:!((id:'1',params:(field:value),
|
||||||
|
schema:metric,type:sum),(id:'2',params:(extended_bounds:(),field:timestamp,interval:86400000),schema:segment,type:histogram),
|
||||||
|
(id:'3',params:(field:dimensions.process_name,order:desc,orderBy:_term,size:0),schema:group,type:terms),
|
||||||
|
(id:'4',params:(field:project_id,order:desc,orderBy:_term,row:!t,size:0),schema:split,type:terms)),listeners:(),
|
||||||
|
params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,
|
||||||
|
shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Process%20Thread%20Count%20vs%20Time',type:line))" height="600" width="800"></iframe>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from horizon.test import helpers as test
|
||||||
|
|
||||||
|
|
||||||
|
class Process_ThrdcountTests(test.TestCase):
|
||||||
|
# Unit tests for load_avg.
|
||||||
|
def test_me(self):
|
||||||
|
self.assertTrue(1 + 1 == 2)
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf.urls import url
|
||||||
|
|
||||||
|
from kiloeyes_ui.process_thrdcount import views
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||||
|
]
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(views.APIView):
|
||||||
|
# A very simple class-based view...
|
||||||
|
template_name = 'kiloeyes_ui/process_thrdcount/index.html'
|
||||||
|
|
||||||
|
def get_data(self, request, context, *args, **kwargs):
|
||||||
|
# Add data to the context here...
|
||||||
|
context['project_id'] = kwargs.get('project_id',
|
||||||
|
request.user.tenant_id)
|
||||||
|
context['kibana_url'] = settings.KIBANA_URL
|
||||||
|
return context
|
|
@ -0,0 +1 @@
|
||||||
|
/* Additional JavaScript for kiloeyes_ui. */
|
|
@ -0,0 +1 @@
|
||||||
|
/* Additional SCSS for {{ dash_name }}. */
|
|
@ -0,0 +1,11 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block sidebar %}
|
||||||
|
{% include 'horizon/common/_sidebar.html' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
{% include "horizon/_messages.html" %}
|
||||||
|
{% block kiloeyes_ui_main %}{% endblock %}
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
# implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
||||||
|
|
||||||
|
from setuptools import find_packages
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='kiloeyes_horizon',
|
||||||
|
version='0.0.1',
|
||||||
|
url='https://github.com/openstack/kiloeyes/kiloeyes_horizon',
|
||||||
|
author='Vishnu Govindaraj',
|
||||||
|
author_email='vg249@cornell.edu',
|
||||||
|
packages=find_packages(),
|
||||||
|
include_package_data=True,
|
||||||
|
setup_requires=['pbr'],
|
||||||
|
pbr=True,
|
||||||
|
)
|
Loading…
Reference in New Issue