Install grafana via helm
grafana.yaml
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Loki
type: loki
--- 48.yaml 2021-11-22 17:17:10.000000000 +0900 | |
+++ 52.yaml 2021-11-22 17:16:53.000000000 +0900 | |
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: | |
annotations: | |
- controller-gen.kubebuilder.io/version: v0.4.1 | |
+ controller-gen.kubebuilder.io/version: v0.6.2 | |
creationTimestamp: null | |
name: alertmanagerconfigs.monitoring.coreos.com |
#!/bin/bash | |
sudo apt update | |
sudo apt install -y build-essential vim curl git gzip unzip apt-transport-https ca-certificates gnupg-agent software-properties-common libssl-dev zlib1g-dev | |
# asdf | |
# https://asdf-vm.com/guide/getting-started.html | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1 | |
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc | |
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc | |
. ~/.bashrc |
# HELP cadvisor_version_info A metric with a constant '1' value labeled by kernel version, OS version, docker version, cadvisor version & cadvisor revision. | |
# TYPE cadvisor_version_info gauge | |
cadvisor_version_info{cadvisorRevision="",cadvisorVersion="",dockerVersion="Unknown",kernelVersion="5.10.47-linuxkit",osVersion="Ubuntu 21.04"} 1 | |
# HELP container_blkio_device_usage_total Blkio Device bytes usage | |
# TYPE container_blkio_device_usage_total counter | |
container_blkio_device_usage_total{container="",device="/dev/vda",id="/",image="",major="254",minor="0",name="",namespace="",operation="Async",pod=""} 8.9628672e+07 1631925974172 | |
container_blkio_device_usage_total{container="",device="/dev/vda",id="/",image="",major="254",minor="0",name="",namespace="",operation="Discard",pod=""} 0 1631925974172 | |
container_blkio_device_usage_total{container="",device="/dev/vda",id="/",image="",major="254",minor="0",name="",namespace="",operation="Read",pod=""} 2.493857792e+10 1631925974172 | |
container_blkio_device_usage_total{contai |
# HELP apiserver_audit_event_total [ALPHA] Counter of audit events generated and sent to the audit backend. | |
# TYPE apiserver_audit_event_total counter | |
apiserver_audit_event_total 0 | |
# HELP apiserver_audit_requests_rejected_total [ALPHA] Counter of apiserver requests rejected due to an error in audit logging backend. | |
# TYPE apiserver_audit_requests_rejected_total counter | |
apiserver_audit_requests_rejected_total 0 | |
# HELP apiserver_client_certificate_expiration_seconds [ALPHA] Distribution of the remaining lifetime on the certificate used to authenticate a request. | |
# TYPE apiserver_client_certificate_expiration_seconds histogram | |
apiserver_client_certificate_expiration_seconds_bucket{le="0"} 0 | |
apiserver_client_certificate_expiration_seconds_bucket{le="1800"} 0 |
# HELP apiserver_audit_event_total [ALPHA] Counter of audit events generated and sent to the audit backend. | |
# TYPE apiserver_audit_event_total counter | |
apiserver_audit_event_total 0 | |
# HELP apiserver_audit_requests_rejected_total [ALPHA] Counter of apiserver requests rejected due to an error in audit logging backend. | |
# TYPE apiserver_audit_requests_rejected_total counter | |
apiserver_audit_requests_rejected_total 0 | |
# HELP apiserver_client_certificate_expiration_seconds [ALPHA] Distribution of the remaining lifetime on the certificate used to authenticate a request. | |
# TYPE apiserver_client_certificate_expiration_seconds histogram | |
apiserver_client_certificate_expiration_seconds_bucket{le="0"} 0 | |
apiserver_client_certificate_expiration_seconds_bucket{le="1800"} 0 |
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles. | |
# TYPE go_gc_duration_seconds summary | |
go_gc_duration_seconds{quantile="0"} 6.1916e-05 | |
go_gc_duration_seconds{quantile="0.25"} 0.000530375 | |
go_gc_duration_seconds{quantile="0.5"} 0.001654042 | |
go_gc_duration_seconds{quantile="0.75"} 0.007034125 | |
go_gc_duration_seconds{quantile="1"} 0.192434791 | |
go_gc_duration_seconds_sum 110.340325737 | |
go_gc_duration_seconds_count 3153 | |
# HELP go_goroutines Number of goroutines that currently exist. |
grafana.yaml
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Loki
type: loki
apiVersion: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
annotations: | |
kubectl.kubernetes.io/last-applied-configuration: | | |
{"apiVersion":"argoproj.io/v1alpha1","kind":"Application","metadata":{"annotations":{},"finalizers":["resources-finalizer.argocd.argoproj.io"],"labels":{"argocd.argoproj.io/instance":"argocd-apps"},"name":"prometheus","namespace":"argocd"},"spec":{"destination":{"namespace":"argocd","server":"https://kubernetes.default.svc"},"project":"default","source":{"path":"manifests/infra/prometheus/overlays/development","repoURL":"https://github.com/cloudnativedaysjp/dreamkast-infra.git","targetRevision":"426-prometheus"},"syncPolicy":{"automated":{"prune":true},"syncOptions":["CreateNamespace=true"]}}} | |
creationTimestamp: "2021-06-19T06:45:58Z" | |
finalizers: | |
- resources-finalizer.argocd.argoproj.io | |
generation: 24 |
level=error ts=2021-06-18T12:31:11.055Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="pkg/mod/k8s.io/client-go@v0.21.0/tools/cache/reflector.go:167: Failed to watch *v1.Pod: failed to list *v1.Pod: pods is forbidden: User \"system:serviceaccount:prometheus:prometheus-k8s\" cannot list resource \"pods\" in API group \"\" in the namespace \"prometheus\"" | |
level=error ts=2021-06-18T12:31:11.147Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="pkg/mod/k8s.io/client-go@v0.21.0/tools/cache/reflector.go:167: Failed to watch *v1.Endpoints: failed to list *v1.Endpoints: endpoints is forbidden: User \"system:serviceaccount:prometheus:prometheus-k8s\" cannot list resource \"endpoints\" in API group \"\" in the namespace \"prometheus\"" | |
level=error ts=2021-06-18T12:31:31.129Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="pkg/mod/k8s.io/client-go@v0.21.0/tools/cache/reflector.go:167: Failed to watch *v1.Service: failed to list *v1.Service: services is forbi |
#!/bin/bash | |
gcloud compute instances create control-plane --zone=europe-west3-c \ | |
--machine-type=e2-medium \ | |
--image=ubuntu-1804-bionic-v20201014 \ | |
--image-project=ubuntu-os-cloud \ | |
--boot-disk-size=50GB |