Retire this project
We've shutdown the kibana service and don't need to manage it with puppet any more. Depends-On: https://review.opendev.org/c/openstack/project-config/+/839235 Change-Id: Iad395dfc91b9c7523b735b31da4dec2721acc42c
This commit is contained in:
parent
ed143a4383
commit
3caf0cf70d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
Gemfile.lock
|
||||
.bundled_gems/
|
15
Gemfile
15
Gemfile
@ -1,15 +0,0 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
if File.exists?('/home/zuul/src/git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper')
|
||||
gem_checkout_method = {:path => '/home/zuul/src/git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper'}
|
||||
else
|
||||
gem_checkout_method = {:git => 'https://git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper'}
|
||||
end
|
||||
gem_checkout_method[:require] = false
|
||||
|
||||
group :development, :test, :system_tests do
|
||||
gem 'puppet-openstack_infra_spec_helper',
|
||||
gem_checkout_method
|
||||
end
|
||||
|
||||
# vim:ft=ruby
|
202
LICENSE
202
LICENSE
@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
11
README.md
11
README.md
@ -1,6 +1,9 @@
|
||||
# OpenStack Kibana Module
|
||||
This project is no longer maintained.
|
||||
|
||||
## Overview
|
||||
The contents of this repository are still available in the Git
|
||||
source code management system. To see the contents of this
|
||||
repository before it reached its end of life, please check out the
|
||||
previous commit with "git checkout HEAD^1".
|
||||
|
||||
This module installs Kibana from source, creates kibana user, and starts the
|
||||
web instance.
|
||||
For any further questions, please email
|
||||
service-discuss@lists.openstack.org or join #opendev on OFTC.
|
||||
|
8
Rakefile
8
Rakefile
@ -1,8 +0,0 @@
|
||||
require 'rubygems'
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
PuppetLint.configuration.fail_on_warnings = true
|
||||
PuppetLint.configuration.send('disable_80chars')
|
||||
PuppetLint.configuration.send('disable_autoloader_layout')
|
||||
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
|
||||
PuppetLint.configuration.send('disable_class_parameter_defaults')
|
@ -1,122 +0,0 @@
|
||||
define([
|
||||
'angular',
|
||||
'lodash'
|
||||
],
|
||||
function (angular, _) {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('kibana.controllers');
|
||||
|
||||
module.controller('dashLoader', function($scope, $http, timer, dashboard, alertSrv, $location) {
|
||||
$scope.loader = dashboard.current.loader;
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.gist_pattern = /(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;
|
||||
$scope.gist = $scope.gist || {};
|
||||
$scope.elasticsearch = $scope.elasticsearch || {};
|
||||
};
|
||||
|
||||
$scope.showDropdown = function(type) {
|
||||
if(_.isUndefined(dashboard.current.loader)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var _l = dashboard.current.loader;
|
||||
if(type === 'load') {
|
||||
return (_l.load_elasticsearch || _l.load_gist || _l.load_local);
|
||||
}
|
||||
if(type === 'save') {
|
||||
return (_l.save_elasticsearch || _l.save_gist || _l.save_local || _l.save_default);
|
||||
}
|
||||
if(type === 'share') {
|
||||
return (_l.save_temp);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.set_default = function() {
|
||||
if(dashboard.set_default($location.path())) {
|
||||
alertSrv.set('Home Set','This page has been set as your default Kibana dashboard','success',5000);
|
||||
} else {
|
||||
alertSrv.set('Incompatible Browser','Sorry, your browser is too old for this feature','error',5000);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.purge_default = function() {
|
||||
if(dashboard.purge_default()) {
|
||||
alertSrv.set('Local Default Clear','Your Kibana default dashboard has been reset to the default',
|
||||
'success',5000);
|
||||
} else {
|
||||
alertSrv.set('Incompatible Browser','Sorry, your browser is too old for this feature','error',5000);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.elasticsearch_save = function(type,ttl) {
|
||||
$scope.share = {
|
||||
location : window.location.href.replace(window.location.hash,""),
|
||||
type : "temp",
|
||||
id : "urllink",
|
||||
// Note that we hvae to do the encode json thing because kibana
|
||||
// wants the parameters to be json quoted then url quoted ... :(
|
||||
link : window.location.href.replace(window.location.hash,"")+"#dashboard/file/logstash.json?query="+encodeURIComponent(JSON.stringify(dashboard.current.services.query.list[0].query).slice(1,-1)),
|
||||
title : "Share URL"
|
||||
};
|
||||
return;
|
||||
};
|
||||
|
||||
$scope.elasticsearch_delete = function(id) {
|
||||
dashboard.elasticsearch_delete(id).then(
|
||||
function(result) {
|
||||
if(!_.isUndefined(result)) {
|
||||
if(result.found) {
|
||||
alertSrv.set('Dashboard Deleted',id+' has been deleted','success',5000);
|
||||
// Find the deleted dashboard in the cached list and remove it
|
||||
var toDelete = _.where($scope.elasticsearch.dashboards,{_id:id})[0];
|
||||
$scope.elasticsearch.dashboards = _.without($scope.elasticsearch.dashboards,toDelete);
|
||||
} else {
|
||||
alertSrv.set('Dashboard Not Found','Could not find '+id+' in Elasticsearch','warning',5000);
|
||||
}
|
||||
} else {
|
||||
alertSrv.set('Dashboard Not Deleted','An error occurred deleting the dashboard','error',5000);
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
$scope.elasticsearch_dblist = function(query) {
|
||||
dashboard.elasticsearch_list(query,$scope.loader.load_elasticsearch_size).then(
|
||||
function(result) {
|
||||
if(!_.isUndefined(result.hits)) {
|
||||
$scope.hits = result.hits.total;
|
||||
$scope.elasticsearch.dashboards = result.hits.hits;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.save_gist = function() {
|
||||
dashboard.save_gist($scope.gist.title).then(
|
||||
function(link) {
|
||||
if(!_.isUndefined(link)) {
|
||||
$scope.gist.last = link;
|
||||
alertSrv.set('Gist saved','You will be able to access your exported dashboard file at '+
|
||||
'<a href="'+link+'">'+link+'</a> in a moment','success');
|
||||
} else {
|
||||
alertSrv.set('Save failed','Gist could not be saved','error',5000);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.gist_dblist = function(id) {
|
||||
dashboard.gist_list(id).then(
|
||||
function(files) {
|
||||
if(files && files.length > 0) {
|
||||
$scope.gist.files = files;
|
||||
} else {
|
||||
alertSrv.set('Gist Failed','Could not retrieve dashboard list from gist','error',5000);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
# kibana - web instance
|
||||
#
|
||||
# Copied from http://cookbook.logstash.net/recipes/using-upstart/
|
||||
|
||||
description "kibana web instance"
|
||||
|
||||
start on virtual-filesystems
|
||||
stop on runlevel [06]
|
||||
|
||||
# Respawn it if the process exits
|
||||
respawn
|
||||
respawn limit 5 30
|
||||
expect fork
|
||||
|
||||
chdir /opt/kibana/kibana
|
||||
|
||||
script
|
||||
|
||||
su -s /bin/sh -c 'exec "$0" "$@"' kibana -- /usr/bin/ruby /opt/kibana/kibana/kibana.rb &
|
||||
emit kibana-running
|
||||
end script
|
||||
|
@ -1,226 +0,0 @@
|
||||
{
|
||||
"title": "Logstash Search",
|
||||
"services": {
|
||||
"query": {
|
||||
"list": {
|
||||
"0": {
|
||||
"query": "{{ARGS.query || ''}}",
|
||||
"alias": "",
|
||||
"color": "#7EB26D",
|
||||
"id": 0,
|
||||
"pin": false,
|
||||
"type": "lucene"
|
||||
}
|
||||
},
|
||||
"ids": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"filter": {
|
||||
"list": {
|
||||
"0": {
|
||||
"type": "time",
|
||||
"field": "@timestamp",
|
||||
"from": "now-{{ARGS.from || '15m'}}",
|
||||
"to": "now",
|
||||
"mandate": "must",
|
||||
"active": true,
|
||||
"alias": "",
|
||||
"id": 0
|
||||
}
|
||||
},
|
||||
"ids": [
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"rows": [
|
||||
{
|
||||
"title": "Graph",
|
||||
"height": "350px",
|
||||
"editable": true,
|
||||
"collapse": false,
|
||||
"collapsable": true,
|
||||
"panels": [
|
||||
{
|
||||
"span": 12,
|
||||
"editable": true,
|
||||
"group": [
|
||||
"default"
|
||||
],
|
||||
"type": "histogram",
|
||||
"mode": "count",
|
||||
"time_field": "@timestamp",
|
||||
"value_field": null,
|
||||
"auto_int": true,
|
||||
"resolution": 100,
|
||||
"interval": "10m",
|
||||
"fill": 3,
|
||||
"linewidth": 3,
|
||||
"timezone": "browser",
|
||||
"spyable": true,
|
||||
"zoomlinks": true,
|
||||
"bars": true,
|
||||
"stack": true,
|
||||
"points": false,
|
||||
"lines": false,
|
||||
"legend": true,
|
||||
"x-axis": true,
|
||||
"y-axis": true,
|
||||
"percentage": false,
|
||||
"interactive": true,
|
||||
"queries": {
|
||||
"mode": "all",
|
||||
"ids": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"title": "Events over time",
|
||||
"intervals": [
|
||||
"auto",
|
||||
"1s",
|
||||
"1m",
|
||||
"5m",
|
||||
"10m",
|
||||
"30m",
|
||||
"1h",
|
||||
"3h",
|
||||
"12h",
|
||||
"1d",
|
||||
"1w",
|
||||
"1M",
|
||||
"1y"
|
||||
],
|
||||
"options": true,
|
||||
"tooltip": {
|
||||
"value_type": "cumulative",
|
||||
"query_as_alias": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"notice": false
|
||||
},
|
||||
{
|
||||
"title": "Events",
|
||||
"height": "350px",
|
||||
"editable": true,
|
||||
"collapse": false,
|
||||
"collapsable": true,
|
||||
"panels": [
|
||||
{
|
||||
"title": "All events",
|
||||
"error": false,
|
||||
"span": 12,
|
||||
"editable": true,
|
||||
"group": [
|
||||
"default"
|
||||
],
|
||||
"type": "table",
|
||||
"size": 100,
|
||||
"pages": 5,
|
||||
"offset": 0,
|
||||
"sort": [
|
||||
"@timestamp",
|
||||
"desc"
|
||||
],
|
||||
"style": {
|
||||
"font-size": "9pt"
|
||||
},
|
||||
"overflow": "min-height",
|
||||
"fields": [
|
||||
"@timestamp",
|
||||
"message"
|
||||
],
|
||||
"localTime": true,
|
||||
"timeField": "@timestamp",
|
||||
"highlight": [],
|
||||
"sortable": true,
|
||||
"header": true,
|
||||
"paging": true,
|
||||
"spyable": true,
|
||||
"queries": {
|
||||
"mode": "all",
|
||||
"ids": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"field_list": true,
|
||||
"status": "Stable",
|
||||
"trimFactor": 300,
|
||||
"normTimes": true
|
||||
}
|
||||
],
|
||||
"notice": false
|
||||
}
|
||||
],
|
||||
"editable": true,
|
||||
"failover": false,
|
||||
"index": {
|
||||
"interval": "day",
|
||||
"pattern": "[logstash-]YYYY.MM.DD",
|
||||
"default": "NO_TIME_FILTER_OR_INDEX_PATTERN_NOT_MATCHED"
|
||||
},
|
||||
"style": "{{ARGS.style || 'dark'}}",
|
||||
"panel_hints": true,
|
||||
"pulldowns": [
|
||||
{
|
||||
"type": "query",
|
||||
"collapse": false,
|
||||
"notice": false,
|
||||
"query": "*",
|
||||
"pinned": true,
|
||||
"history": [],
|
||||
"remember": 10
|
||||
},
|
||||
{
|
||||
"type": "filtering",
|
||||
"collapse": true,
|
||||
"notice": false
|
||||
}
|
||||
],
|
||||
"nav": [
|
||||
{
|
||||
"type": "timepicker",
|
||||
"collapse": false,
|
||||
"notice": false,
|
||||
"status": "Stable",
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
],
|
||||
"refresh_intervals": [
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"timefield": "@timestamp",
|
||||
"now": true,
|
||||
"filter_id": 0
|
||||
}
|
||||
],
|
||||
"loader": {
|
||||
"save_gist": false,
|
||||
"save_elasticsearch": true,
|
||||
"save_local": true,
|
||||
"save_default": true,
|
||||
"save_temp": true,
|
||||
"save_temp_ttl_enable": true,
|
||||
"save_temp_ttl": "30d",
|
||||
"load_gist": true,
|
||||
"load_elasticsearch": true,
|
||||
"load_elasticsearch_size": 20,
|
||||
"load_local": true,
|
||||
"hide": false
|
||||
},
|
||||
"refresh": false
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
# Copyright 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.
|
||||
#
|
||||
# Class to install kibana frontend to logstash.
|
||||
#
|
||||
class kibana (
|
||||
$discover_nodes = ['localhost:9200'],
|
||||
$js_elasticsearch_prefix = '/',
|
||||
$js_elasticsearch_url = 'http://localhost:9200',
|
||||
$js_vhost_aliases = [],
|
||||
$js_vhost_name = $::fqdn,
|
||||
$js_vhost_template = 'kibana/dual-elasticsearch.vhost.erb',
|
||||
$version = 'js',
|
||||
) {
|
||||
|
||||
group { 'kibana':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
user { 'kibana':
|
||||
ensure => present,
|
||||
comment => 'Kibana User',
|
||||
home => '/opt/kibana',
|
||||
gid => 'kibana',
|
||||
shell => '/bin/bash',
|
||||
membership => 'minimum',
|
||||
require => Group['kibana'],
|
||||
}
|
||||
|
||||
file { '/opt/kibana':
|
||||
ensure => directory,
|
||||
owner => 'kibana',
|
||||
group => 'kibana',
|
||||
mode => '0755',
|
||||
require => User['kibana'],
|
||||
}
|
||||
|
||||
case $version {
|
||||
'js': {
|
||||
class { '::kibana::js':
|
||||
vhost_name => $js_vhost_name,
|
||||
vhost_aliases => $js_vhost_aliases,
|
||||
vhost_template => $js_vhost_template,
|
||||
elasticsearch_prefix => $js_elasticsearch_prefix,
|
||||
elasticsearch_url => $js_elasticsearch_url,
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Unknown version: ${version}")
|
||||
}
|
||||
}
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
# Copyright 2015 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.
|
||||
#
|
||||
# Class to install kibana frontend to logstash.
|
||||
#
|
||||
class kibana::js (
|
||||
$elasticsearch_url = 'http://localhost:9200',
|
||||
$elasticsearch_prefix = '/', # Must contain trailing /
|
||||
$git_revision = 'v3.1.2',
|
||||
$vhost_aliases = [],
|
||||
$vhost_name = $::fqdn,
|
||||
$vhost_proxy_connect_timeout = '15',
|
||||
$vhost_proxy_timeout = '120',
|
||||
$vhost_template = 'kibana/dual-elasticsearch.vhost.erb',
|
||||
$serveradmin = "webmaster@${::fqdn}",
|
||||
) {
|
||||
|
||||
$base_path = "/opt/kibana/${git_revision}"
|
||||
|
||||
vcsrepo { $base_path:
|
||||
ensure => latest,
|
||||
provider => 'git',
|
||||
source => 'https://github.com/elasticsearch/kibana.git',
|
||||
revision => $git_revision,
|
||||
owner => 'www-data',
|
||||
}
|
||||
|
||||
file { "${base_path}/src/config.js":
|
||||
ensure => present,
|
||||
content => template('kibana/config.js.erb'),
|
||||
owner => 'www-data',
|
||||
require => Vcsrepo[$base_path],
|
||||
subscribe => Vcsrepo[$base_path],
|
||||
}
|
||||
|
||||
file { "${base_path}/src/app/dashboards/logstash.json":
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/kibana/logstash.json',
|
||||
owner => 'www-data',
|
||||
require => Vcsrepo[$base_path],
|
||||
subscribe => Vcsrepo[$base_path],
|
||||
}
|
||||
|
||||
file { "${base_path}/src/app/controllers/dashLoader.js":
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/kibana/dashLoader.js',
|
||||
owner => 'www-data',
|
||||
require => Vcsrepo[$base_path],
|
||||
subscribe => Vcsrepo[$base_path],
|
||||
}
|
||||
|
||||
include ::httpd
|
||||
if !defined(Httpd_mod['rewrite']) {
|
||||
httpd_mod { 'rewrite':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
if !defined(Httpd_mod['proxy']) {
|
||||
httpd_mod { 'proxy':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
if !defined(Httpd_mod['proxy_http']) {
|
||||
httpd_mod { 'proxy_http':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
# The Apache mod_version module only needs to be enabled on Ubuntu 12.04
|
||||
# as it comes compiled and enabled by default on newer OS, including CentOS
|
||||
if !defined(Httpd::Mod['version']) and $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '12.04' {
|
||||
httpd::mod { 'version': ensure => present }
|
||||
}
|
||||
|
||||
httpd::vhost { 'kibana':
|
||||
docroot => "${base_path}/src",
|
||||
vhost_name => $vhost_name,
|
||||
serveraliases => $vhost_aliases,
|
||||
port => 80,
|
||||
template => $vhost_template,
|
||||
require => [
|
||||
Httpd_mod['rewrite'],
|
||||
Httpd_mod['proxy'],
|
||||
Httpd_mod['proxy_http'],
|
||||
],
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "openstackinfra-kibana",
|
||||
"version": "0.0.1",
|
||||
"author": "Openstack CI",
|
||||
"summary": "Puppet module for Kibana",
|
||||
"license": "Apache 2.0",
|
||||
"source": "https://git.openstack.org/openstack-infra/puppet-kibana.git",
|
||||
"project_page": "http://docs.openstack.org/infra/system-config/",
|
||||
"issues_url": "https://storyboard.openstack.org/#!/project/735",
|
||||
"dependencies": [
|
||||
{"name":"openstackinfra/vcsrepo","version_requirement":">= 0.0.8"}
|
||||
]
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
HOSTS:
|
||||
ubuntu-server-1404-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
box: puppetlabs/ubuntu-14.04-64-nocm
|
||||
box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
|
||||
hypervisor: vagrant
|
||||
CONFIG:
|
||||
log_level: debug
|
||||
type: git
|
@ -1,10 +0,0 @@
|
||||
HOSTS:
|
||||
centos-70-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-7-x86_64
|
||||
hypervisor: none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -1,10 +0,0 @@
|
||||
HOSTS:
|
||||
ubuntu-14.04-amd64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
hypervisor: none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -1,10 +0,0 @@
|
||||
HOSTS:
|
||||
ubuntu-16.04-amd64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-16.04-amd64
|
||||
hypervisor: none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -1,80 +0,0 @@
|
||||
/** @scratch /configuration/config.js/1
|
||||
*
|
||||
* == Configuration
|
||||
* config.js is where you will find the core Kibana configuration. This file contains parameter that
|
||||
* must be set before kibana is run for the first time.
|
||||
*/
|
||||
define(['settings'],
|
||||
function (Settings) {
|
||||
"use strict";
|
||||
|
||||
/** @scratch /configuration/config.js/2
|
||||
*
|
||||
* === Parameters
|
||||
*/
|
||||
return new Settings({
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
*
|
||||
* ==== elasticsearch
|
||||
*
|
||||
* The URL to your elasticsearch server. You almost certainly don't
|
||||
* want +http://localhost:9200+ here. Even if Kibana and Elasticsearch are on
|
||||
* the same host. By default this will attempt to reach ES at the same host you have
|
||||
* kibana installed on. You probably want to set it to the FQDN of your
|
||||
* elasticsearch host
|
||||
*
|
||||
* Note: this can also be an object if you want to pass options to the http client. For example:
|
||||
*
|
||||
* +elasticsearch: {server: "http://localhost:9200", withCredentials: true}+
|
||||
*
|
||||
*/
|
||||
elasticsearch: "http://"+window.location.hostname+":80"+"<%= @elasticsearch_prefix %>".replace(/\/+$/, ""),
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
*
|
||||
* ==== default_route
|
||||
*
|
||||
* This is the default landing page when you don't specify a dashboard to load. You can specify
|
||||
* files, scripts or saved dashboards here. For example, if you had saved a dashboard called
|
||||
* `WebLogs' to elasticsearch you might use:
|
||||
*
|
||||
* default_route: '/dashboard/elasticsearch/WebLogs',
|
||||
*/
|
||||
default_route : '/dashboard/file/logstash.json',
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
*
|
||||
* ==== kibana-int
|
||||
*
|
||||
* The default ES index to use for storing Kibana specific object
|
||||
* such as stored dashboards
|
||||
*/
|
||||
kibana_index: "kibana-int",
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
*
|
||||
* ==== panel_name
|
||||
*
|
||||
* An array of panel modules available. Panels will only be loaded when they are defined in the
|
||||
* dashboard, but this list is used in the "add panel" interface.
|
||||
*/
|
||||
panel_names: [
|
||||
'histogram',
|
||||
'map',
|
||||
'goal',
|
||||
'table',
|
||||
'filtering',
|
||||
'timepicker',
|
||||
'text',
|
||||
'hits',
|
||||
'column',
|
||||
'trends',
|
||||
'bettermap',
|
||||
'query',
|
||||
'terms',
|
||||
'stats',
|
||||
'sparklines'
|
||||
]
|
||||
});
|
||||
});
|
@ -1,140 +0,0 @@
|
||||
module KibanaConfig
|
||||
|
||||
# A Note: While the only option you really have to set is "Elasticsearch" it
|
||||
# is HIGHLY recommended you glance over every option. I personally consider
|
||||
# 'Facet_index_limit' really important.
|
||||
|
||||
# Your elastic search server(s). This may be set as an array for round robin
|
||||
# load balancing
|
||||
# Elasticsearch = ["elasticsearch1:9200","elasticsearch2:9200"]
|
||||
Elasticsearch = ["<%= scope.lookupvar("::kibana::discover_nodes").join("\",\"") %>"]
|
||||
|
||||
#Set the Net::HTTP read/open timeouts for the connection to the ES backend
|
||||
ElasticsearchTimeout = 500
|
||||
|
||||
# The port Kibana should listen on
|
||||
KibanaPort = 5601
|
||||
|
||||
# The adress ip Kibana should listen on. Comment out or set to
|
||||
# 0.0.0.0 to listen on all interfaces.
|
||||
KibanaHost = '127.0.0.1'
|
||||
|
||||
# The record type as defined in your logstash configuration.
|
||||
# Seperate multiple types with a comma, no spaces. Leave blank
|
||||
# for all.
|
||||
Type = ''
|
||||
|
||||
# Results to show per page
|
||||
Per_page = 500
|
||||
|
||||
# Timezone. Leave this set to 'user' to have the user's browser autocorrect.
|
||||
# Otherwise, set a timezone string
|
||||
# Examples: 'UTC', 'America/Phoenix', 'Europe/Athens', MST
|
||||
# You can use `date +%Z` on linux to get your timezone string
|
||||
Timezone = 'UTC'
|
||||
|
||||
# Format for timestamps. Defaults to mm/dd HH:MM:ss.
|
||||
# For syntax see: http://blog.stevenlevithan.com/archives/date-time-format
|
||||
# Time_format = 'isoDateTime'
|
||||
Time_format = 'yyyy-mm-dd\'T\'HH:MM:ss.l'
|
||||
|
||||
# Change which fields are shown by default. Must be set as an array
|
||||
# Default_fields = ['@fields.vhost','@fields.response','@fields.request']
|
||||
Default_fields = ['message']
|
||||
|
||||
# If set to true, Kibana will use the Highlight feature of Elasticsearch to
|
||||
# display highlighted search results
|
||||
Highlight_results = true
|
||||
|
||||
# A field needs to be specified for the highlight feature. By default,
|
||||
# Elasticsearch doesn't allow highlighting on _all because the field has to
|
||||
# be either stored or part of the _source field.
|
||||
Highlighted_field = "message"
|
||||
|
||||
# Make URLs clickable in detailed view
|
||||
Clickable_URLs = true
|
||||
|
||||
# The default operator used if no explicit operator is specified.
|
||||
# For example, with a default operator of OR, the query capital of
|
||||
# Hungary is translated to capital OR of OR Hungary, and with default
|
||||
# operator of AND, the same query is translated to capital AND of AND
|
||||
# Hungary. The default value is OR.
|
||||
Default_operator = 'OR'
|
||||
|
||||
# When using analyze, use this many of the most recent
|
||||
# results for user's query
|
||||
Analyze_limit = 2000
|
||||
|
||||
# Show this many results in analyze/trend/terms/stats modes
|
||||
Analyze_show = 25
|
||||
|
||||
# Show this many results in an rss feed
|
||||
Rss_show = 25
|
||||
|
||||
# Show this many results in an exported file
|
||||
Export_show = 2000
|
||||
|
||||
# Delimit exported file fields with what?
|
||||
# You may want to change this to something like "\t" (tab) if you have
|
||||
# commas in your logs
|
||||
Export_delimiter = ","
|
||||
|
||||
# You may wish to insert a default search which all user searches
|
||||
# must match. For example @source_host:www1 might only show results
|
||||
# from www1.
|
||||
Filter = ''
|
||||
|
||||
# When searching, Kibana will attempt to only search indices
|
||||
# that match your timeframe, to make searches faster. You can
|
||||
# turn this behavior off if you use something other than daily
|
||||
# indexing
|
||||
Smart_index = true
|
||||
|
||||
# You can define your custom pattern here for index names if you
|
||||
# use something other than daily indexing. Pattern needs to have
|
||||
# date formatting like '%Y.%m.%d'. Will accept an array of smart
|
||||
# indexes.
|
||||
# Smart_index_pattern = ['logstash-web-%Y.%m.%d', 'logstash-mail-%Y.%m.%d']
|
||||
Smart_index_pattern = 'logstash-%Y.%m.%d'
|
||||
|
||||
# Number of seconds between each index. 86400 = 1 day.
|
||||
Smart_index_step = 86400
|
||||
|
||||
# ElasticSearch has a default limit on URL size for REST calls,
|
||||
# so Kibana will fall back to _all if a search spans too many
|
||||
# indices. Use this to set that 'too many' number. By default this
|
||||
# is set really high, ES might not like this
|
||||
Smart_index_limit = 150
|
||||
|
||||
# Elasticsearch has an internal mechanism called "faceting" for performing
|
||||
# analysis that we use for the "Stats" and "Terms" modes. However, on large
|
||||
# data sets/queries facetting can cause ES to crash if there isn't enough
|
||||
# memory available. It is suggested that you limit the number of indices that
|
||||
# Kibana will use for the "Stats" and "Terms" to prevent ES crashes. For very
|
||||
# large data sets and undersized ES clusers, a limit of 1 is not unreasonable.
|
||||
# Default is 0 (unlimited)
|
||||
Facet_index_limit = 1
|
||||
|
||||
# You probably don't want to touch anything below this line
|
||||
# unless you really know what you're doing
|
||||
|
||||
# Primary field. By default Elastic Search has a special
|
||||
# field called _all that is searched when no field is specified.
|
||||
# Dropping _all can reduce index size significantly. If you do that
|
||||
# you'll need to change primary_field to be '@message'
|
||||
Primary_field = 'message'
|
||||
|
||||
# Default Elastic Search index to query
|
||||
Default_index = 'message'
|
||||
|
||||
# TODO: This isn't functional yet
|
||||
# Prevent wildcard search terms which result in extremely slow queries
|
||||
# See: http:#www.elasticsearch.org/guide/reference/query-dsl/wildcard-query.html
|
||||
Disable_fullscan = false
|
||||
|
||||
# Set headers to allow kibana to be loaded in an iframe from a different origin.
|
||||
Allow_iframed = false
|
||||
|
||||
# Use this interval as fallback.
|
||||
Fallback_interval = 900
|
||||
end
|
@ -1,44 +0,0 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName <%= @vhost_name %>
|
||||
ServerAdmin <%= scope.lookupvar('::kibana::js::serveradmin') %>
|
||||
<% if @serveraliases.is_a? Array %>
|
||||
<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
|
||||
<% elsif ! ['', nil].include?(@serveraliases) %>
|
||||
<%= " ServerAlias #{@serveraliases}" %>
|
||||
<% end %>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-error.log
|
||||
|
||||
LogLevel warn
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
|
||||
|
||||
<IfModule mod_proxy.c>
|
||||
# Proxy GETs for elasticsearch .*/_aliases, .*/_status, .*/_search,
|
||||
# .*/_mapping, .*/_mapping/field/.*, _cluster/health, _cluster/state/.*,
|
||||
# _nodes. and _nodes/stats
|
||||
# These GETs allow read-only access for kibana3, elasticsearch-head, and bigdesk,
|
||||
# as well as arbitrary searches using the elasticsearch search api.
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} GET
|
||||
RewriteRule ^<%= scope.lookupvar('::kibana::js::elasticsearch_prefix') %>((.*/)?_aliases|(.*/)?_status|(.*/)?_search|(.*/)?_mapping(/field(/.*)?)?|_cluster/(health|state(/.*)?)|_nodes(/stats)?)$ <%= scope.lookupvar('::kibana::js::elasticsearch_url') %>/$1 [P]
|
||||
RewriteCond %{REQUEST_METHOD} POST
|
||||
RewriteRule ^<%= scope.lookupvar('::kibana::js::elasticsearch_prefix') %>(_aliases|(.*/)?_search)$ <%= scope.lookupvar('::kibana::js::elasticsearch_url') %>/$1 [P]
|
||||
RewriteCond %{REQUEST_METHOD} OPTIONS
|
||||
RewriteRule ^<%= scope.lookupvar('::kibana::js::elasticsearch_prefix') %>((.*/)?_search)$ <%= scope.lookupvar('::kibana::js::elasticsearch_url') %>/$1 [P]
|
||||
<Proxy <%= scope.lookupvar('::kibana::js::elasticsearch_url') %>/>
|
||||
ProxySet connectiontimeout=<%= scope.lookupvar('::kibana::js::vhost_proxy_connect_timeout') %> timeout=<%= scope.lookupvar('::kibana::js::vhost_proxy_timeout') %>
|
||||
</Proxy>
|
||||
ProxyPassReverse <%= scope.lookupvar('::kibana::js::elasticsearch_prefix') %> <%= scope.lookupvar('::kibana::js::elasticsearch_url') %>/
|
||||
</IfModule>
|
||||
|
||||
DocumentRoot <%= @docroot %>
|
||||
<Directory <%= @docroot %>>
|
||||
Options -Multiviews
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
|
Loading…
x
Reference in New Issue
Block a user