diff --git a/src/datasource/components/QueryEditor.tsx b/src/datasource/components/QueryEditor.tsx index b183db2..f73dd2e 100644 --- a/src/datasource/components/QueryEditor.tsx +++ b/src/datasource/components/QueryEditor.tsx @@ -55,6 +55,11 @@ const zabbixQueryTypeOptions: Array> = [ label: 'User macros', description: 'User Macros', }, + { + value: c.MODE_PROBLEMS_ALERTING, + label: 'Problems (Alerting)', + description: 'Query problems for alerting (returns 0/1 time series)', + }, ]; const getDefaultQuery: () => Partial = () => ({ @@ -226,6 +231,7 @@ export const QueryEditor = ({ query, datasource, onChange, onRunQuery, range }: {queryType === c.MODE_TEXT && renderTextMetricsEditor()} {queryType === c.MODE_ITSERVICE && renderITServicesEditor()} {queryType === c.MODE_PROBLEMS && renderProblemsEditor()} + {queryType === c.MODE_PROBLEMS_ALERTING && renderProblemsEditor()} {queryType === c.MODE_TRIGGERS && renderTriggersEditor()} {queryType === c.MODE_MACROS && renderUserMacrosEditor()} diff --git a/src/datasource/types/query.ts b/src/datasource/types/query.ts index 9b476d3..71dd2f4 100644 --- a/src/datasource/types/query.ts +++ b/src/datasource/types/query.ts @@ -9,7 +9,8 @@ export type QueryType = | typeof c.MODE_ITEMID | typeof c.MODE_TRIGGERS | typeof c.MODE_PROBLEMS - | typeof c.MODE_MACROS; + | typeof c.MODE_MACROS + | typeof c.MODE_PROBLEMS_ALERTING; type BaseQuery = { queryType: QueryType; datasourceId: number } & DataQuery;