/** * MonitoringIntegration - External Monitoring Platform Integration * * Integrate with external monitoring platforms and aggregate data from multiple sources. * Provides seamless connectivity to popular monitoring solutions with unified data formats. * * Operations: * 1. connect - Connect to external monitoring platform * 2. disconnect - Disconnect from platform * 3. list-connections - List all active connections * 4. sync-metrics - Sync metrics from external platform * 5. sync-alerts - Import alerts from external platform * 6. push-data - Push data to external platform * 7. get-status - Get integration health status * 8. configure-mapping - Map external metrics to internal format * * Token Reduction Target: 87%+ */ import { CacheEngine } from '../../core/cache-engine.js'; import { TokenCounter } from '../../core/token-counter.js'; import { MetricsCollector } from '../../core/metrics.js'; export interface MonitoringIntegrationOptions { operation: 'connect' | 'disconnect' | 'list-connections' | 'sync-metrics' | 'sync-alerts' | 'push-data' | 'get-status' | 'configure-mapping'; connectionId?: string; connectionName?: string; connection?: { platform: 'prometheus' | 'grafana' | 'datadog' | 'newrelic' | 'splunk' | 'elastic'; url: string; apiKey?: string; username?: string; password?: string; organization?: string; timeout?: number; }; syncOptions?: { timeRange?: { start: number; end: number; }; metrics?: string[]; limit?: number; }; pushData?: { metrics?: any[]; logs?: any[]; traces?: any[]; }; mapping?: { externalField: string; internalField: string; transform?: string; }[]; useCache?: boolean; cacheTTL?: number; } export interface PlatformConnection { id: string; name: string; platform: string; url: string; status: 'connected' | 'disconnected' | 'error'; lastSync?: number; errorMessage?: string; metrics?: { syncCount: number; lastSyncDuration: number; dataPointsSynced: number; }; } export interface SyncedMetric { externalId: string; externalName: string; internalName: string; value: number; timestamp: number; tags: Record; source: string; } export interface SyncedAlert { externalId: string; name: string; severity: string; status: string; message: string; triggeredAt: number; source: string; } export interface IntegrationHealth { connectionId: string; status: 'healthy' | 'degraded' | 'down'; latency: number; successRate: number; lastCheck: number; errors: string[]; } export interface MonitoringIntegrationResult { success: boolean; data?: { connection?: PlatformConnection; connections?: PlatformConnection[]; metrics?: SyncedMetric[]; alerts?: SyncedAlert[]; health?: IntegrationHealth; pushed?: { count: number; type: string; }; }; metadata: { tokensUsed?: number; tokensSaved?: number; cacheHit: boolean; syncCount?: number; }; error?: string; } export declare class MonitoringIntegration { private cache; private tokenCounter; private metricsCollector; private connections; private fieldMappings; constructor(cache: CacheEngine, tokenCounter: TokenCounter, metricsCollector: MetricsCollector); run(options: MonitoringIntegrationOptions): Promise; private connect; private disconnect; private listConnections; private syncMetrics; private syncAlerts; private pushData; private getStatus; private configureMapping; private generateConnectionId; private getCacheKey; private testConnection; private healthCheck; private fetchMetricsFromPlatform; private fetchAlertsFromPlatform; private pushMetricsToPlatform; private compressMetrics; private estimateTokenSavings; private persistConnections; private persistMappings; private loadPersistedData; } export declare function getMonitoringIntegration(cache: CacheEngine, tokenCounter: TokenCounter, metricsCollector: MetricsCollector): MonitoringIntegration; export declare const MONITORING_INTEGRATION_TOOL_DEFINITION: { name: string; description: string; inputSchema: { type: string; properties: { operation: { type: string; enum: string[]; description: string; }; connectionId: { type: string; description: string; }; connectionName: { type: string; description: string; }; connection: { type: string; description: string; properties: { platform: { type: string; enum: string[]; }; url: { type: string; }; apiKey: { type: string; }; }; }; useCache: { type: string; default: boolean; }; syncOptions: { type: string; description: string; properties: { timeRange: { type: string; description: string; properties: { start: { type: string; }; end: { type: string; }; }; required: string[]; }; metrics: { type: string; items: { type: string; }; description: string; }; limit: { type: string; description: string; }; }; }; pushData: { type: string; description: string; properties: { metrics: { type: string; items: {}; }; logs: { type: string; items: {}; }; traces: { type: string; items: {}; }; }; }; mapping: { type: string; description: string; items: { type: string; properties: { externalField: { type: string; }; internalField: { type: string; }; transform: { type: string; description: string; }; }; required: string[]; }; }; cacheTTL: { type: string; description: string; }; }; required: string[]; }; }; //# sourceMappingURL=monitoring-integration.d.ts.map