stop_monitoring
Halt active monitoring for specific deployments or all active monitors using 'stop_monitoring'. Manage Optimizely DXP deployment processes effectively with this tool on the MCP Server.
Instructions
Stop monitoring for specific deployments or all active monitors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | ||
| deploymentId | No |
Implementation Reference
- Helper method to stop a specific database export background monitor by clearing interval and removing from mapstatic stopBackgroundMonitoring(exportId: string): boolean { const monitor = this.backgroundMonitors.get(exportId); if (monitor) { if (monitor.intervalId) { clearInterval(monitor.intervalId); } this.backgroundMonitors.delete(exportId); OutputLogger.info(`Stopped background monitoring for export ${exportId}`); return true; } return false; }
- lib/deployment-monitor.ts:194-230 (helper)Core method to stop a deployment monitor by clearing timer, marking inactive, emitting eventsstopMonitoring(monitorId: string): boolean { const monitor = this.monitors.get(monitorId); if (!monitor) { return false; } // Clear timer if (monitor.timer) { clearTimeout(monitor.timer); monitor.timer = null; } // Mark as inactive monitor.isActive = false; this.stats.activeMonitors--; this.stats.completedMonitors++; if (this.options.debug) { console.error(`Stopped monitoring deployment ${monitor.deploymentId}`); } // Emit stop event this.emit('monitorStopped', { monitorId, deploymentId: monitor.deploymentId, projectId: monitor.projectId, duration: Date.now() - monitor.startTime, updateCount: monitor.updateCount }); // Remove from active monitors after a delay (keep for stats) setTimeout(() => { this.monitors.delete(monitorId); }, 60000); // Keep for 1 minute return true; }
- lib/deployment-monitor.ts:485-492 (helper)Stops all active deployment monitors by calling stopMonitoring on eachstopAllMonitors(): number { const activeMonitors = this.getActiveMonitors(); activeMonitors.forEach(monitor => { this.stopMonitoring(monitor.id); }); return activeMonitors.length; }
- lib/tools/monitoring-tools.ts:363-363 (registration)Documents `stop_monitoring` as available tool in listMonitors responseresponse.push('• `stop_monitoring` - Stop active monitors');
- lib/utils/tool-availability-matrix.ts:314-318 (registration)Registers stop_monitoring tool in availability matrix for all hosting types'stop_monitoring': { hostingTypes: ['dxp-paas', 'dxp-saas', 'self-hosted', 'unknown'], category: 'Monitoring', description: 'Stop monitoring' },