Overview
The status page is accessible at/status and displays:
- Service Status: Real-time availability of all server components
- System Metrics: CPU and memory usage (admin only)
- Server Configuration: Environment variables and settings (owner only)
Service Status
The service status section displays the operational status of all monitored services.Status Indicators
Services are displayed as cards with color-coded borders:- Green: Service is up and operational
- Orange: Service is degraded
- Red: Service is down
- Gray: Status unknown
src/pages/status.vue:129-145
Monitored Services
The system automatically monitors all services registered inserver/singleton/service that implement the Monitored interface.
Auto-Refresh
Service status refreshes automatically every 60 seconds:src/pages/status.vue:21-28
System Metrics (Admin Only)
Administrators and owners see additional system performance metrics.System Load
Displays CPU usage broken down by:- User: CPU time spent in user space
- System: CPU time spent in kernel space
src/server/backend/$base/server/monitor.ts:35-51
Application Load
Shows CPU usage specifically for the Guccho application:- Total: Total application CPU usage
- Web: Web server process usage
- Other: Additional background processes
src/server/backend/$base/server/monitor.ts:53-69
Memory Usage
Displays system memory statistics:- Active: Memory currently in use
- Cache: Memory used for disk caching
- Free: Available memory
- Total: Total system memory
src/server/backend/$base/server/monitor.ts:71-84
Visual Representation
Metrics are displayed as progress bars with color-coded segments:src/pages/status.vue:209-228
Metric Refresh Rate
Admin metrics update every 2 seconds for near real-time monitoring:src/pages/status.vue:15-37
Server Configuration (Owner Only)
Server owners see additional configuration information.App Configuration
Displays the runtime Nuxt configuration object:src/pages/status.vue:233-240
NPM Environment
Shows npm-related environment variables:src/pages/status.vue:244-250
System Environment
Displays all environment variables (excluding sensitive npm package info):src/server/backend/$base/server/monitor.ts:97-135
Access Control
The status page has tiered access levels:Public Access
Available to: Everyone Displays:- Service status cards
- Service descriptions
src/pages/status.vue:21
Admin Access
Available to: Admins and Owners Additional displays:- System load (CPU usage)
- Application load breakdown
- Memory usage statistics
src/pages/status.vue:15-19
Owner Access
Available to: Server Owners only Additional displays:- Application configuration
- NPM environment variables
- System environment variables
src/pages/status.vue:9-13
API Endpoints
The status page uses tRPC endpoints:src/server/trpc/routers/status.ts:5-9
Endpoints
status.public- Returns service status (public)status.metrics- Returns system metrics (admin)status.config- Returns configuration (owner)
Implementing Service Monitoring
To make a service appear on the status page:1. Implement the Monitored Interface
2. Register in Service Singleton
Export your service fromserver/singleton/service:
3. Update Status Dynamically
Update the service status at any time:Monitoring Best Practices
- Set Meaningful Descriptions: Provide clear status messages that help diagnose issues
- Use Appropriate Status Levels:
Up: Service is fully operationalDegraded: Service is operational but with reduced performanceDown: Service is unavailableUnknown: Status cannot be determined
- Update Status on State Changes: Reflect service state changes immediately
- Monitor Critical Services: Ensure all essential services are monitored
- Regular Health Checks: Implement periodic health checks to detect issues early
Customization
Styling
The status page uses custom CSS for progress bars:src/pages/status.vue:273-278
Localization
The page includes translations for multiple languages:src/pages/status.vue:61-89
Number Formatting
The page uses Intl formatters for consistent number display:src/pages/status.vue:43-53
Technical Details
Metric Collection Interval
The monitor provider collects CPU metrics every 2 seconds:src/server/backend/$base/server/monitor.ts:10-140
Dependencies
The status page uses:- systeminformation: For system metrics (CPU, memory)
- JsonViewer: For displaying configuration (vue-json-viewer)
- TipTap: For rendering article content
Troubleshooting
Services Show as Unknown
If services display as “Unknown”:- Verify the service implements
Monitoredinterface - Check that the service is exported from
server/singleton/service - Ensure the service initializes its status on startup
Metrics Not Updating
If admin metrics don’t update:- Confirm you have admin or owner role
- Check browser console for API errors
- Verify the monitor provider is started:
MonitorProvider.start()
High CPU Usage
If the status page shows high CPU usage:- Check the Application Load section to identify the source
- Review recent code changes or background tasks
- Consider optimizing database queries or caching