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; ...@@ -12,24 +12,23 @@ local gaugePanel = grafana.gaugePanel;
local graphPanel = grafana.graphPanel; local graphPanel = grafana.graphPanel;
local template_cmn = import '../common/datasource_common.libsonnet'; local template_cmn = import '../common/datasource_common.libsonnet';
local steps = [ local steps = [
{color: 'green', value: 0, op: 'gt'}, { color: 'green', value: 0, op: 'gt' },
{color: 'orange', value: 52428800, op: 'gt'}, { color: 'orange', value: 52428800, op: 'gt' },
{color: 'red', value: 419430400, op: 'gt'}, { color: 'red', value: 419430400, op: 'gt' },
]; ];
local steps_1 = [ local steps_1 = [
{color: 'green', value: 0, op: 'gt'}, { color: 'green', value: 0, op: 'gt' },
{color: 'orange', value: 21474836480, op: 'gt'}, { color: 'orange', value: 21474836480, op: 'gt' },
{color: 'red', value: 42949672960, op: 'gt'}, { color: 'red', value: 42949672960, op: 'gt' },
]; ];
local steps_2 = [
local steps_2 = [ { color: 'green', value: 10, text: 'High' },
{color: 'green', value: 10, text: 'High'}, { color: 'green', value: 20, text: 'Low' },
{color: 'green', value: 20, text: 'Low', }, ];
];
grafana.dashboard.new( grafana.dashboard.new(
'SpringBoot App Dashboard', 'SpringBoot App Dashboard',
...@@ -41,7 +40,7 @@ grafana.dashboard.new( ...@@ -41,7 +40,7 @@ grafana.dashboard.new(
) )
.addTemplate( .addTemplate(
template_cmn.dataSourceTemplate template_cmn.dataSourceTemplate
) )
.addTemplate( .addTemplate(
template.new( template.new(
'instance', 'instance',
...@@ -69,7 +68,7 @@ grafana.dashboard.new( ...@@ -69,7 +68,7 @@ grafana.dashboard.new(
) )
).addRow( ).addRow(
row.new( row.new(
'Performance Stats', 'Performance Stats',
) )
.addPanel( .addPanel(
graphPanel.new( graphPanel.new(
...@@ -94,8 +93,8 @@ grafana.dashboard.new( ...@@ -94,8 +93,8 @@ grafana.dashboard.new(
datasource='Prometheus', datasource='Prometheus',
) )
), ),
gridPos = { h: 5, w: 30, x: 0, y: 0} gridPos={ h: 5, w: 30, x: 0, y: 0 }
).addPanel( ).addPanel(
graphPanel.new( graphPanel.new(
'System Load', 'System Load',
span=6, span=6,
...@@ -118,242 +117,126 @@ grafana.dashboard.new( ...@@ -118,242 +117,126 @@ grafana.dashboard.new(
datasource='Prometheus', datasource='Prometheus',
) )
), ),
gridPos = { h: 5, w: 30, x: 0, y: 0} 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',
) )
.addPanel( ).addRow(
singleStat.new( row.new(
'Application Up time', 'Thread Information',
span=4, ).addPanel(
prefix='', grafana.statPanel.new(
format='s', 'Stat Panel representation of Jvm Threads state',
postfix='', datasource='Prometheus',
colorBackground=true, allValues=false,
colorValue=false, colorMode='background',
thresholds="10,25", reducerFunction='lastNotNull',
colors=[ graphMode='none'
'rgba(237, 129, 40, 0.89)', ).addThresholds(steps_2)
'#00FF00',
'green',
]
)
.addTarget( .addTarget(
prometheus.target( prometheus.target(
'time()-process_start_time_seconds{env="$env",job="$job",instance="$instance"}', hide=false,
datasource='Prometheus', expr='jvm_threads_states_threads{job="$job",instance="$instance"}',
legendFormat='{{state}}',
) )
) ),
).addPanel(gaugePanel.new('Jvm buffer capacity', gridPos={ h: 5, w: 30, x: 0, y: 20 }
datasource='Prometheus', ).addPanel(
min=0, grafana.statPanel.new(
max=1073741824, 'JVM Memory Max Bytes',
unit='bytes', datasource='Prometheus',
showThresholdLabels=false, allValues=false,
showThresholdMarkers=true, colorMode='background',
transparent=false, graphMode='none',
).addThresholds(steps) unit='bytes'
.addTarget( ).addThresholds(steps_2)
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',
]
)
.addTarget( .addTarget(
prometheus.target( prometheus.target(
'hikaricp_connections{env="$env",job="$job",instance="$instance"}', hide=false,
datasource='Prometheus', 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( singleStat.new(
'Connection Timeout Count', 'Application Up time',
span=6, span=4,
prefix='', prefix='',
format='s',
postfix='', postfix='',
colorBackground=true, colorBackground=true,
colorValue=false, colorValue=false,
thresholds="10,25", thresholds='10,25',
colors=[ colors=[
'rgba(237, 129, 40, 0.89)', 'rgba(237, 129, 40, 0.89)',
'#00FF00', '#00FF00',
'green', '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,
) )
.addTarget( .addTarget(
prometheus.target( prometheus.target(
'hikaricp_connections_creation_seconds_sum/hikaricp_connections_creation_seconds_count', 'time()-process_start_time_seconds{env="$env",job="$job",instance="$instance"}',
legendFormat='Connection Creation Time',
datasource='Prometheus', datasource='Prometheus',
) )
),
gridPos = { h: 5, w: 30, x: 0, y: 0}
) )
.addPanel( ).addPanel(
graphPanel.new( gaugePanel.new(
'Connection Usage Time', 'Jvm buffer capacity',
span=4, datasource='Prometheus',
fill=1,
min=0, min=0,
format='s', max=1073741824,
legend_values=true, unit='bytes',
legend_min=true, showThresholdLabels=false,
legend_max=true, showThresholdMarkers=true,
legend_current=true, transparent=false,
legend_total=false, ).addThresholds(steps)
legend_avg=true,
legend_alignAsTable=true,
)
.addTarget( .addTarget(
prometheus.target( prometheus.target(
'hikaricp_connections_usage_seconds_sum/hikaricp_connections_usage_seconds_count', expr='max(jvm_buffer_total_capacity_bytes{job="$job",instance="$instance"})',
legendFormat='Connection Usage Time',
datasource='Prometheus', datasource='Prometheus',
legendFormat='buffer capacity'
) )
), ),
gridPos = { h: 5, w: 30, x: 0, y: 0} gridPos={ h: 5, w: 30, x: 0, y: 0 }
) ).addPanel(
.addPanel( gaugePanel.new(
graphPanel.new( 'Jvm Memory Max Bytes',
'Connection Acquire Time', datasource='Prometheus',
span=4,
fill=1,
min=0, min=0,
format='s', max=53687091200,
legend_values=true, unit='bytes',
legend_min=true, showThresholdLabels=false,
legend_max=true, showThresholdMarkers=true,
legend_current=true, transparent=false,
legend_total=false, ).addThresholds(steps_1)
legend_avg=true,
legend_alignAsTable=true,
)
.addTarget( .addTarget(
prometheus.target( prometheus.target(
'hikaricp_connections_acquire_seconds_sum/ hikaricp_connections_acquire_seconds_count', expr='max(jvm_memory_max_bytes{job="$job",instance="$instance"})',
legendFormat='Connection Usage Time',
datasource='Prometheus', datasource='Prometheus',
legendFormat='buffer capacity'
) )
), ),
gridPos = { h: 5, w: 30, x: 0, y: 0} gridPos={ h: 15, w: 30, x: 0, y: 0 }
) )
) )
\ No newline at end of file
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