sonarr_get_health
Get health check warnings and issues from Sonarr to identify problems detected in TV show monitoring and management.
Instructions
Get health check warnings and issues from Sonarr (TV). Shows any problems detected by the application.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:144-151 (registration)Tool registration for `sonarr_get_health` - created dynamically via `addConfigTools('sonarr', 'Sonarr (TV)')` which generates the tool definition with name, description, and inputSchema (no parameters required).
name: `${serviceName}_get_health`, description: `Get health check warnings and issues from ${displayName}. Shows any problems detected by the application.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, }, - src/index.ts:1220-1242 (handler)Handler implementation for `sonarr_get_health` (alongside radarr_get_health and lidarr_get_health). Extracts the service name from the tool name, gets the corresponding client, calls `client.getHealth()`, and returns health check issues with source, type, message, wikiUrl, and overall status.
case "sonarr_get_health": case "radarr_get_health": case "lidarr_get_health": { const serviceName = name.split('_')[0] as keyof typeof clients; const client = clients[serviceName]; if (!client) throw new Error(`${serviceName} not configured`); const health = await client.getHealth(); return { content: [{ type: "text", text: JSON.stringify({ issueCount: health.length, issues: health.map(h => ({ source: h.source, type: h.type, message: h.message, wikiUrl: h.wikiUrl, })), status: health.length === 0 ? 'healthy' : 'issues detected', }, null, 2), }], }; } - src/arr-client.ts:504-509 (helper)Helper method `getHealth()` on the base `ArrClient` class that makes the actual API call to `GET /api/v3/health` (or v1 for Lidarr/Prowlarr) and returns an array of `HealthCheck` objects.
/** * Get health check issues */ async getHealth(): Promise<HealthCheck[]> { return this.request<HealthCheck[]>('/health'); } - src/arr-client.ts:331-336 (schema)Type definition for `HealthCheck` interface - defines the shape of health check objects returned from the API (source, type, message, wikiUrl).
export interface HealthCheck { source: string; type: string; message: string; wikiUrl: string; }