Skip to content

Commit

Permalink
fix template variables
Browse files Browse the repository at this point in the history
  • Loading branch information
anaivanov committed Sep 23, 2024
1 parent 1863b74 commit 58502da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions csp-mixin/signals/gcpce.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ function(this)
{
local s = self,
filteringSelector: 'job!=""',
groupLabels: ['instance_name'],
instanceLabels: [],
groupLabels: ['job', 'project_id'],
instanceLabels: ['instance_name'],
aggLevel: 'instance',
discoveryMetric: {
stackdriver: 'stackdriver_gce_instance_compute_googleapis_com_instance_cpu_utilization',
Expand Down
22 changes: 12 additions & 10 deletions csp-mixin/signals/gcpceOverview.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function(this)
{
local s = self,
filteringSelector: 'job!=""',
groupLabels: this.groupLabels,
groupLabels: ['job', 'project_id'],
instanceLabels: [],
aggLevel: 'instance',
discoveryMetric: {
Expand Down Expand Up @@ -113,8 +113,8 @@ function(this)
},

memoryUsed: {
name: 'Memory Utilization',
description: 'Memory Utilization',
name: 'Memory Utilization2',
description: 'Memory used',
type: 'raw',
unit: 'bytes',
sources: {
Expand All @@ -128,27 +128,29 @@ function(this)
packetsSent: {
name: 'Total packets count sent/received',
description: 'Count of packets sent/received over the network. Sampled every 60 seconds',
type: 'gauge',
type: 'counter',
unit: 'short',
aggFunction: 'sum',
sources: {
stackdriver: {
expr: 'stackdriver_gce_instance_compute_googleapis_com_instance_network_sent_packets_count{%(queriesSelector)s}',
legendCustomTemplate: 'Sent',
exprWrappers: [['sum(', ')']],
// exprWrappers: [['sum(', ')']],
},
},
},

packetsReceived: {
name: 'Total packets count sent/received',
name: 'Total packets count received',
description: 'Count of packets sent/received over the network. Sampled every 60 seconds',
type: 'gauge',
type: 'counter',
unit: 'short',
aggFunction: 'sum',
sources: {
stackdriver: {
expr: 'stackdriver_gce_instance_compute_googleapis_com_instance_network_received_packets_count{%(queriesSelector)s}',
legendCustomTemplate: 'Received',
exprWrappers: [['sum(', ')']],
// exprWrappers: [['sum(', ')']],
},
},
},
Expand All @@ -168,7 +170,7 @@ function(this)
},

networkReceived: {
name: 'Network throughput Sent/Received',
name: 'Network throughput Received',
description: 'Count of bytes sent/received over the network. Sampled every 60 seconds',
type: 'gauge',
unit: 'bytes',
Expand Down Expand Up @@ -196,7 +198,7 @@ function(this)
},

diskBytesWrite: {
name: 'Total Bytes count read/write',
name: 'Total Bytes count write',
description: 'Total count of bytes read/write from disk. Sampled every 60 seconds',
type: 'gauge',
unit: 'bytes',
Expand Down

0 comments on commit 58502da

Please sign in to comment.