Skip to content

Commit

Permalink
feat: added service monitor support for graylog chart and bumped the …
Browse files Browse the repository at this point in the history
…version and added releavent info in the readme file (#123)
  • Loading branch information
ashish1099 authored Aug 4, 2022
1 parent 348e7c1 commit 6564595
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/graylog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: graylog
home: https://www.graylog.org
version: 2.1.3
version: 2.1.4
appVersion: 4.2.7
description: Graylog is the centralized log management solution built to open standards for capturing, storing, and enabling real-time analysis of terabytes of machine data.
keywords:
Expand Down
10 changes: 7 additions & 3 deletions charts/graylog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ The following table lists the configurable parameters of the Graylog chart and t
| Parameter | Description | Default |
|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------|
| `graylog.image.repository` | `graylog` image repository | `graylog/graylog` |
| `graylog.image.tag` | `graylog` image tag | `4.2.7-1` |
| `graylog.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `graylog.image.tag` | `graylog` image tag | `4.2.7-1` |
| `graylog.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `graylog.replicas` | The number of Graylog instances in the cluster. The chart will automatic create assign master to one of replicas | `2` |
| `graylog.resources` | CPU/Memory resource requests/limits | Memory: `1024Mi`, CPU: `500m` |
| `graylog.heapSize` | Override Java heap size. If this value empty, chart will allocate heap size using `-XX:+UseCGroupMemoryLimitForHeap` | |
Expand Down Expand Up @@ -161,9 +161,13 @@ The following table lists the configurable parameters of the Graylog chart and t
| `graylog.input.tcp.service.name` | Graylog TCP Input service name | `graylog-tcp` |
| `graylog.input.udp.service.name` | Graylog UDP Input service name | `graylog-udp` |
| `graylog.metrics.enabled` | If true, add Prometheus annotations to pods | `false` |
| `graylog.metrics.serviceMonitor.enabled` | If true, a ServiceMonitor resource for the prometheus-operator is created | `false` |
| `graylog.metrics.serviceMonitor.additionalLabels` | ServiceMonitor additional Labels | `false` |
| `graylog.metrics.serviceMonitor.scrapeTimeout` | ServiceMonitor Timeout for scraping | `false` |
| `graylog.metrics.serviceMonitor.interval` | ServiceMonitor Interval at which Prometheus scrapes metrics | `false` |
| `graylog.geoip.enabled` | If true, Maxmind Geoip Lite will be installed to ${GRAYLOG_HOME}/etc/GeoLite2-City.mmdb | `false` |
| `graylog.geoip.mmdbUri` | If set and geoip enabled, Maxmind Geoip Lite will be installed from the URL you have defined to ${GRAYLOG_HOME}/etc/GeoLite2-City.mmdb | |
| `graylog.plugins.locations` | A list of Graylog installation plugins | `[]` |
| `graylog.plugins.locations` | A list of Graylog installation plugins | `[]` |
| `graylog.plugins.proxy.enabled` | If true, configure a proxy server to download the plugins | `false` |
| `graylog.plugins.proxy.host` | The proxy server that should be used to download the plugins | `http://your.proxy.host:8080` |
| `graylog.rootUsername` | Graylog root user name | `admin` |
Expand Down
29 changes: 29 additions & 0 deletions charts/graylog/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if (and .Values.graylog.metrics.enabled .Values.graylog.metrics.serviceMonitor.enabled) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "graylog.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "graylog.fullname" . }}-coredns
{{- if .Values.graylog.metrics.serviceMonitor.additionalLabels }}
{{ toYaml .Values.graylog.metrics.serviceMonitor.additionalLabels | indent 4 }}
{{- end }}
spec:
endpoints:
- port: 9833
path: /metrics
{{- if .Values.graylog.metrics.serviceMonitor.interval }}
interval: {{ .Values.graylog.metrics.serviceMonitor.interval }}
{{- end }}
{{- if .Values.graylog.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.graylog.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
app: {{ template "graylog.fullname" . }}
release: {{ .Release.Name }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/graylog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ graylog:
## If true, prometheus annotations will be attached
##
enabled: false
serviceMonitor:
enabled: false
additionalLabels: {}
scrapeTimeout: 10s
interval: 10s

geoip:
## If true, Maxmind GeoLite2 will be installed to ${GRAYLOG_HOME}/geoip location
Expand Down

0 comments on commit 6564595

Please sign in to comment.