Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Uptime] [Alerting] adjust Uptime RAC RBAC and index settings #108200

Merged
4 changes: 2 additions & 2 deletions packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const AlertConsumers = {
INFRASTRUCTURE: 'infrastructure',
OBSERVABILITY: 'observability',
SIEM: 'siem',
SYNTHETICS: 'synthetics',
UPTIME: 'uptime',
} as const;
export type AlertConsumers = typeof AlertConsumers[keyof typeof AlertConsumers];
export type STATUS_VALUES = 'open' | 'acknowledged' | 'closed';
Expand All @@ -35,7 +35,7 @@ export const mapConsumerToIndexName: Record<AlertConsumers, string | string[]> =
infrastructure: '.alerts-observability.metrics',
observability: '.alerts-observability',
siem: ['.alerts-security.alerts', '.siem-signals'],
synthetics: '.alerts-observability-synthetics',
uptime: '.alerts-observability.uptime',
};
export type ValidFeatureId = keyof typeof mapConsumerToIndexName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const OBSERVABILITY_ALERT_CONSUMERS = [
AlertConsumers.APM,
AlertConsumers.LOGS,
AlertConsumers.INFRASTRUCTURE,
AlertConsumers.SYNTHETICS,
AlertConsumers.UPTIME,
];

export function AlertsTableTGrid(props: AlertsTableTGridProps) {
Expand Down
10 changes: 5 additions & 5 deletions x-pack/plugins/uptime/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export class Plugin implements PluginType {
const { ruleDataService } = plugins.ruleRegistry;

const ready = once(async () => {
const componentTemplateName = ruleDataService.getFullAssetName('synthetics-mappings');
const alertsIndexPattern = ruleDataService.getFullAssetName('observability.synthetics*');
const componentTemplateName = ruleDataService.getFullAssetName('uptime-mappings');
const alertsIndexPattern = ruleDataService.getFullAssetName('observability.uptime*');

if (!ruleDataService.isWriteEnabled()) {
return;
Expand All @@ -56,7 +56,7 @@ export class Plugin implements PluginType {
});

await ruleDataService.createOrUpdateIndexTemplate({
name: ruleDataService.getFullAssetName('synthetics-index-template'),
name: ruleDataService.getFullAssetName('uptime-index-template'),
body: {
index_patterns: [alertsIndexPattern],
composed_of: [
Expand All @@ -75,8 +75,8 @@ export class Plugin implements PluginType {
});

const ruleDataClient = ruleDataService.getRuleDataClient(
'synthetics',
ruleDataService.getFullAssetName('observability.synthetics'),
'uptime',
ruleDataService.getFullAssetName('observability.uptime'),
() => initializeRuleDataTemplatesPromise
);

Expand Down