Commit graph

7 commits

Author SHA1 Message Date
Thomas Draebing 517332653f Disable PodSecurityPolicies by default to support Kubernetes 1.25+
PodSecurityPolicies were removed in favour of Pod security standards
that are configured on a cluster or namespace level [1].

[1] https://kubernetes.io/blog/2022/08/25/pod-security-admission-stable/

Change-Id: Ia1e55c09bfad30fd209e96b3eddbda339edc31aa
2023-07-12 12:58:29 +00:00
Thomas Draebing 3b4005a047 Sort monitoring and logging components into sub-maps in the config
This is done in preparation to allow multiple logging stacks.

Change-Id: I950200805ec01851bfdf6ccc3a5243893a947616
2020-05-27 16:30:33 +02:00
Thomas Draebing eb4e6ea191 Use object store to store chunks created by Loki
The chunks created by Loki were stored in a persistent volume. This
does not scale well, since volumes cannot easily be resized in
Kubernetes. Also, at least the ext4-filesystem had issues, when large
numbers of logs were saved. These issues are due to the dir_index as
discussed in [1].

An object store provides a more scalable and cheaper solution. Loki
supports S3 as an object storage and also other object stores that
understand the S3 API like Ceph or OpenStack Swift.

[1] https://github.com/grafana/loki/issues/1502

Change-Id: Id55095c3b6659f40708712c1a494753dbcab7686
2020-03-24 16:01:34 +01:00
Thomas Draebing ab26ebb833 Increase the chunk_retain_period to 15 minutes
This increases the time a chunk has to be filled before being flushed.
With shorter times, it could happen that during times of low traffic
chunks will not be filled completely before being flushed. This would
lead to small chunk objects, which is inefficient.

Change-Id: I74b2af1a053c8d4298b9e9d7ffca04cb9d8926bd
2020-03-23 11:41:01 +01:00
Thomas Draebing 8b308e2973 Set resource limit for Loki pods
So far, there were no limits to the resources the Loki pod was allowed
to use. This now sets limits that in my observation for now seem to
work. With handling more and more logs, these limits will probably have
to be increased.

Change-Id: I7313488a60da8a1fff28666870549f748400735a
2020-03-17 14:48:52 +01:00
Thomas Draebing 8ab8153f8e Increase number of allowed requests per log parser
The default limit of requests accepted by Loki from a single host was
set to 10000, which is not enough for a large Gerrit instance to push
all httpd/sshd-logs to Loki.

Change-Id: I94cb56e00102170ae4ed10e90123a8885e3aad00
2020-03-17 09:09:51 +01:00
Thomas Draebing be862d863e Move internal project to open source
This change adds the current status of a project that aims to create
a simple monitoring setup to monitor Gerrit servers, which was developed
internally at SAP.

The project provides an opinionated and basic configuration for helm
charts that can be used to install Loki, Prometheus and Grafana on a
Kubernetes cluster. Scripts to easily apply the configuration and
install the whole setup are provided as well.

The contributions so far were done by (with number of commits)

  80  Thomas Draebing
  11  Matthias Sohn
   2  Saša Živkov

Change-Id: I8045780446edfb3c0dc8287b8f494505e338e066
2020-03-11 15:23:19 +01:00