Skip to content

Commit aae60e4

Browse files
committed
Disallow grafana plugin on the cse
1 parent 2e9550d commit aae60e4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/backend/rest.ts

+9
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ export default class RestApiBackend implements Backend {
199199
'The data source specified the Checkmk Raw Edition, but a Checkmk commercial edition was detected. Some functionality may not be available. Choose commercial editions in the data source settings to enable all features.'
200200
);
201201
}
202+
if (result.data.edition === 'cse') {
203+
throw new Error(
204+
'The data source specifed is Checkmk Cloud (SaaS). The grafana plugin is currently not supported for that edition.'
205+
);
206+
}
202207
// The REST API would be ok with other users, but the autocompleter are not
203208
if (!(await this.isAutomationUser(this.datasource.getUsername()))) {
204209
throw new Error('This data source must authenticate against Checkmk using an automation user.');
@@ -261,6 +266,10 @@ export default class RestApiBackend implements Backend {
261266
'This Checkmk data source is only compatible with Checkmk Cloud and Checkmk MSP, but you are trying to connect to another edition.'
262267
);
263268
}
269+
// CSE is never supported
270+
if (checkmkEdition === 'cse') {
271+
throw new Error('This Checkmk data source is not compatible with Checkmk Cloud (SaaS).');
272+
}
264273

265274
return result;
266275
}

0 commit comments

Comments
 (0)