diff --git a/src/backend/rest.ts b/src/backend/rest.ts index ba1ddd58..74e641de 100644 --- a/src/backend/rest.ts +++ b/src/backend/rest.ts @@ -199,6 +199,9 @@ export default class RestApiBackend implements Backend { '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.' ); } + if (result.data.edition === 'cse') { + throw new Error('Detected Checkmk Cloud (SaaS). Can not query data from Checkmk Cloud (SaaS).'); + } // The REST API would be ok with other users, but the autocompleter are not if (!(await this.isAutomationUser(this.datasource.getUsername()))) { throw new Error('This data source must authenticate against Checkmk using an automation user.'); @@ -255,6 +258,10 @@ export default class RestApiBackend implements Backend { // check for cloud edition header const checkmkEdition = result.headers.get('X-Checkmk-Edition'); + // CSE is never supported + if (checkmkEdition === 'cse') { + throw new Error('Cannot query data from Checkmk Cloud (SaaS).'); + } const allowedEditions = new Set(['cce', 'cme']); if (process.env.BUILD_EDITION === 'CLOUD' && !allowedEditions.has(checkmkEdition || '')) { throw new Error(