import { ServiceNowInstance } from "../ServiceNowInstance.js"; import { AggregateQuery } from "../aggregate/AggregateQuery.js"; import { HealthCheckOptions, HealthCheckResult } from './HealthModels.js'; /** * InstanceHealth provides a consolidated health check for a ServiceNow instance. * Checks version info, cluster status, stuck jobs, semaphores, and operational counts. * Each sub-check is isolated — a failure in one does not affect others. */ export declare class InstanceHealth { private static readonly SYS_PROPERTIES_TABLE; private static readonly SYS_CLUSTER_STATE_TABLE; private static readonly SYS_TRIGGER_TABLE; private static readonly SYS_SEMAPHORE_TABLE; private _logger; private _tableAPI; private _aggregateQuery; private _instance; constructor(instance: ServiceNowInstance, aggregateQuery?: AggregateQuery); /** * Run a consolidated health check on the instance. * Each sub-check is wrapped in try/catch — failures return null for that check * without affecting the overall result. * * @param options Options to control which checks are run * @returns HealthCheckResult with all collected information and a summary */ checkHealth(options?: HealthCheckOptions): Promise; /** * Get instance version information from sys_properties. * @private */ private _getVersionInfo; /** * Get cluster node status from sys_cluster_state. * @private */ private _getClusterStatus; /** * Get stuck jobs from sys_trigger (state=0 and next_action overdue). * @private */ private _getStuckJobs; /** * Get count of active semaphores from sys_semaphore. * @private */ private _getActiveSemaphores; /** * Get operational counts using AggregateQuery. * @private */ private _getOperationalCounts; /** * Build a human-readable summary string from the health check results. * @private */ private _buildSummary; }