GithubHelp home page GithubHelp logo

googlecloudplatform / monitoring-dashboard-samples Goto Github PK

View Code? Open in Web Editor NEW
458.0 458.0 282.0 128.73 MB

License: Apache License 2.0

Python 7.92% HCL 7.39% Makefile 0.04% Shell 6.73% PowerShell 1.39% TypeScript 75.73% JavaScript 0.79%

monitoring-dashboard-samples's People

Contributors

aburhan avatar algchoo avatar apeabody avatar asenkowski avatar binaryfissiongames avatar cocosheng avatar ddli-google avatar disocverprakash avatar dmivor avatar evansimpson avatar google-nalin avatar harrisonluo avatar huygaa11 avatar johnbryan avatar jonathanwamsley avatar jsirianni avatar mrsillydog avatar philshin-google avatar pintofloyed avatar schmikei avatar sowmyagiri-google avatar stackdriver-instrumentation-release avatar stevezease avatar suffiank avatar thecheneral avatar turnerhayes avatar varun-c avatar williamang2 avatar xiangshen-dk avatar yqlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitoring-dashboard-samples's Issues

Dashboard Marketplace

Is there a plan to have a marketplace to distribute common dashboards to support official and community built dashboards? Is this project intended to have only dashboards for GCP products or are you open to have here samples for open source projects often deployed on GCP?

Dashboard Importer - Validation error when uploading converted dashboard with float height

When running the ./import.sh script to upload a converted Grafana dashboard, I encountered the following error:
ERROR: gcloud crashed (ValidationError): Expected type (<class 'int'>,) for field height, found 5.5 (type <class 'float'>)

Steps to Reproduce:

  1. Run the ./import.sh script with a Grafana dashboard and Project ID.
  2. Respond with 'y' and press Enter when prompted with "Would you like to continue?" to start the upload process.
  3. Encounter the mentioned validation error.

Additional Information:

  • Dashboard JSON file: dashboard.json
  • Command used: ./import.sh dashboard.json <PROJECT_ID>
  • Command used by ./import.sh script: ./upload.sh reports/2024-1-23/22:20:39/ <PROJECT_ID>

Expected Behavior:
Converted dashboard should not contain widgets with float values in the height field.

Full Script Output Log

Converting: Grafana Dashboard
โœ“ Grafana Dashboard converted successfully

Conversion of dashboard.json complete. Conversion Report located at: reports/2024-1-23/22:20:39/report.json


To upload these dashboard(s) manually, you can run: 
./upload.sh reports/2024-1-23/22:20:39/ <PROJECT_ID>

Conversion complete. Proceeding to upload...

Now running: ./upload.sh reports/2024-1-23/22:20:39/ <PROJECT_ID>

Uploading 1 dashboard(s) from a directory with the following args:
Directory: reports/2024-1-23/22:20:39/
Project: <PROJECT_ID>

The following are your dashboards:
- dashboard.json

Would you like to continue? (y/n) y

gcloud monitoring dashboards create resulted in unexpected output:
ERROR: gcloud crashed (ValidationError): Expected type (<class 'int'>,) for field height, found 5.5 (type <class 'float'>) If you would like to report this issue, please run the following command: gcloud feedback To check gcloud for common problems, please run the following command: gcloud info --run-diagnostics

Need to troubleshoot? Please visit: 
https://github.com/GoogleCloudPlatform/monitoring-dashboard-samples/tree/master/scripts/dashboard-importer/README.md#troubleshooting

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

          Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Originally posted by @google-cla[bot] in #732 (comment)

Create a monitoring-alerting-samples

This repository was really helpful for me to backup and restore Cloud Monitoring dashboards.

I'd like to have a similar repository for sharing alerting policies, following the same structure.

I already adapted the script (i.e., like alerting.sh) and tested it for AI/ML alert policies.

#!/usr/bin/env bash

set -eE

ACTION=${1:?"action [import | export ] is required as argument \$1"}

alerting_export () {
    # action is $1
    alert_id=${2:?"alert id is required as argument \$2"}
    project_id=${3:?"project id is required as argument \$3"}
    output_file=${4:?"output file name is requred as argument \$4"}

    project_number=$(gcloud projects describe "${project_id}" --format="value(projectNumber)")

    echo "Exporting alerting \"$alert_id\" from project \"$project_id\" to file \"${output_file}\""

    gcloud alpha monitoring policies describe \
        "projects/${project_number}/alertPolicies/${alert_id}" --format=json \
        | jq  'del(.name, .creationRecord, .mutationRecord, .notificationChannels)' \
        | jq  'del(.conditions[].name)' \
        > "${output_file}"

    echo "Export finished"
}

alerting_import () {
    # action is $1
    project_id=${2:?"project id is required as argument \$2"}
    input_file=${3:?"input file is requred as argument \$3"}

    gcloud alpha monitoring policies create \
        --project "${project_id}" \
        --policy-from-file "${input_file}"
}

if [ "$ACTION" = "export" ]; then
    alerting_export "$@"
elif [ "$ACTION" = "import" ]; then
    alerting_import "$@"
else
    echo "unknown action: ${ACTION}"
    exit 1
fi

Note: this script doesn't export and create notification channels.

Meejoo18

#!/usr/bin/env bash

