UNPKG

signoz-mcp-server

Version:

Model Context Protocol server for SigNoz observability platform

239 lines 6.07 kB
import { z } from 'zod'; export declare const SigNozConfigSchema: z.ZodObject<{ url: z.ZodString; token: z.ZodString; name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; token: string; name?: string | undefined; description?: string | undefined; }, { url: string; token: string; name?: string | undefined; description?: string | undefined; }>; export type SigNozConfig = z.infer<typeof SigNozConfigSchema>; export interface SigNozResponse<T = any> { status: 'success' | 'error'; data?: T; error?: string; errorType?: string; } export interface TimeRange { start: number; end: number; } export type FilterOperator = '=' | '!=' | '>' | '<' | '>=' | '<=' | 'in' | 'nin' | 'contains' | 'ncontains' | 'regex' | 'nregex' | 'like' | 'nlike' | 'exists' | 'nexists' | 'has' | 'nhas'; export interface AttributeKey { key: string; dataType: 'string' | 'int64' | 'float64' | 'bool' | 'array(string)' | 'array(int64)' | 'array(float64)' | 'array(bool)'; type: 'tag' | 'resource' | 'scope'; isColumn?: boolean; isJSON?: boolean; } export interface FilterItem { key: AttributeKey; value: any; op: FilterOperator; } export interface FilterSet { op: 'AND' | 'OR'; items: FilterItem[]; } export interface QueryBuilderData { queryType: 'metrics' | 'logs' | 'traces'; dataSource: 'metrics' | 'logs' | 'traces'; aggregateOperator?: string; aggregateAttribute?: AttributeKey; filters?: FilterSet; groupBy?: AttributeKey[]; expression?: string; disabled?: boolean; having?: any[]; legend?: string; limit?: number; offset?: number; pageSize?: number; orderBy?: Array<{ columnName: string; order: 'asc' | 'desc'; }>; reduceTo?: 'last' | 'sum' | 'avg' | 'min' | 'max'; stepInterval?: number; } export interface CompositeQuery { builderQueries: Record<string, QueryBuilderData>; panelType: 'graph' | 'table' | 'value' | 'list' | 'trace'; queryType: 'builder' | 'clickhouse_sql' | 'promql'; unit?: string; fillGaps?: boolean; } export interface QueryRangeRequest { start: number; end: number; step?: number; compositeQuery: CompositeQuery; variables?: Record<string, any>; noCache?: boolean; formatForWeb?: boolean; } export interface Service { serviceName: string; p99: number; avgDuration: number; numCalls: number; callRate: number; numErrors: number; errorRate: number; num4XX?: number; fourXXRate?: number; } export interface Dashboard { id: string; title: string; description?: string; tags?: string[]; layout?: Array<{ i: string; x: number; y: number; w: number; h: number; }>; widgets?: Widget[]; createdAt?: string; updatedAt?: string; } export interface Widget { id: string; title: string; description?: string; panelTypes: string; query: QueryBuilderData; } export interface AlertRule { id?: number; alert: string; expr: string; for: string; labels?: Record<string, string>; annotations?: Record<string, string>; updated_at?: string; data?: string; } export interface NotificationChannel { id?: string; name: string; type: 'slack' | 'webhook' | 'email' | 'pagerduty' | 'opsgenie' | 'msteams'; data: Record<string, any>; } export interface Host { hostName: string; active: boolean; os: string; cpu: number; memory: number; wait: number; load15: number; meta: Record<string, string>; } export interface Pod { podUID: string; podCPU: number; podCPURequest: number; podCPULimit: number; podMemory: number; podMemoryRequest: number; podMemoryLimit: number; restartCount: number; meta: Record<string, string>; countByPhase: { pending: number; running: number; succeeded: number; failed: number; unknown: number; }; } export interface Trace { traceID: string; spanID: string; operationName: string; startTime: number; duration: number; tags?: Record<string, any>; logs?: any[]; references?: any[]; } export interface LogEntry { timestamp: string; id: string; body: string; attributes?: Record<string, any>; resource?: Record<string, any>; severity_text?: string; severity_number?: number; } export interface LiveTailClient { name: string; logs: LogEntry[]; done: boolean; error?: string; } export interface Metric { name: string; type: string; description?: string; unit?: string; labels?: Record<string, string>; } export interface MetricSeries { labels: Record<string, string>; values: Array<[number, string]>; } export interface QueryResult { queryName: string; series: MetricSeries[]; } export interface License { key: string; status: 'VALID' | 'INVALID' | 'SUSPENDED'; state: 'ACTIVE' | 'EXPIRED' | 'ISSUED' | 'EVALUATING' | 'EVALUATION_EXPIRED' | 'TERMINATED' | 'CANCELLED'; plan: { name: string; description: string; is_active: boolean; created_at: string; updated_at: string; }; platform: 'SELF_HOSTED' | 'CLOUD'; valid_from: number; valid_until: number; free_until?: string; features: string[]; created_at: string; updated_at: string; } export interface FeatureFlag { name: string; active: boolean; usage: number; usage_limit: number; route: string; } export interface SigNozError { status: 'error'; errorType: 'bad_data' | 'internal' | 'timeout' | 'canceled' | 'execution' | 'unavailable' | 'not_found' | 'unauthorized' | 'forbidden' | 'conflict'; error: string; details?: any; } export interface ApiClientOptions { baseURL: string; apiKey?: string; timeout?: number; retries?: number; } //# sourceMappingURL=types.d.ts.map