Skip to content

Commit

Permalink
fix: allow disabled plugin to be enabled before prompting for bootstr…
Browse files Browse the repository at this point in the history
…apping flow (#256)
  • Loading branch information
rdubrock committed Apr 22, 2021
1 parent 5097553 commit 75f7781
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ apiVersion: 1
apps:
- type: grafana-synthetic-monitoring-app
name: grafana-synthetic-monitoring-app
org_id: <defaults to 1>
disabled: false
jsonData:
apiHost: https://synthetic-monitoring-api.grafana.net
Expand All @@ -39,12 +40,14 @@ apps:
publisherToken: <A metric publisher token from grafana.com>
```
Note: you can add a provisioning block per [org](https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-orgs/) to provision the plugin for multiple orgs. You can provide different values for each org block and connect to a different cloud stack per org.
Prerequisites:
1. A datasource pointed at a Prometheus instance hosted in Grafana Cloud
2. A datasource pointed at a Loki instance hosted in Grafana Cloud
**Note: The Prometheus and Loki instances must be part of the same stack**
**Note: The Prometheus and Loki instances must be part of the same Cloud stack**
The required datasources can be [added via provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources). The information needed can be copied from Prometheus and Loki datasources found in the datasources tab of a Cloud hosted Grafana instance:
Expand Down
2 changes: 1 addition & 1 deletion src/components/InstanceProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const InstanceProvider = ({
throw new Error('There was an error finding datasources required for Synthetic Monitoring');
}

if (!instances.metrics || !instances.logs) {
if (meta.enabled && (!instances.metrics || !instances.logs)) {
return <UnprovisionedSetup pluginId={meta.id} pluginName={meta.name} />;
}

Expand Down

0 comments on commit 75f7781

Please sign in to comment.