Skip to content

Commit

Permalink
Fix component id in remaining panels
Browse files Browse the repository at this point in the history
  • Loading branch information
kwapik committed Oct 20, 2023
1 parent 4953065 commit 04dd666
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 20 deletions.
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/accept_percentage.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local timeSeriesPanel = import '../utils/time_series_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),
local acceptPercentage_filters = utils.dictToPrometheusFilter(stringFilters { signal_name: 'ACCEPT_PERCENTAGE' }),

local acceptPercentage = timeSeriesPanel('Accept Percentage',
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/average_load_multiplier.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extra_filters={}) {
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: componentID }),

local avgLoadMultiplier = statPanel('Average Load Multiplier',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/incoming_token_rate.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local timeSeriesPanel = import '../utils/time_series_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local incomingTokenRate = timeSeriesPanel('Incoming Token Rate',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/query.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local timeSeriesPanel = import '../utils/time_series_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),
local signalName = component.component.out_ports.output.signal_name,
local query = component.component.query_string,

Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/rate_limiter.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local timeSeriesPanel = import '../utils/time_series_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local rateLimiter = timeSeriesPanel('Aperture Rate Limiter',
datasourceName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local timeSeriesPanel = import '../utils/time_series_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local workloadLatency = timeSeriesPanel('Request in Queue Duration',
datasourceName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local barChartPanel = import '../utils/bar_chart_panel.libsonnet';
local utils = import '../utils/policy_utils.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local requestsDuration = barChartPanel('Requests in Queue Duration',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/throughput.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local timeSeriesPanel = import '../utils/time_series_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local throughput = timeSeriesPanel('Throughput - Accept/Reject',
datasourceName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extra_filters) {
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: componentID }),

local tokenBucketAvailableTokens = statPanel('Token Bucket Available Tokens',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/token_bucket_capacity.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extra_filters) {
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: componentID }),

local tokenBucketCapacity = statPanel('Token Bucket Capacity',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/token_bucket_fillrate.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extra_filters) {
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extra_filters { policy_name: policyName, component_id: componentID }),

local tokenBucketFillrate = statPanel('Token Bucket FillRate',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/total_accepted_requests.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local acceptedRequests = statPanel('Total Accepted Requests',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/total_accepted_tokens.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local acceptedTokens = statPanel('Total Accepted Tokens',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/total_incoming_tokens.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local incomingTokens = statPanel('Total Incoming Tokens',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/total_rejected_requests.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local rejectedRequests = statPanel('Total Rejected Requests',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/total_rejected_tokens.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local rejectedTokens = statPanel('Total Rejected Tokens',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/total_requests.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local statPanel = import '../utils/stat_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local totalRequests = statPanel('Total Requests',
datasourceName,
Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/wfq_scheduler_flows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local barGaugePanel = import '../utils/bar_gauge_panel.libsonnet';
local utils = import '../utils/policy_utils.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),


local legendFormat = '{{ instance }} - {{ policy_name }}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local barGaugePanel = import '../utils/bar_gauge_panel.libsonnet';
local utils = import '../utils/policy_utils.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local legendFormat = '{{ instance }} - {{ policy_name }}',

Expand Down
3 changes: 2 additions & 1 deletion blueprints/grafana/panels/workload_latency.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ local utils = import '../utils/policy_utils.libsonnet';
local timeSeriesPanel = import '../utils/time_series_panel.libsonnet';

function(datasourceName, policyName, component, extraFilters={}) {
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: component.component_id }),
local componentID = std.get(component.component, 'load_scheduler_component_id', default=component.component_id),
local stringFilters = utils.dictToPrometheusFilter(extraFilters { policy_name: policyName, component_id: componentID }),

local workloadLatency = timeSeriesPanel('Workload Latency',
datasourceName,
Expand Down

0 comments on commit 04dd666

Please sign in to comment.