Skip to content

Conversation

@konard
Copy link
Contributor

@konard konard commented Oct 30, 2025

Summary

This PR implements a comprehensive public monitoring system to track API latency and service availability across Deep Assistant infrastructure, addressing issue #18.

What's Included

  • Monitoring Service (monitoring.mjs): Node.js-based service that periodically checks endpoints and measures latency
  • Status Dashboard (status.html): Beautiful, responsive web interface for real-time status visualization
  • GitHub Actions Workflow: Automated monitoring that runs every 5 minutes and commits data
  • Comprehensive Documentation (MONITORING.md): Full setup and deployment guide
  • Test Suite (monitoring.test.mjs): Automated tests to verify functionality

Features

✅ Tracks minimum API latency (ping and HTTP endpoint checks)
✅ Monitors service availability and uptime percentage
✅ Records historical data (24 hours of metrics)
✅ Real-time status dashboard with auto-refresh
✅ Configurable check intervals and service endpoints
✅ Multiple deployment options (standalone, GitHub Actions, static hosting)

Monitored Metrics

For each service, the system tracks:

  • Current Latency: Response time for the most recent check
  • Average Latency: Mean response time over last 10 checks
  • Minimum Latency: Fastest response time over last 10 checks
  • Success Rate: Uptime percentage based on recent checks
  • Operational Status: Real-time service health indicator

Services Monitored

  • API Gateway
  • Telegram Bot
  • Web Capture Microservice

Deployment Options

  1. GitHub Actions (Recommended): Automated monitoring via scheduled workflow
  2. Standalone Server: Run continuously on any Node.js server
  3. Manual/On-Demand: Single checks for testing and debugging

Usage

# Continuous monitoring (default)
node monitoring.mjs

# Single check
node monitoring.mjs --once

# Run tests
node monitoring.test.mjs

Documentation

Testing

All tests pass successfully:

  • ✅ Monitoring check runs successfully
  • ✅ Status file is created
  • ✅ History file is created
  • ✅ Service metrics are tracked
  • ✅ Multiple checks accumulate history

Next Steps

Once merged, the GitHub Actions workflow will automatically start monitoring services every 5 minutes and updating the public status page.


Fixes #18

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: undefined
@konard konard self-assigned this Oct 30, 2025
Implements comprehensive monitoring solution to track minimum API latency
and service availability across Deep Assistant infrastructure.

Features:
- Automated monitoring service (monitoring.mjs) with configurable intervals
- Real-time status dashboard (status.html) with responsive design
- Historical data tracking (24 hours of metrics)
- GitHub Actions workflow for continuous monitoring
- Comprehensive test suite for monitoring functionality

Tracks the following metrics:
- Current, average, and minimum latency for each service
- Service operational status and uptime percentage
- Historical trends and performance data

The monitoring system can run in:
- Continuous mode (default): checks every minute
- Single-check mode (--once): for testing and debugging
- GitHub Actions scheduled workflow: automated updates every 5 minutes

Resolves #18

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Add public monitoring Add public monitoring system for API latency tracking Oct 30, 2025
@konard konard marked this pull request as ready for review October 30, 2025 04:44
@konard
Copy link
Contributor Author

konard commented Oct 30, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

📎 Log file uploaded as GitHub Gist (236KB)
🔗 View complete solution draft log


Now working session is ended, feel free to review and add any feedback on the solution draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add public monitoring

2 participants