Skip to content

Commit 7081315

Browse files
committed
Enable support for Checkmk Managed Edition
1 parent c270a07 commit 7081315

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/rest.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ export default class RestApiBackend implements Backend {
244244
}
245245

246246
// check for cloud edition header
247-
if (result.headers.get('X-Checkmk-Edition') !== 'cce' && process.env.BUILD_EDITION === 'CLOUD') {
247+
const checkmkEdition = result.headers.get('X-Checkmk-Edition');
248+
const allowedEditions = new Set(['cce', 'cme']);
249+
if (process.env.BUILD_EDITION === 'CLOUD' && !allowedEditions.has(checkmkEdition || '')) {
248250
throw new Error(
249-
'»Checkmk data source for Checkmk Cloud Edition« is only compatible with Checkmk Cloud Edition, but you are trying to connect to another edition.'
251+
'This Checkmk data source is only compatible with Checkmk Cloud Edition and Checmk Managed Services Edition, but you are trying to connect to another edition.'
250252
);
251253
}
252254

0 commit comments

Comments
 (0)