check_health
Monitor and verify the operational status of the SEQ server to ensure proper functionality and accessibility for log querying and analysis tasks.
Instructions
Check the health status of the SEQ server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:295-310 (handler)The handler function for the 'check_health' tool. It retrieves the health status from the SeqClient and formats it as a JSON text response.private async checkHealth() { const health = await this.seqClient.getHealthStatus(); return { content: [ { type: 'text', text: JSON.stringify({ status: health.status, message: health.message || 'SEQ server is operational', timestamp: new Date().toISOString() }, null, 2) } ] }; }
- src/index.ts:102-110 (registration)Registration of the 'check_health' tool in the ListTools response, including name, description, and input schema (empty object).{ name: 'check_health', description: 'Check the health status of the SEQ server', inputSchema: { type: 'object', properties: {}, required: [] } }
- src/index.ts:127-128 (registration)Dispatcher switch case in CallToolRequest handler that invokes the checkHealth method for the 'check_health' tool.case 'check_health': return await this.checkHealth();
- src/seq-client.ts:69-85 (helper)Supporting utility in SeqClient that performs the actual HTTP health check on the SEQ server via /api/health endpoint and determines status.async getHealthStatus(): Promise<{ status: 'healthy' | 'degraded' | 'unhealthy'; message?: string }> { try { await this.client.get('/api/health'); return { status: 'healthy' }; } catch (error) { if (axios.isAxiosError(error)) { const message = error.response?.data ? (error.response.data as { message?: string }).message || error.message : error.message; return { status: 'unhealthy', message }; } return { status: 'unhealthy', message: 'Unknown error' }; } }