-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tdg_dashboard: add file connectors section
Add "TDG file connectors statistics" section to TDG dashboard templates. It consists of panels with following metrics: - tdg_connector_input_file_processed_count - tdg_connector_input_file_processed_objects_count - tdg_connector_input_file_failed_count - tdg_connector_input_file_size - tdg_connector_input_file_current_bytes_processed - tdg_connector_input_file_current_processed_objects Part of #134
- Loading branch information
1 parent
c913262
commit 6f07110
Showing
9 changed files
with
1,668 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
local grafana = import 'grafonnet/grafana.libsonnet'; | ||
|
||
local common_utils = import '../common.libsonnet'; | ||
|
||
local influxdb = grafana.influxdb; | ||
local prometheus = grafana.prometheus; | ||
|
||
{ | ||
row:: common_utils.row('TDG file connector statistics'), | ||
|
||
local target( | ||
datasource, | ||
metric_name, | ||
job=null, | ||
policy=null, | ||
measurement=null, | ||
) = | ||
if datasource == '${DS_PROMETHEUS}' then | ||
prometheus.target( | ||
expr=std.format('%s{job=~"%s"}', [metric_name, job]), | ||
legendFormat='{{connector_name}} — {{alias}}', | ||
) | ||
else if datasource == '${DS_INFLUXDB}' then | ||
influxdb.target( | ||
policy=policy, | ||
measurement=measurement, | ||
group_tags=[ | ||
'label_pairs_alias', | ||
'label_pairs_connector_name', | ||
], | ||
alias='$tag_label_pairs_connector_name — $tag_label_pairs_alias', | ||
).where('metric_name', '=', metric_name) | ||
.selectField('value').addConverter('mean'), | ||
|
||
files_processed( | ||
title='Total iles processed', | ||
description=||| | ||
A number of files processed. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
rate_time_range=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
labelY1='files', | ||
decimals=0, | ||
legend_avg=false, | ||
legend_max=false, | ||
).addTarget(target( | ||
datasource, | ||
'tdg_connector_input_file_processed_count', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
objects_processed( | ||
title='Total objects processed', | ||
description=||| | ||
A number of objects processed over all files. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
rate_time_range=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
labelY1='objects per second', | ||
decimals=0, | ||
legend_avg=false, | ||
legend_max=false, | ||
).addTarget(target( | ||
datasource, | ||
'tdg_connector_input_file_processed_objects_count', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
files_process_errors( | ||
title='Files failed to processed', | ||
description=||| | ||
A number of files failed to process. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
labelY1='files', | ||
decimals=0, | ||
legend_avg=false, | ||
legend_max=false, | ||
).addTarget(target( | ||
datasource, | ||
'tdg_connector_input_file_failed_count', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
file_size( | ||
title='Current file size', | ||
description=||| | ||
Current file size. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
format='bytes', | ||
legend_avg=false, | ||
legend_max=false, | ||
).addTarget(target( | ||
datasource, | ||
'tdg_connector_input_file_size', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
current_bytes_processed( | ||
title='Current file bytes processed', | ||
description=||| | ||
Processed bytes count from the current file. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
format='bytes', | ||
legend_avg=false, | ||
legend_max=false, | ||
).addTarget(target( | ||
datasource, | ||
'tdg_connector_input_file_current_bytes_processed', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
current_objects_processed( | ||
title='Current file objects processed', | ||
description=||| | ||
Processed objects count from the current file. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
labelY1='objects', | ||
decimals=0, | ||
legend_avg=false, | ||
legend_max=false, | ||
).addTarget(target( | ||
datasource, | ||
'tdg_connector_input_file_current_processed_objects', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
return { | ||
call = function() | ||
return {id="test_service", nested="test_nested"} | ||
end | ||
} |
Oops, something went wrong.