@tpmjs/tools-monitoring-gap-analysis
Analyze monitoring coverage gaps across services to identify missing metrics, alerts, or logs
Services array must contain at least one service
Last checked: 2/28/2026, 3:58:56 AM
Test @tpmjs/tools-monitoring-gap-analysis (monitoringGapAnalysisTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-monitoring-gap-analysispnpm add @tpmjs/tools-monitoring-gap-analysisyarn add @tpmjs/tools-monitoring-gap-analysisbun add @tpmjs/tools-monitoring-gap-analysisdeno add npm:@tpmjs/tools-monitoring-gap-analysisimport { monitoringGapAnalysisTool } from '@tpmjs/tools-monitoring-gap-analysis';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { monitoringGapAnalysisTool } from '@tpmjs/tools-monitoring-gap-analysis';
const result = await generateText({
model: openai('gpt-4o'),
tools: { monitoringGapAnalysisTool },
prompt: 'Your prompt here...',
});
console.log(result.text);(services: { name: string; hasLogs: boolean; hasAlerts: boolean; hasMetrics: boolean }[]) => Promise<unknown>Available configuration options
servicesarrayArray of services with monitoring status flags
Schema extracted: 2/28/2026, 3:58:55 AM
Analyze monitoring coverage gaps across services and endpoints to identify missing metrics, alerts, or logs with prioritized recommendations.
npm install @tpmjs/tools-monitoring-gap-analysis
import { monitoringGapAnalysisTool } from '@tpmjs/tools-monitoring-gap-analysis'; // Analyze monitoring coverage const result = await monitoringGapAnalysisTool.execute({ services: [ { name: 'API Gateway', hasMetrics: true, hasAlerts: true, hasLogs: true }, { name: 'Payment Service', hasMetrics: true, hasAlerts: false, hasLogs: true }, { name: 'Email Worker', hasMetrics: false, hasAlerts: false, hasLogs: false }, { name: 'User Service', hasMetrics: true, hasAlerts: true, hasLogs: false } ] }); console.log(result.coverageScore); // 58 console.log(result.summary); // "Analyzed 4 services with 58% overall monitoring coverage. Found 5 gaps across 3 services, including 1 critical gap requiring immediate attention." console.log(result.gaps); // [ // { // service: "Email Worker", // gapType: "critical", // severity: "critical", // description: "Service has no monitoring coverage", // impact: "Cannot detect outages..." // }, // ... // ] console.log(result.recommendations); // [ // { // priority: "high", // category: "metrics", // title: "Implement metrics collection for unmonitored services", // description: "Deploy metric exporters...", // affectedServices: ["Email Worker"] // }, // ... // ]
services (array, required): Array of service objects with:
name (string): Service namehasMetrics (boolean): Whether metrics collection is configuredhasAlerts (boolean): Whether alerting is configuredhasLogs (boolean): Whether log collection is configuredReturns an object with:
gaps (array): Identified monitoring gaps, each containing:
service (string): Service namegapType ('metrics' | 'alerts' | 'logs' | 'critical'): Type of gapseverity ('critical' | 'high' | 'medium'): Gap severitydescription (string): What is missingimpact (string): Business/operational impactrecommendations (array): Prioritized recommendations, each containing:
priority ('high' | 'medium' | 'low'): Action prioritycategory ('metrics' | 'alerts' | 'logs' | 'infrastructure'): Recommendation typetitle (string): Short recommendation titledescription (string): Detailed implementation guidanceaffectedServices (array): List of services this applies tocoverageScore (number): Overall coverage score 0-100 (based on % of services with complete monitoring)summary (string): Human-readable analysis summarymetadata (object):
totalServices: Number of services analyzedservicesWithGaps: Number of services with at least one gapcriticalGaps: Number of critical severity gapsanalyzedAt: ISO timestampcoverageBreakdown: Coverage percentages by type (metrics, alerts, logs)Score = (Total monitoring components present) / (Total services × 3) × 100
Each service can have up to 3 components (metrics, alerts, logs). A service with all three counts as 100% covered.
// All services fully monitored const result = await monitoringGapAnalysisTool.execute({ services: [ { name: 'API', hasMetrics: true, hasAlerts: true, hasLogs: true }, { name: 'DB', hasMetrics: true, hasAlerts: true, hasLogs: true } ] }); // coverageScore: 100 // gaps: []
// Some gaps across services const result = await monitoringGapAnalysisTool.execute({ services: [ { name: 'API', hasMetrics: true, hasAlerts: true, hasLogs: false }, { name: 'Worker', hasMetrics: true, hasAlerts: false, hasLogs: false } ] }); // coverageScore: 50 // gaps: 3 (1 medium for API logs, 2 high for Worker alerts/logs)
// Unmonitored service const result = await monitoringGapAnalysisTool.execute({ services: [ { name: 'Legacy Service', hasMetrics: false, hasAlerts: false, hasLogs: false } ] }); // coverageScore: 0 // gaps: 1 critical // recommendations: High priority infrastructure setup
MIT
Downloads/month
6
GitHub Stars
0
Quality Score