set -eE

ACTION=${1:?"action [import | export ] is required as argument $1"}

alerting_export () {
# action is $1
alert_id=${2:?"alert id is required as argument $2"}
project_id=${3:?"project id is required as argument $3"}
output_file=${4:?"output file name is requred as argument $4"}

project_number=$(gcloud projects describe "${project_id}" --format="value(projectNumber)")

echo "Exporting alerting \"$alert_id\" from project \"$project_id\" to file \"${output_file}\""

gcloud alpha monitoring policies describe \
    "projects/${project_number}/alertPolicies/${alert_id}" --format=json \
    | jq  'del(.name, .creationRecord, .mutationRecord, .notificationChannels)' \
    | jq  'del(.conditions[].name)' \
    > "${output_file}"

echo "Export finished"

}

alerting_import () {
# action is $1
project_id=${2:?"project id is required as argument $2"}
input_file=${3:?"input file is requred as argument $3"}

gcloud alpha monitoring policies

Is there a way to see these dashboards in a gallery?

It would be nice to have a webpage where you can see all these dashboards, filter by features, see the preview images and eventually click on the deploy button.

Happy to make a tiny website if anyone interested

Metric error

Hello,

When trying to copy the integration dashboard, or create a custom dashboard from the json, the metrics listed in the json don't seem to exist or at least not recognized by Google. Here is an error I receive when trying to copy the integration dashboard. Is there by chance something I'm missing?

There was an error persisting the dashboard changes
Field mosaicLayout.tiles[10].widget.xyChart.dataSets[0].timeSeriesQuery.timeSeriesQueryLanguage has an invalid value: Could not find a metric named 'workload.googleapis.com/sqlserver.user.connection.count'. Field mosaicLayout.tiles[11].widget.xyChart.dataSets[0].timeSeriesQuery.timeSeriesQueryLanguage has an invalid value: Could not find a metric named 'workload.googleapis.com/sqlserver.user.connection.count'. Field mosaicLayout.tiles[12].widget.xyChart.dataSets[0].timeSeriesQuery.timeSeriesQueryLanguage has an invalid value: Could not find a metric named 'workload.googleapis.com/sqlserver.user.connection.count'.

Tracking number: c2129256541987453

image
image

Dropdown?

It would be great to be able to add a dropdown (such as backend_target_name) rather than having to use filters (please see attached image), is there a way to achieve this? If not is there an existing feature request I could track?

image

Is it safe to run terraform destroy?

I just want to double-check if it's safe to run terraform destroy via the terraform? My main concern is

resource "google_project_service" "enable_destination_api" {

Which I am not too familiar with, I am aware that this resource is non-authoritative, while google_project_services is authoritative, so I want to double-check with you first

thank you

Cannot import grafana dashboard with variables

It seems that any query that uses a dashboard variable cannot be imported and leads to empty queries.

such as:

            "promQLQuery": {
              "expr": "avg(streamservice_latency{quantile=\"0.999\",pod=~\"$pod\"})",
              "projectName": "obsidian-1929",
              "step": "$__interval"
            },

will lead to an empty value:

            {
                "widget": {
                    "scorecard": {
                        "gaugeView": {
                            "lowerBound": 0,
                            "upperBound": 100
                        },
                        "thresholds": [],
                        "timeSeriesQuery": {}
                    },
                    "title": "99%ile (24h)"
                },
                "xPos": 20,
                "yPos": 0,
                "height": 6,
                "width": 4
            },

The report.json contains following warnings:

                "Template variable 'pod' was skipped because queries that start with '' are not supported",
                "panel undefined target at index 0 does not have an expression",
                "panel undefined target at index 0 does not have an expression",
                "panel Discarded Trades (24h) target at index 0 does not have an expression",
                "panel 50%ile (24h) target at index 0 does not have an expression",
                "panel 90%ile (24h) target at index 0 does not have an expression",
                "panel 95%ile (24h) target at index 0 does not have an expression",
                "panel 99%ile (24h) target at index 0 does not have an expression",
                "panel Discards/Sec target at index 0 does not have an expression",
                "panel Discards/Sec target at index 0 does not have an expression",
                "panel Discards/Sec target at index 0 does not have an expression",
                "panel Latency target at index 0 does not have an expression"

$__range

The Prometheus/Grafana $__range builtin variable doesn't seem to be supported.
My converted Grafana dashboard result in the use of in something like:
sum(increase(metric[$__range]))

This won't give any data as $__range is not understood. I don't want the ${__interval} as I want to sum over the entire selected time range in the dashboard.

Can I manually correct this or is this simply not possible in GKE using PromQL

Remove use of `LogsPanel` in Redis/Apache dashboards due to issue with cloning it into other projects

As documented in #69, the LogsPanel component, awesome as it is won't show logs correctly when copied to another project due to the resourceNames having a hard-coded project ID in it and the component not knowing how to auto-infer the projects in a metric scope yet.

To avoid confusion, I think we should remove the panel from the Redis and Apache dashboards and replace them with links to the logs explorer for the relevant logs as documented in https://github.com/GoogleCloudPlatform/monitoring-dashboard-samples/blob/master/dev-docs/DASHBOARD_TIPS.md#embedding-markdown-with-links-to-docslogs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.