@@ -4,7 +4,6 @@ local timeseries = import 'dashboard/grafana/timeseries.libsonnet';
44local common = import 'dashboard/panels/common.libsonnet' ;
55local variable = import 'dashboard/variable.libsonnet' ;
66
7- local graph = grafana.graphPanel;
87local statPanel = grafana.statPanel;
98local tablePanel = grafana.tablePanel;
109local influxdb = grafana.influxdb;
@@ -406,50 +405,6 @@ local prometheus = grafana.prometheus;
406405 level='critical' ,
407406 ),
408407
409- replication_status(
410- title='Tarantool replication status' ,
411- description=|||
412- `follows` status means replication is running.
413- Otherwise, `not running` is displayed.
414-
415- Panel works with `metrics >= 0.13.0` and Grafana 8.x.
416- ||| ,
417- datasource_type=null ,
418- datasource=null ,
419- policy=null ,
420- measurement=null ,
421- job=null ,
422- alias=null ,
423- ):: timeseries.new(
424- title=title,
425- description=description,
426- datasource=datasource,
427- panel_width=8 ,
428- max=1 ,
429- min=0 ,
430- ).addValueMapping(
431- 1 , 'green' , 'follows'
432- ).addValueMapping(
433- 0 , 'red' , 'not running'
434- ).addRangeMapping(
435- 0.001 , 0.999 , '-'
436- ).addTarget(
437- if datasource_type == variable.datasource_type.prometheus then
438- prometheus.target(
439- expr=std.format ('tnt_replication_status{job=~"%s",alias=~"%s"}' , [job, alias]),
440- legendFormat='{{alias}} {{stream}} ({{id}})' ,
441- )
442- else if datasource_type == variable.datasource_type.influxdb then
443- influxdb.target(
444- policy=policy,
445- measurement=measurement,
446- group_tags=['label_pairs_alias' , 'label_pairs_stream' , 'label_pairs_id' ],
447- alias='$tag_label_pairs_alias $tag_label_pairs_stream ($tag_label_pairs_id)' ,
448- fill='null' ,
449- ).where('metric_name' , '=' , 'tnt_replication_status' ).where('label_pairs_alias' , '=~' , alias)
450- .selectField('value' ).addConverter('last' )
451- ),
452-
453408 failovers_per_second(
454409 title='Failovers triggered' ,
455410 description=|||
@@ -469,7 +424,7 @@ local prometheus = grafana.prometheus;
469424 description=description,
470425 datasource=datasource,
471426 labelY1='failovers per second' ,
472- panel_width=8 ,
427+ panel_width=12 ,
473428 ).addTarget(common.default_rps_target(
474429 datasource_type,
475430 'tnt_cartridge_failover_trigger_total' ,
@@ -498,7 +453,7 @@ local prometheus = grafana.prometheus;
498453 title=title,
499454 description=description,
500455 datasource=datasource,
501- panel_width=8 ,
456+ panel_width=12 ,
502457 max=1 ,
503458 min=0 ,
504459 ).addValueMapping(
@@ -518,87 +473,4 @@ local prometheus = grafana.prometheus;
518473 'last'
519474 )
520475 ),
521-
522- replication_lag(
523- title='Tarantool replication lag' ,
524- description=|||
525- Replication lag value for Tarantool instance.
526-
527- Panel works with `metrics >= 0.13.0`.
528- ||| ,
529- datasource_type=null ,
530- datasource=null ,
531- policy=null ,
532- measurement=null ,
533- job=null ,
534- alias=null ,
535- ):: common.default_graph(
536- title=title,
537- description=description,
538- datasource=datasource,
539- format='s' ,
540- decimals=null ,
541- decimalsY1=null ,
542- legend_avg=false ,
543- min=0 ,
544- panel_width=12 ,
545- ).addTarget(
546- if datasource_type == variable.datasource_type.prometheus then
547- prometheus.target(
548- expr=std.format ('tnt_replication_lag{job=~"%s",alias=~"%s"}' , [job, alias]),
549- legendFormat='{{alias}} ({{id}})' ,
550- )
551- else if datasource_type == variable.datasource_type.influxdb then
552- influxdb.target(
553- policy=policy,
554- measurement=measurement,
555- group_tags=['label_pairs_alias' , 'label_pairs_id' ],
556- alias='$tag_label_pairs_alias ($tag_label_pairs_id)' ,
557- fill='null' ,
558- ).where('metric_name' , '=' , 'tnt_replication_lag' ).where('label_pairs_alias' , '=~' , alias)
559- .selectField('value' ).addConverter('mean' )
560- ),
561-
562- clock_delta(
563- title='Instances clock delta' ,
564- description=|||
565- Clock drift across the cluster.
566- max shows difference with the fastest clock (always positive),
567- min shows difference with the slowest clock (always negative).
568-
569- Panel works with `metrics >= 0.10.0`.
570- ||| ,
571- datasource_type=null ,
572- datasource=null ,
573- policy=null ,
574- measurement=null ,
575- job=null ,
576- alias=null ,
577- ):: common.default_graph(
578- title=title,
579- description=description,
580- datasource=datasource,
581- format='s' ,
582- decimals=null ,
583- decimalsY1=null ,
584- fill=1 ,
585- legend_avg=false ,
586- legend_max=false ,
587- panel_width=12 ,
588- ).addTarget(
589- if datasource_type == variable.datasource_type.prometheus then
590- prometheus.target(
591- expr=std.format ('tnt_clock_delta{job=~"%s",alias=~"%s"}' , [job, alias]),
592- legendFormat='{{alias}} ({{delta}})' ,
593- )
594- else if datasource_type == variable.datasource_type.influxdb then
595- influxdb.target(
596- policy=policy,
597- measurement=measurement,
598- group_tags=['label_pairs_alias' , 'label_pairs_delta' ],
599- alias='$tag_label_pairs_alias ($tag_label_pairs_delta)' ,
600- fill='null' ,
601- ).where('metric_name' , '=' , 'tnt_clock_delta' ).where('label_pairs_alias' , '=~' , alias)
602- .selectField('value' ).addConverter('last' )
603- ),
604476}
0 commit comments