@blitzm/kubernetes-grafana
v0.3.0
Published
@blitzm/kubernetes-grafana is a pulumi component that simplifies the deployment of kubernetes-grafana in kubernetes. The library is usually combined with `@blitzm/kubernetes-loki` and `@blitzm/kubernetes-prometheus` which are the data source of the monito
Downloads
38
Keywords
Readme
Blitzm Cloud - kubernetes-grafana
@blitzm/kubernetes-grafana is a pulumi component that simplifies the deployment of kubernetes-grafana in kubernetes. The library is usually combined with @blitzm/kubernetes-loki
and @blitzm/kubernetes-prometheus
which are the data source of the monitoring site.
Installation
This package can be installed using npm
npm install --save --save-exact @blitzm/kubernetes-grafana
Usage
import { KubernetesPrometheus } from '@blitzm/kubernetes-prometheus';
import { KubernetesLoki } from '@blitzm/kubernetes-loki';
import { KubernetesGrafana } from '@blitzm/kubernetes-grafana';
const monitoringNamespace = new k8s.core.v1.Namespace(
'monitoring',
{
metadata: {
name: 'monitoring'
}
}, {
provider: cluster.provider,
});
const grafana = new KubernetesGrafana('grafana', {
provider: cluster.provider,
namespace: monitoringNamespace.metadata.name,
ingress: {
hosts: ["monitoring.testcloud.indevelopment.xyz"],
},
datasources: [{
name: 'prometheus',
type: 'prometheus',
url: 'http://prometheus-server.monitoring.svc.cluster.local',
}, {
name: 'loki',
type: 'loki',
url: 'http://loki.monitoring.svc.cluster.local:3100',
}],
persistence: {
enabled: true,
sizeGB: 10,
},
});
const prometheus = new KubernetesPrometheus('prometheus', {
provider: cluster.provider,
namespace: monitoringNamespace.metadata.name,
persistence: {
enabled: true,
sizeGB: 10,
}
});
const loki = new KubernetesLoki('loki', {
provider: cluster.provider,
namespace: monitoringNamespace.metadata.name,
persistence: {
enabled: true,
sizeGB: 10,
}
});
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.