Commit 77ee1210 authored by Owais Razi Uddin's avatar Owais Razi Uddin

updating sprinboot dashboard

parent 26478e4e
Pipeline #4434 passed with stages
in 7 seconds
......@@ -12,24 +12,23 @@ local gaugePanel = grafana.gaugePanel;
local graphPanel = grafana.graphPanel;
local template_cmn = import '../common/datasource_common.libsonnet';
local steps = [
{color: 'green', value: 0, op: 'gt'},
{color: 'orange', value: 52428800, op: 'gt'},
{color: 'red', value: 419430400, op: 'gt'},
];
local steps = [
{ color: 'green', value: 0, op: 'gt' },
{ color: 'orange', value: 52428800, op: 'gt' },
{ color: 'red', value: 419430400, op: 'gt' },
];
local steps_1 = [
{color: 'green', value: 0, op: 'gt'},
{color: 'orange', value: 21474836480, op: 'gt'},
{color: 'red', value: 42949672960, op: 'gt'},
];
local steps_1 = [
{ color: 'green', value: 0, op: 'gt' },
{ color: 'orange', value: 21474836480, op: 'gt' },
{ color: 'red', value: 42949672960, op: 'gt' },
];
local steps_2 = [
{color: 'green', value: 10, text: 'High'},
{color: 'green', value: 20, text: 'Low', },
];
local steps_2 = [
{ color: 'green', value: 10, text: 'High' },
{ color: 'green', value: 20, text: 'Low' },
];
grafana.dashboard.new(
'SpringBoot App Dashboard',
......@@ -41,7 +40,7 @@ grafana.dashboard.new(
)
.addTemplate(
template_cmn.dataSourceTemplate
)
)
.addTemplate(
template.new(
'instance',
......@@ -69,7 +68,7 @@ grafana.dashboard.new(
)
).addRow(
row.new(
'Performance Stats',
'Performance Stats',
)
.addPanel(
graphPanel.new(
......@@ -94,8 +93,8 @@ grafana.dashboard.new(
datasource='Prometheus',
)
),
gridPos = { h: 5, w: 30, x: 0, y: 0}
).addPanel(
gridPos={ h: 5, w: 30, x: 0, y: 0 }
).addPanel(
graphPanel.new(
'System Load',
span=6,
......@@ -118,242 +117,126 @@ grafana.dashboard.new(
datasource='Prometheus',
)
),
gridPos = { h: 5, w: 30, x: 0, y: 0}
)
).addRow(
row.new(
'Thread Information',
).addPanel(
grafana.statPanel.new('Stat Panel representation of Jvm Threads state',
datasource='Prometheus',
allValues=false,
colorMode='background',
reducerFunction='lastNotNull',
graphMode='none'
).addThresholds(steps_2)
.addTarget(
prometheus.target(
hide=false,
expr='jvm_threads_states_threads{job="$job",instance="$instance"}',
legendFormat='{{state}}',
)
),
gridPos={ h: 5, w: 30, x: 0, y: 20 }
).addPanel(
grafana.statPanel.new('JVM Memory Max Bytes',
datasource='Prometheus',
allValues=false,
colorMode='background',
graphMode='none',
unit='bytes'
).addThresholds(steps_2)
.addTarget(
prometheus.target(
hide=false,
expr='jvm_memory_max_bytes{job="$job",instance="$instance"}',
legendFormat='{{id}}',
)
),
gridPos={ h: 5, w: 30, x: 0, y: 20 }
).addPanel(
grafana.statPanel.new('Server Requests Count',
datasource='Prometheus',
allValues=false,
colorMode='background',
graphMode='none',
unit=''
).addThresholds(steps_2)
.addTarget(
prometheus.target(
hide=false,
expr='sum(http_server_requests_seconds_count) by (outcome)',
legendFormat='{{outcome}}',
)
),
gridPos={ h: 5, w: 30, x: 0, y: 20 }
)
).addRow(
row.new(
'Basic Stats',
gridPos={ h: 5, w: 30, x: 0, y: 0 }
)
.addPanel(
singleStat.new(
'Application Up time',
span=4,
prefix='',
format='s',
postfix='',
colorBackground=true,
colorValue=false,
thresholds="10,25",
colors=[
'rgba(237, 129, 40, 0.89)',
'#00FF00',
'green',
]
)
).addRow(
row.new(
'Thread Information',
).addPanel(
grafana.statPanel.new(
'Stat Panel representation of Jvm Threads state',
datasource='Prometheus',
allValues=false,
colorMode='background',
reducerFunction='lastNotNull',
graphMode='none'
).addThresholds(steps_2)
.addTarget(
prometheus.target(
'time()-process_start_time_seconds{env="$env",job="$job",instance="$instance"}',
datasource='Prometheus',
hide=false,
expr='jvm_threads_states_threads{job="$job",instance="$instance"}',
legendFormat='{{state}}',
)
)
).addPanel(gaugePanel.new('Jvm buffer capacity',
datasource='Prometheus',
min=0,
max=1073741824,
unit='bytes',
showThresholdLabels=false,
showThresholdMarkers=true,
transparent=false,
).addThresholds(steps)
.addTarget(
prometheus.target(
expr='max(jvm_buffer_total_capacity_bytes{job="$job",instance="$instance"})',
datasource='Prometheus',
legendFormat='buffer capacity'
)
),
gridPos={ h: 5, w: 30, x: 0, y: 0 }
).addPanel(gaugePanel.new('Jvm Memory Max Bytes',
datasource='Prometheus',
min=0,
max=53687091200,
unit='bytes',
showThresholdLabels=false,
showThresholdMarkers=true,
transparent=false,
).addThresholds(steps_1)
.addTarget(
prometheus.target(
expr='max(jvm_memory_max_bytes{job="$job",instance="$instance"})',
datasource='Prometheus',
legendFormat='buffer capacity'
)
),
gridPos={ h: 15, w: 30, x: 0, y: 0 }
)
)
.addRow(
row.new(
'HikariCP Statistics',
)
.addPanel(
singleStat.new(
'Connection Size',
span=6,
prefix='',
postfix='',
colorBackground=true,
colorValue=false,
thresholds="10,25",
colors=[
'rgba(237, 129, 40, 0.89)',
'#00FF00',
'green',
]
)
),
gridPos={ h: 5, w: 30, x: 0, y: 20 }
).addPanel(
grafana.statPanel.new(
'JVM Memory Max Bytes',
datasource='Prometheus',
allValues=false,
colorMode='background',
graphMode='none',
unit='bytes'
).addThresholds(steps_2)
.addTarget(
prometheus.target(
'hikaricp_connections{env="$env",job="$job",instance="$instance"}',
datasource='Prometheus',
hide=false,
expr='jvm_memory_max_bytes{job="$job",instance="$instance"}',
legendFormat='{{id}}',
)
)
),
gridPos={ h: 5, w: 30, x: 0, y: 20 }
).addPanel(
grafana.statPanel.new(
'Server Requests Count',
datasource='Prometheus',
allValues=false,
colorMode='background',
graphMode='none',
unit=''
).addThresholds(steps_2)
.addTarget(
prometheus.target(
hide=false,
expr='sum(http_server_requests_seconds_count) by (outcome)',
legendFormat='{{outcome}}',
)
),
gridPos={ h: 5, w: 30, x: 0, y: 20 }
)
).addRow(
row.new(
'Basic Stats',
)
.addPanel(
.addPanel(
singleStat.new(
'Connection Timeout Count',
span=6,
'Application Up time',
span=4,
prefix='',
format='s',
postfix='',
colorBackground=true,
colorValue=false,
thresholds="10,25",
thresholds='10,25',
colors=[
'rgba(237, 129, 40, 0.89)',
'#00FF00',
'green',
]
)
.addTarget(
prometheus.target(
'hikaricp_connections_timeout_total{env="$env",job="$job",instance="$instance"}',
datasource='Prometheus',
)
)
)
.addPanel(
graphPanel.new(
'Connection Creation Time',
span=4,
fill=1,
min=0,
format='s',
legend_values=true,
legend_min=true,
legend_max=true,
legend_current=true,
legend_total=false,
legend_avg=true,
legend_alignAsTable=true,
'rgba(237, 129, 40, 0.89)',
'#00FF00',
'green',
]
)
.addTarget(
prometheus.target(
'hikaricp_connections_creation_seconds_sum/hikaricp_connections_creation_seconds_count',
legendFormat='Connection Creation Time',
'time()-process_start_time_seconds{env="$env",job="$job",instance="$instance"}',
datasource='Prometheus',
)
),
gridPos = { h: 5, w: 30, x: 0, y: 0}
)
.addPanel(
graphPanel.new(
'Connection Usage Time',
span=4,
fill=1,
).addPanel(
gaugePanel.new(
'Jvm buffer capacity',
datasource='Prometheus',
min=0,
format='s',
legend_values=true,
legend_min=true,
legend_max=true,
legend_current=true,
legend_total=false,
legend_avg=true,
legend_alignAsTable=true,
)
max=1073741824,
unit='bytes',
showThresholdLabels=false,
showThresholdMarkers=true,
transparent=false,
).addThresholds(steps)
.addTarget(
prometheus.target(
'hikaricp_connections_usage_seconds_sum/hikaricp_connections_usage_seconds_count',
legendFormat='Connection Usage Time',
expr='max(jvm_buffer_total_capacity_bytes{job="$job",instance="$instance"})',
datasource='Prometheus',
legendFormat='buffer capacity'
)
),
gridPos = { h: 5, w: 30, x: 0, y: 0}
)
.addPanel(
graphPanel.new(
'Connection Acquire Time',
span=4,
fill=1,
gridPos={ h: 5, w: 30, x: 0, y: 0 }
).addPanel(
gaugePanel.new(
'Jvm Memory Max Bytes',
datasource='Prometheus',
min=0,
format='s',
legend_values=true,
legend_min=true,
legend_max=true,
legend_current=true,
legend_total=false,
legend_avg=true,
legend_alignAsTable=true,
)
max=53687091200,
unit='bytes',
showThresholdLabels=false,
showThresholdMarkers=true,
transparent=false,
).addThresholds(steps_1)
.addTarget(
prometheus.target(
'hikaricp_connections_acquire_seconds_sum/ hikaricp_connections_acquire_seconds_count',
legendFormat='Connection Usage Time',
expr='max(jvm_memory_max_bytes{job="$job",instance="$instance"})',
datasource='Prometheus',
legendFormat='buffer capacity'
)
),
gridPos = { h: 5, w: 30, x: 0, y: 0}
)
)
\ No newline at end of file
gridPos={ h: 15, w: 30, x: 0, y: 0 }
)
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment