prometheus stack
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
set fallback := true
|
set fallback := true
|
||||||
|
|
||||||
export PROMETHEUS_NAMESPACE := env("PROMETHEUS_NAMESPACE", "prometheus")
|
export PROMETHEUS_NAMESPACE := env("PROMETHEUS_NAMESPACE", "monitoring")
|
||||||
|
#export GRAFANA_HOST := env("GRAFANA_HOST")
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
default:
|
default:
|
||||||
@@ -14,9 +15,22 @@ add-helm-repo:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
@just add-helm-repo
|
@just add-helm-repo
|
||||||
|
|
||||||
|
gomplate -f kube-stack-config-values-gomplate.yaml -o kube-stack-config-values.yaml
|
||||||
|
|
||||||
@helm upgrade --cleanup-on-fail --install kube-prometheus-stack prometheus-community/kube-prometheus-stack \
|
@helm upgrade --cleanup-on-fail --install kube-prometheus-stack prometheus-community/kube-prometheus-stack \
|
||||||
|
--namespace ${PROMETHEUS_NAMESPACE} \
|
||||||
|
--create-namespace \
|
||||||
|
--debug \
|
||||||
--wait \
|
--wait \
|
||||||
-f kube-stack-config-values.yaml
|
-f kube-stack-config-values.yaml
|
||||||
|
|
||||||
|
echo "kubectl port-forward svc/prometheus-grafana 8080:80 -n monitoring"
|
||||||
|
echo "kubectl port-forward svc/prometheus-kube-prometheus-prometheus 9090 -n monitoring"
|
||||||
|
echo "kubectl port-forward svc/prometheus-kube-prometheus-alertmanager 9093 -n monitoring"
|
||||||
|
|
||||||
|
echo "Get Grafana Password:"
|
||||||
|
echo "kubectl get secret --namespace monitoring -l app.kubernetes.io/component=admin-secret -o jsonpath=\"{.items[0].data.admin-password}\" | base64 --decode ; echo"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
helm uninstall kube-prometheus-stack
|
helm uninstall kube-prometheus-stack -n ${PROMETHEUS_NAMESPACE}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
grafana:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: traefik
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
hosts:
|
||||||
|
- {{ .Env.GRAFANA_HOST }}
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .Env.GRAFANA_HOST }}
|
||||||
@@ -1,78 +1,2 @@
|
|||||||
#
|
|
||||||
# Copyright © contributors to CloudNativePG, established as
|
|
||||||
# CloudNativePG a Series of LF Projects, LLC.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
# -- here you can pass the whole values directly to the kube-prometheus-stack chart
|
|
||||||
enabled: true
|
|
||||||
kubeControllerManager:
|
|
||||||
enabled: false
|
|
||||||
nodeExporter:
|
|
||||||
enabled: false
|
|
||||||
defaultRules:
|
|
||||||
create: true
|
|
||||||
rules:
|
|
||||||
alertmanager: false
|
|
||||||
etcd: false
|
|
||||||
configReloaders: false
|
|
||||||
general: false
|
|
||||||
k8s: true
|
|
||||||
kubeApiserver: false
|
|
||||||
kubeApiserverAvailability: false
|
|
||||||
kubeApiserverSlos: false
|
|
||||||
kubelet: true
|
|
||||||
kubeProxy: false
|
|
||||||
kubePrometheusGeneral: false
|
|
||||||
kubePrometheusNodeRecording: false
|
|
||||||
kubernetesApps: false
|
|
||||||
kubernetesResources: false
|
|
||||||
kubernetesStorage: false
|
|
||||||
kubernetesSystem: false
|
|
||||||
kubeScheduler: false
|
|
||||||
kubeStateMetrics: false
|
|
||||||
network: false
|
|
||||||
node: true
|
|
||||||
nodeExporterAlerting: false
|
|
||||||
nodeExporterRecording: true
|
|
||||||
prometheus: false
|
|
||||||
prometheusOperator: false
|
|
||||||
|
|
||||||
#nodeSelector:
|
|
||||||
#workload: monitor
|
|
||||||
prometheus:
|
|
||||||
prometheusSpec:
|
|
||||||
podMonitorSelectorNilUsesHelmValues: false
|
|
||||||
ruleSelectorNilUsesHelmValues: false
|
|
||||||
serviceMonitorSelectorNilUsesHelmValues: false
|
|
||||||
probeSelectorNilUsesHelmValues: false
|
|
||||||
#nodeSelector:
|
|
||||||
#workload: monitor
|
|
||||||
grafana:
|
grafana:
|
||||||
enabled: true
|
enabled: true
|
||||||
# -- the grafana admin password
|
|
||||||
adminPassword: prom-operator
|
|
||||||
defaultDashboardsEnabled: false
|
|
||||||
sidecar:
|
|
||||||
dashboards:
|
|
||||||
enabled: true
|
|
||||||
#nodeSelector:
|
|
||||||
#workload: monitor
|
|
||||||
alertmanager:
|
|
||||||
enabled: true
|
|
||||||
#alertManagerSpec:
|
|
||||||
#nodeSelector:
|
|
||||||
#workload: monitor
|
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ kubectl port-forward svc/prometheus-kube-prometheus-alertmanager 9093 -n monitor
|
|||||||
|
|
||||||
This will make Grafana accessible on http://localhost:8080, Prometheus on http://localhost:9090 and Alert Manager on http://localhost:9093
|
This will make Grafana accessible on http://localhost:8080, Prometheus on http://localhost:9090 and Alert Manager on http://localhost:9093
|
||||||
|
|
||||||
|
Get Grafana Password via:
|
||||||
|
```
|
||||||
|
kubectl get secret --namespace monitoring -l app.kubernetes.io/component=admin-secret -o jsonpath="{.items[0].data.admin-password}" | base64 --decode ; echo
|
||||||
|
```
|
||||||
Login for Grafana:
|
Login for Grafana:
|
||||||
**User:** admin
|
**User:** admin
|
||||||
**Pwd:** prom-operator
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user