kube-prometheus: Upgrade to grafana v5
This commit is contained in:
@@ -13,7 +13,7 @@ def Dashboard(
|
|||||||
title=title, refresh=None, schemaVersion=14,
|
title=title, refresh=None, schemaVersion=14,
|
||||||
version=version, time=time, timezone='browser', inputs=[
|
version=version, time=time, timezone='browser', inputs=[
|
||||||
{
|
{
|
||||||
'name': 'DS_PROMETHEUS',
|
'name': 'prometheus',
|
||||||
'label': 'prometheus',
|
'label': 'prometheus',
|
||||||
'description': '',
|
'description': '',
|
||||||
'type': 'datasource',
|
'type': 'datasource',
|
||||||
@@ -54,7 +54,7 @@ def SingleStat(
|
|||||||
|
|
||||||
return core.SingleStat(
|
return core.SingleStat(
|
||||||
title=title, id=id, colorValue=colorValue,
|
title=title, id=id, colorValue=colorValue,
|
||||||
dataSource='${DS_PROMETHEUS}', gauge=gauge,
|
dataSource='prometheus', gauge=gauge,
|
||||||
valueFontSize=valueFontSize, thresholds=thresholds,
|
valueFontSize=valueFontSize, thresholds=thresholds,
|
||||||
valueName=valueName, valueMaps=valueMaps, rangeMaps=rangeMaps,
|
valueName=valueName, valueMaps=valueMaps, rangeMaps=rangeMaps,
|
||||||
mappingTypes=mappingTypes, targets=targets,
|
mappingTypes=mappingTypes, targets=targets,
|
||||||
@@ -81,7 +81,7 @@ def Graph(
|
|||||||
return core.Graph(
|
return core.Graph(
|
||||||
id=id, title=title, dashLength=dashLength, dashes=dashes,
|
id=id, title=title, dashLength=dashLength, dashes=dashes,
|
||||||
spaceLength=spaceLength, targets=targets, xAxis=xAxis, yAxes=yAxes,
|
spaceLength=spaceLength, targets=targets, xAxis=xAxis, yAxes=yAxes,
|
||||||
dataSource='${DS_PROMETHEUS}', nullPointMode=nullPointMode, editable=False,
|
dataSource='prometheus', nullPointMode=nullPointMode, editable=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': '.*',
|
'allValue': '.*',
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': False,
|
'includeAll': False,
|
||||||
'label': 'Namespace',
|
'label': 'Namespace',
|
||||||
@@ -34,7 +34,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': None,
|
'allValue': None,
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': False,
|
'includeAll': False,
|
||||||
'label': 'Deployment',
|
'label': 'Deployment',
|
||||||
|
@@ -13,7 +13,7 @@ dashboard = Dashboard(
|
|||||||
timezone='browser',
|
timezone='browser',
|
||||||
inputs=[
|
inputs=[
|
||||||
{
|
{
|
||||||
'name': 'DS_PROMETHEUS',
|
'name': 'prometheus',
|
||||||
'label': 'prometheus',
|
'label': 'prometheus',
|
||||||
'description': '',
|
'description': '',
|
||||||
'type': 'datasource',
|
'type': 'datasource',
|
||||||
@@ -28,7 +28,7 @@ dashboard = Dashboard(
|
|||||||
Graph(
|
Graph(
|
||||||
title='Idle CPU',
|
title='Idle CPU',
|
||||||
id=3,
|
id=3,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
@@ -55,7 +55,7 @@ dashboard = Dashboard(
|
|||||||
Graph(
|
Graph(
|
||||||
title='System Load',
|
title='System Load',
|
||||||
id=9,
|
id=9,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
@@ -102,7 +102,7 @@ dashboard = Dashboard(
|
|||||||
Graph(
|
Graph(
|
||||||
title='Memory Usage',
|
title='Memory Usage',
|
||||||
id=4,
|
id=4,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
@@ -170,7 +170,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Memory Usage',
|
title='Memory Usage',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=5,
|
id=5,
|
||||||
format='percent',
|
format='percent',
|
||||||
span=3,
|
span=3,
|
||||||
@@ -212,7 +212,7 @@ dashboard = Dashboard(
|
|||||||
titleSize='h6', panels=[
|
titleSize='h6', panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Disk I/O',
|
title='Disk I/O',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=6,
|
id=6,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
@@ -267,7 +267,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Disk Space Usage',
|
title='Disk Space Usage',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=12,
|
id=12,
|
||||||
span=3,
|
span=3,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -312,7 +312,7 @@ dashboard = Dashboard(
|
|||||||
titleSize='h6', panels=[
|
titleSize='h6', panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Network Received',
|
title='Network Received',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=8,
|
id=8,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
@@ -346,7 +346,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
Graph(
|
Graph(
|
||||||
title='Network Transmitted',
|
title='Network Transmitted',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=10,
|
id=10,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
@@ -386,7 +386,7 @@ dashboard = Dashboard(
|
|||||||
panels=[
|
panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Cluster Pod Utilization',
|
title='Cluster Pod Utilization',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=11,
|
id=11,
|
||||||
span=9,
|
span=9,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
@@ -421,7 +421,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Pod Utilization',
|
title='Pod Utilization',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=7,
|
id=7,
|
||||||
editable=False,
|
editable=False,
|
||||||
span=3,
|
span=3,
|
||||||
|
@@ -11,7 +11,7 @@ dashboard = Dashboard(
|
|||||||
timezone='browser',
|
timezone='browser',
|
||||||
inputs=[
|
inputs=[
|
||||||
{
|
{
|
||||||
'name': 'DS_PROMETHEUS',
|
'name': 'prometheus',
|
||||||
'label': 'prometheus',
|
'label': 'prometheus',
|
||||||
'description': '',
|
'description': '',
|
||||||
'type': 'datasource',
|
'type': 'datasource',
|
||||||
@@ -26,7 +26,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Control Plane Components Down',
|
title='Control Plane Components Down',
|
||||||
id=1,
|
id=1,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
span=3,
|
span=3,
|
||||||
thresholds='1, 3',
|
thresholds='1, 3',
|
||||||
@@ -76,7 +76,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Alerts Firing',
|
title='Alerts Firing',
|
||||||
id=2,
|
id=2,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
colorValue=True,
|
colorValue=True,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -122,7 +122,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Alerts Pending',
|
title='Alerts Pending',
|
||||||
id=3,
|
id=3,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
colorValue=True,
|
colorValue=True,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -168,7 +168,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Crashlooping Pods',
|
title='Crashlooping Pods',
|
||||||
id=4,
|
id=4,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
colorValue=True,
|
colorValue=True,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -219,7 +219,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Node Not Ready',
|
title='Node Not Ready',
|
||||||
id=5,
|
id=5,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
colorValue=True,
|
colorValue=True,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -265,7 +265,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Node Disk Pressure',
|
title='Node Disk Pressure',
|
||||||
id=6,
|
id=6,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
colorValue=True,
|
colorValue=True,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -311,7 +311,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Node Memory Pressure',
|
title='Node Memory Pressure',
|
||||||
id=7,
|
id=7,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
colorValue=True,
|
colorValue=True,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -357,7 +357,7 @@ dashboard = Dashboard(
|
|||||||
SingleStat(
|
SingleStat(
|
||||||
title='Nodes Unschedulable',
|
title='Nodes Unschedulable',
|
||||||
id=8,
|
id=8,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
gauge=Gauge(),
|
gauge=Gauge(),
|
||||||
colorValue=True,
|
colorValue=True,
|
||||||
editable=False,
|
editable=False,
|
||||||
|
@@ -11,7 +11,7 @@ dashboard = Dashboard(
|
|||||||
editable=False,
|
editable=False,
|
||||||
inputs=[
|
inputs=[
|
||||||
{
|
{
|
||||||
'name': 'DS_PROMETHEUS',
|
'name': 'prometheus',
|
||||||
'label': 'prometheus',
|
'label': 'prometheus',
|
||||||
'description': '',
|
'description': '',
|
||||||
'type': 'datasource',
|
'type': 'datasource',
|
||||||
@@ -25,7 +25,7 @@ dashboard = Dashboard(
|
|||||||
panels=[
|
panels=[
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='API Servers UP',
|
title='API Servers UP',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
format='percent',
|
format='percent',
|
||||||
editable=False,
|
editable=False,
|
||||||
gauge=Gauge(
|
gauge=Gauge(
|
||||||
@@ -76,7 +76,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Controller Managers UP',
|
title='Controller Managers UP',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
format='percent',
|
format='percent',
|
||||||
editable=False,
|
editable=False,
|
||||||
gauge=Gauge(
|
gauge=Gauge(
|
||||||
@@ -128,7 +128,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Schedulers UP',
|
title='Schedulers UP',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
format='percent',
|
format='percent',
|
||||||
editable=False,
|
editable=False,
|
||||||
gauge=Gauge(
|
gauge=Gauge(
|
||||||
@@ -179,7 +179,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='API Server Request Error Rate',
|
title='API Server Request Error Rate',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
format='percent',
|
format='percent',
|
||||||
editable=False,
|
editable=False,
|
||||||
gauge=Gauge(
|
gauge=Gauge(
|
||||||
@@ -234,7 +234,7 @@ dashboard = Dashboard(
|
|||||||
Graph(
|
Graph(
|
||||||
title='API Server Request Latency',
|
title='API Server Request Latency',
|
||||||
id=7,
|
id=7,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
@@ -269,7 +269,7 @@ dashboard = Dashboard(
|
|||||||
Graph(
|
Graph(
|
||||||
title='End to End Scheduling Latency',
|
title='End to End Scheduling Latency',
|
||||||
id=5,
|
id=5,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
@@ -300,7 +300,7 @@ dashboard = Dashboard(
|
|||||||
Graph(
|
Graph(
|
||||||
title='API Server Request Rates',
|
title='API Server Request Rates',
|
||||||
id=6,
|
id=6,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
|
@@ -12,7 +12,7 @@ dashboard = Dashboard(
|
|||||||
timezone='browser',
|
timezone='browser',
|
||||||
inputs=[
|
inputs=[
|
||||||
{
|
{
|
||||||
'name': 'DS_PROMETHEUS',
|
'name': 'prometheus',
|
||||||
'label': 'prometheus',
|
'label': 'prometheus',
|
||||||
'description': '',
|
'description': '',
|
||||||
'type': 'datasource',
|
'type': 'datasource',
|
||||||
@@ -34,7 +34,7 @@ dashboard = Dashboard(
|
|||||||
'community/blob/master/contributors/design-proposals/'
|
'community/blob/master/contributors/design-proposals/'
|
||||||
'node-allocatable.md) is also shown.',
|
'node-allocatable.md) is also shown.',
|
||||||
id=1,
|
id=1,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
@@ -73,7 +73,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='CPU Cores',
|
title='CPU Cores',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=2,
|
id=2,
|
||||||
format='percent',
|
format='percent',
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -117,7 +117,7 @@ dashboard = Dashboard(
|
|||||||
Graph(
|
Graph(
|
||||||
title='Memory',
|
title='Memory',
|
||||||
id=3,
|
id=3,
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
description='This represents the total [memory resource '
|
description='This represents the total [memory resource '
|
||||||
'requests](https://kubernetes.io/docs/concepts/'
|
'requests](https://kubernetes.io/docs/concepts/'
|
||||||
'configuration/manage-compute-resources-container/'
|
'configuration/manage-compute-resources-container/'
|
||||||
@@ -163,7 +163,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Memory',
|
title='Memory',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=4,
|
id=4,
|
||||||
format='percent',
|
format='percent',
|
||||||
span=3,
|
span=3,
|
||||||
|
@@ -14,7 +14,7 @@ dashboard = Dashboard(
|
|||||||
timezone='browser',
|
timezone='browser',
|
||||||
inputs=[
|
inputs=[
|
||||||
{
|
{
|
||||||
'name': 'DS_PROMETHEUS',
|
'name': 'prometheus',
|
||||||
'label': 'prometheus',
|
'label': 'prometheus',
|
||||||
'description': '',
|
'description': '',
|
||||||
'type': 'datasource',
|
'type': 'datasource',
|
||||||
@@ -26,7 +26,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': None,
|
'allValue': None,
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': False,
|
'includeAll': False,
|
||||||
'label': None,
|
'label': None,
|
||||||
@@ -50,7 +50,7 @@ dashboard = Dashboard(
|
|||||||
titleSize='h6', panels=[
|
titleSize='h6', panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Idle CPU',
|
title='Idle CPU',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=3,
|
id=3,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -82,7 +82,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
Graph(
|
Graph(
|
||||||
title='System Load',
|
title='System Load',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=9,
|
id=9,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -129,7 +129,7 @@ dashboard = Dashboard(
|
|||||||
titleSize='h6', panels=[
|
titleSize='h6', panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Memory Usage',
|
title='Memory Usage',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=4,
|
id=4,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -198,7 +198,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Memory Usage',
|
title='Memory Usage',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=5,
|
id=5,
|
||||||
format='percent',
|
format='percent',
|
||||||
gauge=Gauge(show=True),
|
gauge=Gauge(show=True),
|
||||||
@@ -241,7 +241,7 @@ dashboard = Dashboard(
|
|||||||
showTitle=False, panels=[
|
showTitle=False, panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Disk I/O',
|
title='Disk I/O',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=6,
|
id=6,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
@@ -304,7 +304,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
SingleStat(
|
SingleStat(
|
||||||
title='Disk Space Usage',
|
title='Disk Space Usage',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=7,
|
id=7,
|
||||||
thresholds='0.75, 0.9',
|
thresholds='0.75, 0.9',
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -351,7 +351,7 @@ dashboard = Dashboard(
|
|||||||
panels=[
|
panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Network Received',
|
title='Network Received',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=8,
|
id=8,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
@@ -385,7 +385,7 @@ dashboard = Dashboard(
|
|||||||
),
|
),
|
||||||
Graph(
|
Graph(
|
||||||
title='Network Transmitted',
|
title='Network Transmitted',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=10,
|
id=10,
|
||||||
dashLength=10,
|
dashLength=10,
|
||||||
dashes=False,
|
dashes=False,
|
||||||
|
@@ -12,7 +12,7 @@ dashboard = Dashboard(
|
|||||||
timezone='browser',
|
timezone='browser',
|
||||||
inputs=[
|
inputs=[
|
||||||
{
|
{
|
||||||
'name': 'DS_PROMETHEUS',
|
'name': 'prometheus',
|
||||||
'label': 'prometheus',
|
'label': 'prometheus',
|
||||||
'description': '',
|
'description': '',
|
||||||
'type': 'datasource',
|
'type': 'datasource',
|
||||||
@@ -24,7 +24,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': '.*',
|
'allValue': '.*',
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': True,
|
'includeAll': True,
|
||||||
'label': 'Namespace',
|
'label': 'Namespace',
|
||||||
@@ -44,7 +44,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': None,
|
'allValue': None,
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': False,
|
'includeAll': False,
|
||||||
'label': 'Pod',
|
'label': 'Pod',
|
||||||
@@ -65,7 +65,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': '.*',
|
'allValue': '.*',
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': True,
|
'includeAll': True,
|
||||||
'label': 'Container',
|
'label': 'Container',
|
||||||
@@ -90,7 +90,7 @@ dashboard = Dashboard(
|
|||||||
titleSize='h6', panels=[
|
titleSize='h6', panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Memory Usage',
|
title='Memory Usage',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=1,
|
id=1,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -155,7 +155,7 @@ dashboard = Dashboard(
|
|||||||
titleSize='h6', panels=[
|
titleSize='h6', panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='CPU Usage',
|
title='CPU Usage',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=2,
|
id=2,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
@@ -218,7 +218,7 @@ dashboard = Dashboard(
|
|||||||
titleSize='h6', panels=[
|
titleSize='h6', panels=[
|
||||||
Graph(
|
Graph(
|
||||||
title='Network I/O',
|
title='Network I/O',
|
||||||
dataSource='${DS_PROMETHEUS}',
|
dataSource='prometheus',
|
||||||
id=3,
|
id=3,
|
||||||
isNew=False,
|
isNew=False,
|
||||||
editable=False,
|
editable=False,
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"__inputs": [
|
"__inputs": [
|
||||||
{
|
{
|
||||||
"name": "DS_PROMETHEUS",
|
"name": "prometheus",
|
||||||
"label": "prometheus",
|
"label": "prometheus",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "datasource",
|
"type": "datasource",
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
"rgba(237, 129, 40, 0.89)",
|
"rgba(237, 129, 40, 0.89)",
|
||||||
"rgba(50, 172, 45, 0.97)"
|
"rgba(50, 172, 45, 0.97)"
|
||||||
],
|
],
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"format": "none",
|
"format": "none",
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 0,
|
"fill": 0,
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 0,
|
"fill": 0,
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"decimals": null,
|
"decimals": null,
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
@@ -408,7 +408,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 0,
|
"fill": 0,
|
||||||
@@ -497,7 +497,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 0,
|
"fill": 0,
|
||||||
@@ -589,7 +589,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 5,
|
"fill": 5,
|
||||||
@@ -669,7 +669,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 5,
|
"fill": 5,
|
||||||
@@ -749,7 +749,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 0,
|
"fill": 0,
|
||||||
@@ -829,7 +829,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"decimals": null,
|
"decimals": null,
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
@@ -923,7 +923,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 0,
|
"fill": 0,
|
||||||
@@ -1029,7 +1029,7 @@
|
|||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS}",
|
"datasource": "prometheus",
|
||||||
"decimals": 0,
|
"decimals": 0,
|
||||||
"editable": false,
|
"editable": false,
|
||||||
"error": false,
|
"error": false,
|
||||||
|
@@ -13,7 +13,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': '.*',
|
'allValue': '.*',
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': False,
|
'includeAll': False,
|
||||||
'label': 'Namespace',
|
'label': 'Namespace',
|
||||||
@@ -34,7 +34,7 @@ dashboard = Dashboard(
|
|||||||
{
|
{
|
||||||
'allValue': None,
|
'allValue': None,
|
||||||
'current': {},
|
'current': {},
|
||||||
'datasource': '${DS_PROMETHEUS}',
|
'datasource': 'prometheus',
|
||||||
'hide': 0,
|
'hide': 0,
|
||||||
'includeAll': False,
|
'includeAll': False,
|
||||||
'label': 'StatefulSet',
|
'label': 'StatefulSet',
|
||||||
|
@@ -1,15 +1,17 @@
|
|||||||
FROM debian:9.3-slim
|
FROM debian:9.3-slim
|
||||||
|
|
||||||
|
ARG GRAFANA_VERSION
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -qq -y wget tar sqlite && \
|
RUN apt-get update && apt-get install -qq -y wget tar sqlite && \
|
||||||
wget -O /tmp/grafana.tar.gz https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3.linux-x64.tar.gz && \
|
wget -O /tmp/grafana.tar.gz https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-$GRAFANA_VERSION.linux-x64.tar.gz && \
|
||||||
tar -zxvf /tmp/grafana.tar.gz -C /tmp && mv /tmp/grafana-4.6.3 /grafana && \
|
tar -zxvf /tmp/grafana.tar.gz -C /tmp && mv /tmp/grafana-$GRAFANA_VERSION /grafana && \
|
||||||
rm -rf /tmp/grafana.tar.gz
|
rm -rf /tmp/grafana.tar.gz
|
||||||
|
|
||||||
ADD config.toml /grafana/conf/config.toml
|
ADD config.ini /grafana/conf/config.ini
|
||||||
|
|
||||||
USER nobody
|
USER nobody
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
VOLUME [ "/data" ]
|
VOLUME [ "/data" ]
|
||||||
WORKDIR /grafana
|
WORKDIR /grafana
|
||||||
ENTRYPOINT [ "/grafana/bin/grafana-server" ]
|
ENTRYPOINT [ "/grafana/bin/grafana-server" ]
|
||||||
CMD [ "-config=/grafana/conf/config.toml" ]
|
CMD [ "-config=/grafana/conf/config.ini" ]
|
||||||
|
@@ -1,2 +1,5 @@
|
|||||||
|
VERSION=5.0.0-beta1
|
||||||
|
IMAGE_TAG=$(VERSION)
|
||||||
|
|
||||||
container:
|
container:
|
||||||
docker build . -t quay.io/coreos/monitoring-grafana:4.6.3-non-root.1
|
docker build --build-arg GRAFANA_VERSION=$(VERSION) -t quay.io/coreos/monitoring-grafana:$(IMAGE_TAG) .
|
||||||
|
@@ -5,3 +5,12 @@ path = /data/grafana.db
|
|||||||
data = /data
|
data = /data
|
||||||
logs = /data/log
|
logs = /data/log
|
||||||
plugins = /data/plugins
|
plugins = /data/plugins
|
||||||
|
|
||||||
|
[session]
|
||||||
|
provider = memory
|
||||||
|
|
||||||
|
[auth.basic]
|
||||||
|
enabled = false
|
||||||
|
|
||||||
|
[auth.anonymous]
|
||||||
|
enabled = true
|
@@ -70,7 +70,7 @@ DATE_EXEC="$(date "+%Y-%m-%d-%H%M%S")"
|
|||||||
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
TOOL_HOME="$(dirname $BIN_DIR)"
|
TOOL_HOME="$(dirname $BIN_DIR)"
|
||||||
SCRIPT_BASE=`basename $0 | sed "s/\.[Ss][Hh]//"`
|
SCRIPT_BASE=`basename $0 | sed "s/\.[Ss][Hh]//"`
|
||||||
CONFIGMAP_DASHBOARD_PREFIX="grafana-dashboards"
|
CONFIGMAP_DASHBOARD_PREFIX="grafana-dashboard-definitions"
|
||||||
|
|
||||||
TEMPLATES_DIR="$TOOL_HOME/templates"
|
TEMPLATES_DIR="$TOOL_HOME/templates"
|
||||||
DASHBOARD_HEADER_FILE="$TEMPLATES_DIR/dashboard.header"
|
DASHBOARD_HEADER_FILE="$TEMPLATES_DIR/dashboard.header"
|
||||||
@@ -327,7 +327,10 @@ initialize-bin-pack
|
|||||||
bin-pack-files "$(find $DASHBOARDS_DIR -maxdepth 1 -type f -name "*-dashboard.json" | sort)"
|
bin-pack-files "$(find $DASHBOARDS_DIR -maxdepth 1 -type f -name "*-dashboard.json" | sort)"
|
||||||
|
|
||||||
# Continue processing datasources (maintaining the same queue)
|
# Continue processing datasources (maintaining the same queue)
|
||||||
bin-pack-files "$(find $DASHBOARDS_DIR -maxdepth 1 -type f -name "*-datasource.json" | sort )"
|
#
|
||||||
|
# Commented out, as datasources are provisionable by Grafana by default in Grafana v5, but from a separate directory, meaning a separate ConfigMap for us.
|
||||||
|
#
|
||||||
|
# bin-pack-files "$(find $DASHBOARDS_DIR -maxdepth 1 -type f -name "*-datasource.json" | sort )"
|
||||||
|
|
||||||
# Processing remaining data in the queue (or unique)
|
# Processing remaining data in the queue (or unique)
|
||||||
if [ "$to_process" ]; then
|
if [ "$to_process" ]; then
|
||||||
@@ -361,7 +364,7 @@ for (( i=0; i<$total_configmaps_created; i++ )); do
|
|||||||
configmap="$CONFIGMAP_DASHBOARD_PREFIX-$i"
|
configmap="$CONFIGMAP_DASHBOARD_PREFIX-$i"
|
||||||
echo "# Preparing grafana deployment to support configmap: $configmap"
|
echo "# Preparing grafana deployment to support configmap: $configmap"
|
||||||
|
|
||||||
test "$VOLUME_MOUNTS" && VOLUME_MOUNTS="$VOLUME_MOUNTS\n- name: $configmap\n mountPath: /var/$configmap" || VOLUME_MOUNTS="- name: $configmap\n mountPath: /var/$configmap"
|
test "$VOLUME_MOUNTS" && VOLUME_MOUNTS="$VOLUME_MOUNTS\n- name: $configmap\n mountPath: /grafana-dashboard-definitions/$i" || VOLUME_MOUNTS="- name: $configmap\n mountPath: /grafana-dashboard-definitions/$i"
|
||||||
test "$VOLUMES" && VOLUMES="$VOLUMES\n- name: $configmap\n configMap:\n name: $configmap" || VOLUMES="- name: $configmap\n configMap:\n name: $configmap"
|
test "$VOLUMES" && VOLUMES="$VOLUMES\n- name: $configmap\n configMap:\n name: $configmap" || VOLUMES="- name: $configmap\n configMap:\n name: $configmap"
|
||||||
test "$WATCH_DIR" && WATCH_DIR="$WATCH_DIR\n- '--watch-dir=/var/$configmap'" || WATCH_DIR="- '--watch-dir=/var/$configmap'"
|
test "$WATCH_DIR" && WATCH_DIR="$WATCH_DIR\n- '--watch-dir=/var/$configmap'" || WATCH_DIR="- '--watch-dir=/var/$configmap'"
|
||||||
# echo "DEBUG:"
|
# echo "DEBUG:"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-dashboards
|
name: grafana-dashboard-definitions
|
||||||
data:
|
data:
|
||||||
|
@@ -1,11 +0,0 @@
|
|||||||
,
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"name": "DS_PROMETHEUS",
|
|
||||||
"pluginId": "prometheus",
|
|
||||||
"type": "datasource",
|
|
||||||
"value": "prometheus"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"overwrite": true
|
|
||||||
}
|
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
{
|
|
||||||
"dashboard":
|
|
||||||
|
@@ -14,25 +14,15 @@ spec:
|
|||||||
runAsUser: 65534
|
runAsUser: 65534
|
||||||
containers:
|
containers:
|
||||||
- name: grafana
|
- name: grafana
|
||||||
image: quay.io/coreos/monitoring-grafana:4.6.3-non-root.1
|
image: quay.io/coreos/monitoring-grafana:5.0.0-beta1
|
||||||
env:
|
|
||||||
- name: GF_AUTH_BASIC_ENABLED
|
|
||||||
value: "true"
|
|
||||||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
|
||||||
value: "true"
|
|
||||||
- name: GF_SECURITY_ADMIN_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: user
|
|
||||||
- name: GF_SECURITY_ADMIN_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: password
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: grafana-storage
|
- name: grafana-storage
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
- name: grafana-datasources
|
||||||
|
mountPath: /grafana/conf/provisioning/datasources
|
||||||
|
- name: grafana-dashboards
|
||||||
|
mountPath: /grafana/conf/provisioning/dashboards
|
||||||
|
XXX_VOLUME_MOUNTS_XXX
|
||||||
ports:
|
ports:
|
||||||
- name: web
|
- name: web
|
||||||
containerPort: 3000
|
containerPort: 3000
|
||||||
@@ -43,32 +33,13 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
memory: 200Mi
|
memory: 200Mi
|
||||||
cpu: 200m
|
cpu: 200m
|
||||||
- name: grafana-watcher
|
|
||||||
image: quay.io/coreos/grafana-watcher:v0.0.8
|
|
||||||
args:
|
|
||||||
XXX_WATCH_DIR_XXX
|
|
||||||
- '--grafana-url=http://localhost:3000'
|
|
||||||
env:
|
|
||||||
- name: GRAFANA_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: user
|
|
||||||
- name: GRAFANA_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: password
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: "16Mi"
|
|
||||||
cpu: "50m"
|
|
||||||
limits:
|
|
||||||
memory: "32Mi"
|
|
||||||
cpu: "100m"
|
|
||||||
volumeMounts:
|
|
||||||
XXX_VOLUME_MOUNTS_XXX
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: grafana-storage
|
- name: grafana-storage
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: grafana-datasources
|
||||||
|
configMap:
|
||||||
|
name: grafana-datasources
|
||||||
|
- name: grafana-dashboards
|
||||||
|
configMap:
|
||||||
|
name: grafana-dashboards
|
||||||
XXX_VOLUMES_XXX
|
XXX_VOLUMES_XXX
|
||||||
|
@@ -6,7 +6,7 @@ cat <<-EOF
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-dashboards-0
|
name: grafana-dashboard-definitions-0
|
||||||
data:
|
data:
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -37,10 +37,3 @@ do
|
|||||||
hack/scripts/wrap-dashboard.sh $f prometheus-k8s | sed "s/^/ /g"
|
hack/scripts/wrap-dashboard.sh $f prometheus-k8s | sed "s/^/ /g"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for f in assets/grafana/*-datasource.json
|
|
||||||
do
|
|
||||||
cp $f assets/grafana/generated/
|
|
||||||
echo " $(basename $f): |+"
|
|
||||||
cat $f | sed "s/^/ /g"
|
|
||||||
done
|
|
||||||
|
@@ -6,16 +6,16 @@ set +x
|
|||||||
hack/scripts/generate-rules-configmap.sh > manifests/prometheus/prometheus-k8s-rules.yaml
|
hack/scripts/generate-rules-configmap.sh > manifests/prometheus/prometheus-k8s-rules.yaml
|
||||||
|
|
||||||
# Generate Dashboard ConfigMap
|
# Generate Dashboard ConfigMap
|
||||||
hack/scripts/generate-dashboards-configmap.sh > manifests/grafana/grafana-dashboards.yaml
|
hack/scripts/generate-dashboards-configmap.sh > manifests/grafana/grafana-dashboard-definitions.yaml
|
||||||
|
|
||||||
# Generate Dashboard ConfigMap with configmap-generator tool
|
# Generate Dashboard ConfigMap with configmap-generator tool
|
||||||
# Max Size per ConfigMap: 240000
|
# Max Size per ConfigMap: 240000
|
||||||
# Input dir: assets/grafana
|
# Input dir: assets/grafana
|
||||||
# output file: manifests/grafana/grafana-dashboards.yaml
|
# output file: manifests/grafana/grafana-dashboards.yaml
|
||||||
# grafana deployment output file: manifests/grafana/grafana-deployment.yaml
|
# grafana deployment output file: manifests/grafana/grafana-deployment.yaml
|
||||||
test -f manifests/grafana/grafana-dashboards.yaml && rm -f manifests/grafana/grafana-dashboards.yaml
|
test -f manifests/grafana/grafana-dashboards.yaml && rm -f manifests/grafana/grafana-dashboard-definitions.yaml
|
||||||
test -f manifests/grafana/grafana-deployment.yaml && rm -f manifests/grafana/grafana-deployment.yaml
|
test -f manifests/grafana/grafana-deployment.yaml && rm -f manifests/grafana/grafana-deployment.yaml
|
||||||
hack/grafana-dashboards-configmap-generator/bin/grafana_dashboards_generate.sh -s 240000 -i assets/grafana/generated -o manifests/grafana/grafana-dashboards.yaml -g manifests/grafana/grafana-deployment.yaml
|
hack/grafana-dashboards-configmap-generator/bin/grafana_dashboards_generate.sh -s 240000 -i assets/grafana/generated -o manifests/grafana/grafana-dashboard-definitions.yaml -g manifests/grafana/grafana-deployment.yaml
|
||||||
|
|
||||||
# Generate Grafana Credentials Secret
|
# Generate Grafana Credentials Secret
|
||||||
hack/scripts/generate-grafana-credentials-secret.sh admin admin > manifests/grafana/grafana-credentials.yaml
|
hack/scripts/generate-grafana-credentials-secret.sh admin admin > manifests/grafana/grafana-credentials.yaml
|
||||||
|
7360
manifests/grafana/grafana-dashboard-definitions.yaml
Normal file
7360
manifests/grafana/grafana-dashboard-definitions.yaml
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
15
manifests/grafana/grafana-datasources.yaml
Normal file
15
manifests/grafana/grafana-datasources.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: grafana-datasources
|
||||||
|
data:
|
||||||
|
prometheus.yaml: |+
|
||||||
|
datasources:
|
||||||
|
- name: prometheus
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
org_id: 1
|
||||||
|
url: http://prometheus-k8s.monitoring.svc:9090
|
||||||
|
version: 1
|
||||||
|
editable: false
|
||||||
|
|
@@ -14,25 +14,16 @@ spec:
|
|||||||
runAsUser: 65534
|
runAsUser: 65534
|
||||||
containers:
|
containers:
|
||||||
- name: grafana
|
- name: grafana
|
||||||
image: quay.io/coreos/monitoring-grafana:4.6.3-non-root.1
|
image: quay.io/coreos/monitoring-grafana:5.0.0-beta1
|
||||||
env:
|
|
||||||
- name: GF_AUTH_BASIC_ENABLED
|
|
||||||
value: "true"
|
|
||||||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
|
||||||
value: "true"
|
|
||||||
- name: GF_SECURITY_ADMIN_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: user
|
|
||||||
- name: GF_SECURITY_ADMIN_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: password
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: grafana-storage
|
- name: grafana-storage
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
- name: grafana-datasources
|
||||||
|
mountPath: /grafana/conf/provisioning/datasources
|
||||||
|
- name: grafana-dashboards
|
||||||
|
mountPath: /grafana/conf/provisioning/dashboards
|
||||||
|
- name: grafana-dashboard-definitions-0
|
||||||
|
mountPath: /grafana-dashboard-definitions/0
|
||||||
ports:
|
ports:
|
||||||
- name: web
|
- name: web
|
||||||
containerPort: 3000
|
containerPort: 3000
|
||||||
@@ -43,35 +34,15 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
memory: 200Mi
|
memory: 200Mi
|
||||||
cpu: 200m
|
cpu: 200m
|
||||||
- name: grafana-watcher
|
|
||||||
image: quay.io/coreos/grafana-watcher:v0.0.8
|
|
||||||
args:
|
|
||||||
- '--watch-dir=/var/grafana-dashboards-0'
|
|
||||||
- '--grafana-url=http://localhost:3000'
|
|
||||||
env:
|
|
||||||
- name: GRAFANA_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: user
|
|
||||||
- name: GRAFANA_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-credentials
|
|
||||||
key: password
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: "16Mi"
|
|
||||||
cpu: "50m"
|
|
||||||
limits:
|
|
||||||
memory: "32Mi"
|
|
||||||
cpu: "100m"
|
|
||||||
volumeMounts:
|
|
||||||
- name: grafana-dashboards-0
|
|
||||||
mountPath: /var/grafana-dashboards-0
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: grafana-storage
|
- name: grafana-storage
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: grafana-dashboards-0
|
- name: grafana-datasources
|
||||||
configMap:
|
configMap:
|
||||||
name: grafana-dashboards-0
|
name: grafana-datasources
|
||||||
|
- name: grafana-dashboards
|
||||||
|
configMap:
|
||||||
|
name: grafana-dashboards
|
||||||
|
- name: grafana-dashboard-definitions-0
|
||||||
|
configMap:
|
||||||
|
name: grafana-dashboard-definitions-0
|
||||||
|
Reference in New Issue
Block a user