Skip to content

Commit

Permalink
chore: testdata for MonitoringDashboard including export
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Jun 19, 2024
1 parent cc62254 commit e42f660
Show file tree
Hide file tree
Showing 14 changed files with 506 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ spec:
- title: Widget 3
xyChart:
dataSets:
- plotType: STACKED_BAR
- plotType: LINE
timeSeriesQuery:
timeSeriesFilter:
aggregation:
perSeriesAligner: ALIGN_RATE
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
unitOverride: "1"
timeshiftDuration: ""
yAxis:
label: y1Axis
scale: LINEAR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ spec:
- title: Widget 3
xyChart:
dataSets:
- plotType: STACKED_BAR
- plotType: LINE
timeSeriesQuery:
timeSeriesFilter:
aggregation:
perSeriesAligner: ALIGN_RATE
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
unitOverride: "1"
timeshiftDuration: 0s
yAxis:
label: y1Axis
scale: LINEAR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ x-goog-request-params: parent=projects%2F${projectId}
}
}
],
"timeshiftDuration": "0s",
"timeshiftDuration": "100s",
"yAxis": {
"label": "y1Axis",
"scale": 1
Expand All @@ -70,7 +70,7 @@ x-goog-request-params: parent=projects%2F${projectId}
"xyChart": {
"dataSets": [
{
"plotType": 3,
"plotType": 1,
"timeSeriesQuery": {
"timeSeriesFilter": {
"aggregation": {
Expand All @@ -82,7 +82,7 @@ x-goog-request-params: parent=projects%2F${projectId}
}
}
],
"timeshiftDuration": "0s",
"timeshiftDuration": "60s",
"yAxis": {
"label": "y1Axis",
"scale": 1
Expand Down Expand Up @@ -141,7 +141,7 @@ X-Xss-Protection: 0
}
}
],
"timeshiftDuration": "0s",
"timeshiftDuration": "100s",
"yAxis": {
"label": "y1Axis",
"scale": "LINEAR"
Expand All @@ -160,7 +160,7 @@ X-Xss-Protection: 0
"xyChart": {
"dataSets": [
{
"plotType": "STACKED_BAR",
"plotType": "LINE",
"targetAxis": "Y1",
"timeSeriesQuery": {
"timeSeriesFilter": {
Expand All @@ -173,7 +173,7 @@ X-Xss-Protection: 0
}
}
],
"timeshiftDuration": "0s",
"timeshiftDuration": "60s",
"yAxis": {
"label": "y1Axis",
"scale": "LINEAR"
Expand Down Expand Up @@ -240,7 +240,7 @@ X-Xss-Protection: 0
}
}
],
"timeshiftDuration": "0s",
"timeshiftDuration": "100s",
"yAxis": {
"label": "y1Axis",
"scale": "LINEAR"
Expand All @@ -259,7 +259,7 @@ X-Xss-Protection: 0
"xyChart": {
"dataSets": [
{
"plotType": "STACKED_BAR",
"plotType": "LINE",
"targetAxis": "Y1",
"timeSeriesQuery": {
"timeSeriesFilter": {
Expand All @@ -272,7 +272,7 @@ X-Xss-Protection: 0
}
}
],
"timeshiftDuration": "0s",
"timeshiftDuration": "60s",
"yAxis": {
"label": "y1Axis",
"scale": "LINEAR"
Expand Down Expand Up @@ -345,7 +345,7 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon
"xyChart": {
"dataSets": [
{
"plotType": 3,
"plotType": 1,
"timeSeriesQuery": {
"timeSeriesFilter": {
"aggregation": {
Expand All @@ -357,7 +357,6 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon
}
}
],
"timeshiftDuration": "0s",
"yAxis": {
"label": "y1Axis",
"scale": 1
Expand Down Expand Up @@ -432,7 +431,7 @@ X-Xss-Protection: 0
"xyChart": {
"dataSets": [
{
"plotType": "STACKED_BAR",
"plotType": "LINE",
"targetAxis": "Y1",
"timeSeriesQuery": {
"timeSeriesFilter": {
Expand All @@ -445,7 +444,6 @@ X-Xss-Protection: 0
}
}
],
"timeshiftDuration": "0s",
"yAxis": {
"label": "y1Axis",
"scale": "LINEAR"
Expand Down Expand Up @@ -528,7 +526,7 @@ X-Xss-Protection: 0
"xyChart": {
"dataSets": [
{
"plotType": "STACKED_BAR",
"plotType": "LINE",
"targetAxis": "Y1",
"timeSeriesQuery": {
"timeSeriesFilter": {
Expand All @@ -541,7 +539,6 @@ X-Xss-Protection: 0
}
}
],
"timeshiftDuration": "0s",
"yAxis": {
"label": "y1Axis",
"scale": "LINEAR"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
perSeriesAligner: "ALIGN_RATE"
unitOverride: "1"
plotType: LINE
timeshiftDuration: 0s
timeshiftDuration: 100s
yAxis:
label: y1Axis
scale: LINEAR
Expand All @@ -48,8 +48,8 @@ spec:
aggregation:
perSeriesAligner: ALIGN_RATE
unitOverride: "1"
plotType: "STACKED_BAR"
timeshiftDuration: 0s
plotType: "LINE"
timeshiftDuration: 60s
yAxis:
label: y1Axis
scale: LINEAR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ spec:
aggregation:
perSeriesAligner: ALIGN_RATE
unitOverride: "1"
plotType: "STACKED_BAR"
timeshiftDuration: 0s
plotType: "LINE"
yAxis:
label: y1Axis
scale: LINEAR
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringDashboard
metadata:
name: monitoringdashboard-${uniqueId}
spec:
columnLayout:
columns:
- weight: 2
widgets:
- title: Widget 1
xyChart:
dataSets:
- plotType: LINE
timeSeriesQuery:
timeSeriesFilter:
aggregation:
perSeriesAligner: ALIGN_RATE
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
unitOverride: "1"
timeshiftDuration: 600.5s
yAxis:
label: y1Axis
scale: LINEAR
- text:
content: Widget 2
format: MARKDOWN
- title: Widget 3
xyChart:
dataSets:
- plotType: STACKED_BAR
timeSeriesQuery:
timeSeriesFilter:
aggregation:
perSeriesAligner: ALIGN_RATE
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
unitOverride: "1"
yAxis:
label: y1Axis
scale: LINEAR
- logsPanel:
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
resourceNames:
- external: projects/${projectId}
kind: Project
title: Widget 4
displayName: monitoringdashboard-full
projectRef:
external: ${projectId}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringDashboard
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
generation: 2
labels:
cnrm-test: "true"
name: monitoringdashboard-${uniqueId}
namespace: ${uniqueId}
spec:
columnLayout:
columns:
- weight: 2
widgets:
- title: Widget 1
xyChart:
dataSets:
- plotType: LINE
timeSeriesQuery:
timeSeriesFilter:
aggregation:
perSeriesAligner: ALIGN_RATE
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
unitOverride: "1"
timeshiftDuration: 600.500s
yAxis:
label: y1Axis
scale: LINEAR
- text:
content: Widget 2
format: MARKDOWN
- title: Widget 3
xyChart:
dataSets:
- plotType: STACKED_BAR
timeSeriesQuery:
timeSeriesFilter:
aggregation:
perSeriesAligner: ALIGN_RATE
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
unitOverride: "1"
yAxis:
label: y1Axis
scale: LINEAR
- logsPanel:
filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count"
resourceNames:
- external: projects/${projectId}
title: Widget 4
displayName: monitoringdashboard-full
projectRef:
external: ${projectId}
resourceID: monitoringdashboard-${uniqueId}
status:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: The resource is up to date
reason: UpToDate
status: "True"
type: Ready
etag: abcdef123456
observedGeneration: 2
Loading

0 comments on commit e42f660

Please sign in to comment.