π@hsuite/health - Comprehensive System Health Monitoring
π₯ Advanced health monitoring and system diagnostics library for NestJS applications with DAG network monitoring
Enterprise-grade health monitoring solution providing real-time system resource tracking, service health checks, performance metrics collection, and specialized DAG network monitoring with event-driven updates and comprehensive diagnostics.
Complete guide to setting up comprehensive health monitoring for your application. Comprehensive setup instructions covering health indicator configuration, system monitoring, resource tracking, service health checks, and enterprise-grade health monitoring with real-time alerts and notifications.
DAG Network Monitoring Guide
Learn how to implement and monitor DAG network health with event-driven updates. Advanced monitoring guide covering DAG network connectivity, consensus monitoring, network performance tracking, event-driven health updates, and enterprise-grade network monitoring with automated diagnostics.
Performance Optimization Guide
Best practices for optimizing health monitoring performance and resource usage. Detailed optimization guide covering monitoring efficiency, resource utilization optimization, performance tuning, scalability improvements, and enterprise-grade performance optimization for health monitoring systems.
Alert and Threshold Management Guide
Set up proactive monitoring with alerts and threshold-based notifications. Comprehensive guide for implementing alert systems, threshold configuration, notification management, escalation procedures, and enterprise-grade monitoring with automated alerting and incident response.
π― Examples
Comprehensive Health Monitoring Service
DAG Network Monitoring Service
Advanced Redis Configuration Service
Health Metrics Analytics Service
π Integration
Required Dependencies
Module Integration
Documentation Generation
Environment Configuration
Integration with HSuite Ecosystem
Performance Considerations
π Caching Strategy
1-Second Caching - Health checks and metrics responses cached for optimal performance
Memory Management - Efficient resource metrics collection with OS utilities
Event-Driven Updates - DAG network status uses events to reduce polling overhead
π§ Optimization Features
Multi-core CPU Calculations - Advanced CPU usage calculations for multi-core systems
Efficient Collection - Optimized OS utility integration for resource monitoring
Connection Pooling - Redis connection optimization for health checks
π‘οΈ Error Handling
Comprehensive Exception Management - Proper error types and detailed messages
Graceful Degradation - Fallback mechanisms for failed health checks
Service Isolation - Individual service failures don't affect overall monitoring
π₯ Enterprise Health Monitoring: Comprehensive system diagnostics with real-time resource tracking and specialized DAG network monitoring.
π Advanced Analytics: Performance analysis, trend calculation, and intelligent recommendations for system optimization.
π DAG Network Integration: Event-driven network monitoring with threshold management and automated status updates.
import { HealthService } from '@hsuite/health';
@Injectable()
export class MonitoringService {
constructor(private healthService: HealthService) {}
async checkSystemHealth() {
const health = await this.healthService.check();
console.log('System status:', health.status);
return health;
}
}
src/
βββ index.ts # Main entry point and exports
βββ health.module.ts # Dynamic module with Redis configuration
βββ health.controller.ts # REST endpoints for health checks
βββ health.service.ts # Core health monitoring service
βββ interfaces/
β βββ infos.interface.ts # Health metrics interfaces
βββ models/
β βββ infos.model.ts # Health metrics model implementations
βββ custom/
βββ dag.health.ts # DAG network health indicator