Skip to content

Commit

Permalink
doc: update grafana datasource docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss committed Jan 30, 2024
1 parent cf708b5 commit 7e26026
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/tools/grafana/grafana.go
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ func addFlags(commands ...*cobra.Command) {
cmd.PersistentFlags().StringVarP(&opts.token, "token", "t", "", "API token issued by Grafana server for authentication")
cmd.PersistentFlags().StringVar(&opts.svmRegex, "svm-variable-regex", "", "SVM variable regex to filter SVM query results")
cmd.PersistentFlags().StringVarP(&opts.prefix, "prefix", "p", "", "Use global metric prefix in queries")
cmd.PersistentFlags().StringVarP(&opts.datasource, "datasource", "s", grafanaDataSource, "Grafana datasource for the dashboards")
cmd.PersistentFlags().StringVarP(&opts.datasource, "datasource", "s", grafanaDataSource, "Name of your Grafana datasource of type Prometheus that should be used for the dashboards")
cmd.PersistentFlags().BoolVarP(&opts.variable, "variable", "v", false, "Use datasource as variable, overrides: --datasource")
cmd.PersistentFlags().BoolVarP(&opts.useHTTPS, "https", "S", false, "Use HTTPS")
cmd.PersistentFlags().BoolVarP(&opts.overwrite, "overwrite", "o", false, "Overwrite existing dashboard with same title")
Expand Down
4 changes: 1 addition & 3 deletions docs/dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ Similarly, to export:
$ bin/harvest grafana export --addr my.grafana.server:3000 --directory /path/to/export/directory --serverfolder grafanaFolderName
```

By default, the dashboards are connected to the `Prometheus` datasource defined in Grafana. If your datasource has a
different name, use the `--datasource` flag during import/export.

By default, the dashboards are connected to a datasource named `Prometheus`. This is a datasource of the Prometheus type, defined in Grafana. However, despite the type, the datasource can have any name. If you have a Prometheus type datasource with a name different from `Prometheus`, you can specify this name using the `--datasource` flag during import/export.
### CLI

The `bin/harvest grafana` tool includes CLI help when passing the `--help` command line argument flag like so:
Expand Down

0 comments on commit 7e26026

Please sign in to comment.