Commit Graph

21 Commits

Author SHA1 Message Date
Clark Boylan d82984ddf2 Retire this project
We've shutdown the logstash 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: I2b5d3ac705d246f705b4ef91f12a4895e6854fc1
2022-04-25 09:50:21 -07:00
Clark Boylan 049a6e2b87 Properly support logstash conf.d
Add in proper support for conf.d configs. Create input at 00-input,
output at 99-output, and filters at user specifiable levels in between
using a new defined type for filters.

Co-Authored-By: Jonathan Harker <code@gentlydownthe.net>
Change-Id: Icbca7a6ba0c5a94a273ef158f707311b588483fd
2016-04-29 14:15:29 -07:00
Spencer Krum 14a6ec4c99 Modernize kibana vhost template
In the past it was common to do scope.lookupvar but now it is only
required when explicitly grabbing a different scope. All the
variables in kibana.vhost.erb are available from the class that
calls the template() function.

Change-Id: I100bb764b5742b1f3068e5b86813c825f9f71868
2015-02-11 21:54:00 -08:00
Dmitry Teselkin 4e23de6bcd Fix vhost configuration sections
According to https://wiki.apache.org/httpd/CommonMisconfigurations
is is wrong to specify server name in opening tag. ServerName
should be used instead.

Indentations also fixed in some files.

Change-Id: Id9d20a672103221efa01be61a174b62706036e57
2014-12-18 19:33:01 +03:00
Spencer Krum 9e6126cb0d Logstash: Modifying rewrite rules to allow kibana 3
Change-Id: I57db89c0fa8d9d78bc84ff0f382eab70844778f6
2014-11-15 16:46:07 +00:00
Spencer Krum bf8804e3ac Fixing variable access in logstash module
Change-Id: Ic54a3e0c423e71e4030a92972239a2b145522550
2014-09-11 16:26:22 -07:00
Spencer Krum d3a253c5ed Fixup logstash vhost template to use @global vars
Change-Id: Ie1564aa338bf5f9c2d155da68cdb6cb8a43a9b55
2014-03-13 21:02:58 -07:00
Clark Boylan b1bfbd09da Fix ElasticSearch reverse proxy settings.
* modules/logstash/templates/kibana.vhost.erb: Need to allow POST to
_aliases and _search and OPTIONS to _search. Also fix the ProxySet
settings directive by placing it in a <Proxy> section.

Change-Id: I0bb11b72eec9e8753ed8cf1d5324f411bb574f49
2013-10-16 15:35:38 -07:00
Clark Boylan e0e29aaf44 Proxy ElasticSearch with mod_rewrite.
* modules/logstash/templates/kibana.vhost.erb: Use mod_rewrite to proxy
elasticsearch so that we can safely proxy _mapping. To do this safely we
need to restrict requests to GETs. Also, add _nodes to the list of
proxies URIs.

Change-Id: Ibe86dc104c429c144b31fed547034ee14f7f2e1d
2013-10-16 12:35:13 -07:00
Ryan Lane fdf5c0810e Separate logstash/elasticsearch and verify hash
To allow for reuse of elasticsearch I'm splitting it away from
logstash. Also, I'm doing a hash check of the elasticsearch wget
for better security.

Change-Id: Iff42d538cd941abd50b000879ea4a237ea48d40e
2013-10-15 11:57:51 -07:00
Clark Boylan 4d7a143b34 Increase connection timeout to ES servers.
* modules/logstash/templates/kibana.vhost.erb: Increase the connection
timeout to ElasticSearch when proxying to the limited ES API. This
prevents errors when ElasticSearch is slow due to cold caches.

Change-Id: I066a7c7822a0ae75bda52b9b37ad27bc07bd7e0a
2013-09-13 16:17:04 -07:00
K Jonathan Harker 63d078a56b Poke a hole through the proxy for cluster health
Interesting read-only data on the elasticsearch cluster can be found at
_cluster/health, this opens that url in the apache reverse proxy so that
we can see the health of the cluster.

Change-Id: I8d7a2eeec1f02aaa78af5f348b1ae91af76f522d
2013-09-06 21:38:48 +00:00
Clark Boylan d137f62f89 Add sixth elasticsearch node.
* manifests/site.pp: Put elasticsearch nodes in a list variable that is
reused.

* modules/logstash/templates/elasticsearch.yml.erb: Update cluster
settings to be more appropriate for the larger cluster size, including
changing the minimum number of master eligible nodes that must be seen
before becoming operational in a cluster. Should help prevent split
brained clusters.

* modules/openstack_project/manifests/cacti.pp: Add new node to cacti
node list.

