Commit Graph

22 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 f326d9af28 Install logstash 2.0
This makes a whole host of changes. First we install logstash from the
deb packages that are now available. This package sets up the logstash
user, group, logrotate for log files, a conf.d dir, and an init script
for a service for us. This means all of that stuff can be removed from
puppet and be provided by the package instead.

In addition to cleanup related to the package we remove things that no
longer make sense with newer logstash. There is no more logstash web
service for example use kibana instead. Also the distinction between
agent and indexer is no longer strong and logstash has a separate
shipper tool which should be used in place of the agent (though backward
compat for the agent class is preserved by setting it up as an indexer
using an agent config).

Depends-On: I2354fbe9d3ab25134c52bfe58f562dfdf9ff6786
Change-Id: If3fa423a80a03d09993e58f6d68a3a212b457468
2016-03-10 09:24:45 -08:00
Clark Boylan dae3541847 Start logstash indexer service after networking
We need networking to be up before the indexer service starts or it dies
a quiet death.

Change-Id: Ic32196c59f8c418c9a29ccdd35706f2d4c87eb67
2015-03-05 11:01:03 -08:00
Isaias Piña 0a11722253 Watchdog class will not be installed in logstash_worker class anymore
Change-Id: I68b48fd26eae73775d2e5200acd29dc1c375047e
2014-09-04 20:49:02 -05:00
Clark Boylan 0aa8a50910 Actually restart services in logstash watchdog
Give full rooted paths to stop and start so that the executables are
found resulting in service restarts.

Change-Id: I4f2ded0a57c9f73b7c5afcbaab5827500cd4467b
2014-03-01 08:47:16 -08:00
Clark Boylan 5236d2b2fe Log logstash watchdog.
Log the activity of the logstash watchdog script so that we can get
numbers on how often this bug occurs and to help debug the script if it
doesn't do what we expect.

Change-Id: Ib12be4e5212c311744f51f0d191323651752731f
2014-02-28 17:01:15 -08:00
Clark Boylan 2e035245c9 Add a simple watchdog for logstash-indexer service
The logstash-indexer services sometimes fall out of the elasticsearch
cluster when it is under heavy load and unable to respond to pings.
Logstash doesn't do anything to reconnect :( so restart the service if a
node detects that it has fallen out of the cluster.

Upstream bug submitted at https://logstash.jira.com/browse/LOGSTASH-1951

Change-Id: I2e7767c5fe20cff279366fec2ddadd7710dbb4a9
2014-02-28 13:53:53 -08:00
Clark Boylan 104adbc825 Fix logstash indexer upstart conf.
A line which should've been a comment in the upstart config for
logstash-indexers lost its '#' make it not a comment and a syntax error.
Make this line a comment again.

Change-Id: Idc4853db68a3ae25bea6ebee80f047cc087457ac
2014-02-27 11:06:52 -08:00
Clark Boylan 5855850235 Incrase heap size for logstash indexers.
The default java heap size is too small for our logstash indexers.
Double it to 2g. Do this by adding an /etc/default/logstash-indexer file
that the upstart configs source if it is present. This required some
tweaks to the upstart configuration to load the defaults properly.

Co-Authored-By: K Jonathan Harker <k.jonathan.harker@hp.com>
Change-Id: I63447f59f3fa6d466a7d275476121fe8339479dc
2014-02-27 10:30:28 -08: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 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 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 501c3e0bf2 Allocate more memory to ElasticSearch indexing.
* modules/logstash/files/elasticsearch.yml: By default ElasticSearch
allocates 10% of its memory space to indexing. Bump this up to 40% to
help ensure indexing does not block on needing more memory.

Change-Id: Ic2b862235c12467213ab9916e7f85d92559efc37
Reviewed-on: https://review.openstack.org/30796
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-05-29 00:33:33 +00:00
Clark Boylan cc0d6205cf Switch to dedicated elasticsearch node.
Switch to a large dedicated elasticsearch node as sharing resources
between logstash, kibana, jenkins-log-pusher, and elasticsearch results
in a constrained environment.

Change-Id: I39e6210f2c577429be2cb38aca09111a0f56f9be
Reviewed-on: https://review.openstack.org/30344
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-05-23 21:37:01 +00:00
Clark Boylan e662dc7514 Upgrade logstash and elasticsearch. Retune ES.
Upgrade logstash to 1.1.12. Upgrade elasticsearch to 0.20.5 (the version
corresponding to logstash 1.1.12). Go back to default elasticsearch
shard and replica counts.

Change-Id: I8e5497442e918f78677335ec29d03542c93734e5
Reviewed-on: https://review.openstack.org/29447
Reviewed-by: Elizabeth Krumbach Joseph <lyz@princessleia.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-05-17 19:15:53 +00:00
Clark Boylan 12a6d983a1 Further elasticsearch config tweaks.
* modules/logstash/files/elasticsearch.yml: Set the number of
elasticsearch shards to 1 and the number of replicas to 0 as we are
not running a cluster, just a single node.

* modules/openstack_project/manifests/logstash.pp: Update elasticsearch
indice optimization cron job's max_num_segments value from 1 to 2.

These options are suggested at
https://github.com/logstash/logstash/wiki/Elasticsearch-Storage-Optimization

Change-Id: I747ab8952f0102ba582e213407909aaeebcf2778
Reviewed-on: https://review.openstack.org/28616
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-05-10 16:45:30 +00:00
Clark Boylan ab1cec255c Fix elasticsearch mapping path and content.
* modules/logstash/manifests/elasticsearch.pp: The file name for the
default elasticsearch mapping is default-mapping.json not
default_mapping.json. Fix this path.

* modules/logstash/files/elasticsearch.mapping.json: Add a missing
comma.

Change-Id: I36bbe6e125157b97f3333f383a8949b2a6b3ef5c
Reviewed-on: https://review.openstack.org/28484
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-05-08 18:39:34 +00:00
K Jonathan Harker 2594d16c6b Add a default_mapping to elasticsearch.
* Don't store or index `_all`.
* Compress `_source` (which is stored but not indexed by default).
* Create a dynamic template for the string type.
* Only analyze the index of `@message` strings.

This is a very rudimentary config, and should probably be expanded
on by someone who has a deeper understanding of elasticsearch.

Change-Id: I14052c48c7bb6f05e259615a5203dc1ad87a08af
Reviewed-on: https://review.openstack.org/28216
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jesse Keating <jesse.keating@rackspace.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-05-04 12:36:12 +00:00
Clark Boylan 4b1d2cf531 Give elasticsearch more heap memory.
* modules/logstash/files/elasticseach.default: Elasticsearch does not
handle running out of memory very gracefully. Recommended allocation is
half of the hosts memory. Give elasticsearch 4GB of the 8GB host.

* modules/logstash/manifests/elasticseach.pp: Copy new elasticsearch
defaults file into place on the host.

Change-Id: I9ed14148c901cd3fd4ec38333a722821adb77ff5
Reviewed-on: https://review.openstack.org/27870
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-05-01 00:28:02 +00:00
Clark Boylan ec62d5a2fe Compress elasticsearch stored fields.
Configure elasticsearch to compress stored fields and the term vector.

Change-Id: Ic7f40e18fc950056abd84e083b5d9abb69e38dbe
Reviewed-on: https://review.openstack.org/21138
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-02-14 21:43:15 +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