Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instruction to cleanup a dashboard #1589

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,39 @@ Before submitting code or documentation contributions, you should first complete

Before you can contribute, we kindly ask you to sign our [Contributor License Agreement](https://cla-assistant.percona.com/percona/grafana-dashboards) (CLA). You can do this using your GitHub account and one click.
Copy link

@catalinaadam catalinaadam Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Before you can contribute, we kindly ask you to sign our [Contributor License Agreement](https://cla-assistant.percona.com/percona/grafana-dashboards) (CLA). You can do this using your GitHub account and one click.
You can easily do so using your GitHub account with just one click.
.```


## Rules and Guidelines

Development Rules and Best Practices while creating a new dashboard -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't link the internal document ( .
not sure is the overall PMM doc or if we should put this to the Dashboards repo?

I would vote for placing this to some reference page in the overall PMM documentation (pmm-doc repo )
@catalinaadam ^ WDYT

Copy link

@catalinaadam catalinaadam Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rnovikovP - yep, I can move this info to a new topic under the Details chapter. (I guess this is similar to the Develop Advisors topic which we host there).
This Contributing file would then only reference that new topic.

https://www.notion.so/percona/Dashboards-Grafana-dashboard-development-rules-b2c36a37e0594eea8b4156413ed4e2d1

### Cleanup Exported Dashboards

Before adding/updating a dashboard JSON file into this repository please follow below mentioned steps to clean it up.

1. Remove hardcoded items, i.e. change datasource from `prometheus`:

![Untitled (2)](https://github.com/percona/grafana-dashboards/assets/119680679/842fa781-65a0-4355-830e-27948e747716)

to `Metrics`

![Untitled](https://github.com/percona/grafana-dashboards/assets/119680679/a4d71b9b-1150-4e39-baf7-8bc47db2e86a)

or can be removed all together

3. Set the `editable` flag to “false”.

The same applies when working with a new dashboard.

4. Set all `id` attributes to “null”.
5. Remove all `$$haskey` items.

![Untitled (3)](https://github.com/percona/grafana-dashboards/assets/119680679/aff29412-c26f-4401-9d14-66a5857befba)

6. check and Add missing escape character `\` for every `"` in expr except for first and last `"`

![Untitled (1)](https://github.com/percona/grafana-dashboards/assets/119680679/14ef97c2-5a5b-45a7-b053-8b2fb1bd257c)


## Submitting a Bug

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have a "Submitting a Bug" section in the Readme.md topic, which then links back to this Contributing topic. Should we remove that duplicate section from there and leave it under Contributing only?


If you find a bug in Percona MongoDB Exporter or one of the related projects, you should submit a report to that project's [JIRA](https://jira.percona.com) issue tracker.
Expand Down
Loading