From 014ae83c1ee44e59044f00d1e47b21875bada894 Mon Sep 17 00:00:00 2001 From: Yuta Yamaguchi Date: Wed, 30 Oct 2024 03:53:36 +0900 Subject: [PATCH] hosting(grafana): fix users metrics query (#183) * hosting(grafana): fix users metrics query * ci: fix gh-script to post tf output --- .github/workflows/terraform_apply.yaml | 8 ++++---- .github/workflows/terraform_plan.yaml | 8 ++++---- .../terraform/grafana/dashboards/synd-api.json | 15 ++++++--------- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/terraform_apply.yaml b/.github/workflows/terraform_apply.yaml index 82a00ab..b34c6cc 100644 --- a/.github/workflows/terraform_apply.yaml +++ b/.github/workflows/terraform_apply.yaml @@ -47,10 +47,10 @@ jobs: const body = `terraform apply: ${APPLY_RESULT}
- apply output - \`\`\` - ${APPLY_STDOUT} - \`\`\` + apply output + \`\`\`\n + ${APPLY_STDOUT} + \`\`\`
` github.rest.issues.createComment({ diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 0289309..d56cc28 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -46,10 +46,10 @@ jobs: const body = `terraform plan: ${PLAN_RESULT}
- plan output - \`\`\` - ${PLAN_STDOUT} - \`\`\` + plan output + \`\`\`\n + ${PLAN_STDOUT} + \`\`\`
` github.rest.issues.createComment({ diff --git a/hosting/terraform/grafana/dashboards/synd-api.json b/hosting/terraform/grafana/dashboards/synd-api.json index a2eb13d..1b1a84b 100644 --- a/hosting/terraform/grafana/dashboards/synd-api.json +++ b/hosting/terraform/grafana/dashboards/synd-api.json @@ -299,7 +299,7 @@ "uid": "grafanacloud-logs" }, "editorMode": "code", - "expr": "count(count(count_over_time({service_name=\"synd-api\", service_namespace=\"syndicationd\"} | operation = \"FetchEntries\" and result = \"success\"[1w])) by (attributes_enduser_id))", + "expr": "count(count(count_over_time({service_name=\"synd-api\", service_namespace=\"syndicationd\"} | operation = \"FetchEntries\" and result = \"success\"[1w])) by (enduser_id))", "queryType": "range", "refId": "A" } @@ -949,8 +949,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] } @@ -1046,8 +1045,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1159,8 +1157,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] } @@ -1220,13 +1217,13 @@ "list": [] }, "time": { - "from": "now-2d", + "from": "now-12h", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "synd-api", "uid": "cdd2yfdz497uoc", - "version": 47, + "version": 48, "weekStart": "" }