Change-Id: I9a18422aa56a56b9ad030892a312772d9b6b2a79
2013-08-02 13:22:47 -07:00
Clark Boylan 3a0f518d52 Tune ElasticSearch settings.
* modules/logstash/templates/elasticsearch.yml.erb:
Give 33% of memory to indexing instead of 40%.

* modules/logstash/files/es-logstash-template.json:
Flush the translog every 50k operations instead of the default 5k
(we can do 5k ops every second or two so the flushing was happening too
often). Limit the total number of shards per index per node to 3. We
have 5 nodes and 10 shards per index, 5*3 > 10 so we should be fine.
Set the field cache to soft type so that its entries can be garbage
collected in memory constricted situations.

* modules/logstash/manifests/elasticsearch.pp:
Apply es-logstash-template.json to the elasticsearch servers.

Change-Id: I2337fc41998fd00e090b0acfd29f007dfb6ec8df
2013-07-19 16:11:49 -07:00
Clark Boylan 7805734dcb Add two more elasticsearch nodes.
* manifests/site.pp: List the two new elasticsearch nodes in the
appropriate lists.

* modules/logstash/manifests/elasticsearch.pp: Do not restart
elasticsearch when config files change. Service restarts are costly and
should be manually performed when necessary. Otherwise puppet should
simply update the config files.

* modules/logstash/templates/elasticsearch.yml.erb: Update elasticsearch
config with new cluster topology. Increase memory available for
indexing.

* modules/openstack_project/manifests/cacti.pp: Add new nodes to cacti
monitoring list.

Adding two more elasticsearch nodes to relieve memory pressure (more
nodes means fewer indexes per nodes which requires less memory to
manage). And two more nodes gives us more disk to retain older indexes
in. These new nodes should allow us to retain at least 3 weeks of
indexed logs.

Change-Id: I3a5a02311e939c8147e401110c7b96d085eb8274
Reviewed-on: https://review.openstack.org/36305
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-07-09 18:40:21 +00:00
Clark Boylan 968cfa9d24 Better elasticsearch proxy settings.
* modules/logstash/templates/kibana.vhost.erb: Set proxy timeouts and
allow /_status and /_search.

Change-Id: I67f6152bcda5999a27fef07c8428ac12d3a0201c
Reviewed-on: https://review.openstack.org/34252
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-07-01 17:49:25 +00:00
Clark Boylan 3ef10e90ed Better elasticsearch cluster settings.
Use mutliple discover nodes to determine elasticsearch cluster
membership. Put a timeout on recovery starting instead of the default
to recovery immediately. Describe cluster topology in elasticsearch yaml
config so that it can make smarter decisions. Round robin kibana
requests across each discover node.

Change-Id: I08ef9dd158ddf6a6ce01dfb2050626f543d45b10
Reviewed-on: https://review.openstack.org/34106
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-07-01 17:49:09 +00:00
Clark Boylan 6c33ba3b70 Add support for elasticsearch cluster.
We need to expand our elasticsearch install base. Update puppet to make
this possible.

Change-Id: Id0dae839b12ebf47715cf40a363832e0f661a94f
Reviewed-on: https://review.openstack.org/33910
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-07-01 17:48:16 +00:00
Clark Boylan 60934a5cdd Reverse proxy subset of elasticsearch API.
It has been requested that we provide programmatic access to the
elasticsearch API in addition to the Kibana web UI. Do this by reverse
proxying http://logstash.openstack.org/elasticearch/$API_REQUEST to
http://elasticsearch.openstack.org:9200/$API_REQUEST.

The only values for $API_REQUEST that will be passed through are
_aliases, _status, and _search.

Change-Id: Ib41f6d91e2e59d493218074a67155af450ec8c93
Reviewed-on: https://review.openstack.org/33316
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-06-18 19:01:18 +00:00
K Jonathan Harker 6d5bc62b64 Use kibana as the web frontend to logstash.
Add a kibana module that installs kibana and flat configuration files,
and also disables the previous boring bland web frontend.

Change-Id: I772c66f07d2bc3a88128e101074be9d4162e3f8a
Reviewed-on: https://review.openstack.org/27089
Reviewed-by: Jesse Keating <jesse.keating@rackspace.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-04-25 20:45:19 +00:00
Clark Boylan 4ca0838652 Add skeleton logstash module.
This new logstash module adds classes to install logstash agents and
indexers as well as redis and elasticsearch. The configuration for each
of these services is rudimentary but it shouldn't be difficult to expand
the configs and make them useful.

Also, add a logstash.openstack.org node that will have an agent,
indexer, web frontend, redis, and elasticsearch installed on it.

Change-Id: I25b635f088f99d45cfaa70ed122c6433d3784937
Reviewed-on: https://review.openstack.org/19871
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-01-29 20:44:09 +00:00