Observability
Learn about Whinself's observability features and how to effectively monitor your WhatsApp API integration.
Monitoring Overview
Whinself provides multiple ways to monitor the health, performance, and activity of your WhatsApp API integration. Effective monitoring ensures you can identify and resolve issues quickly, track usage patterns, and maintain optimal performance.
Health Monitoring
Whinself offers several options for monitoring system health:
- Dashboard Status Indicators: Visual indicators in the web interface show connection status, WhatsApp network connectivity, and webhook configuration
- Health Endpoint: A dedicated
/health
endpoint returns the current status of the Whinself service - Connection Status API: Programmatically check WhatsApp connection status via API
Example health check:
curl http://WHINSELF_IP:PORT/health
Response:
{
"status": "healthy",
"whatsapp_connection": "connected",
"webhook_configured": true,
"uptime": "3d 4h 12m",
"version": "1.2.3"
}
Logging
Whinself provides comprehensive logging capabilities to help you diagnose issues and understand system behavior:
Logging Options
- Standard Output Logging: Enable with
logstdout: true
in config.json - Server-Sent Events (SSE): Real-time log streaming with
logsse: true
- Debug Level Configuration: Control log verbosity with
debuglevel
setting - Structured Logging: JSON-formatted logs for easy parsing and analysis
Viewing Logs
- Dashboard Log Viewer: Real-time log viewing in the web interface
- Docker Logs: View logs using Docker's standard logging capabilities:
docker logs whatsapp-bot
- SSE Logs: Subscribe to real-time log events at
/events/logs
Log Levels
Whinself uses the following log levels, controlled by the debuglevel
setting:
- 0: Error and critical information only
- 1: Warnings and important operational events
- 2: Info level - normal operations
- 3: Debug level - detailed information
- 4: Trace level - verbose debugging
Metrics and Analytics
While Whinself doesn't include a built-in metrics system, you can implement metrics collection by:
Webhook Data Analysis
- Capture and analyze webhook events to generate metrics
- Track message volume, response times, and engagement patterns
- Store historical data for trend analysis
Custom Metrics Collection
- Track API call frequency and latency
- Monitor resource usage (CPU, memory, network)
- Measure WhatsApp session health and reconnection frequency
Integration with Monitoring Tools
Whinself can be integrated with external monitoring systems:
- Prometheus: Implement a metrics exporter for your Whinself instance
- Grafana: Create dashboards based on collected metrics
- ELK Stack: Forward logs to Elasticsearch for analysis with Kibana
- Cloud Monitoring: Integrate with AWS CloudWatch, Google Cloud Monitoring, etc.
Best Practices
For optimal observability with Whinself:
- Set Appropriate Log Levels: Use higher debug levels during troubleshooting, lower for production
- Implement Log Rotation: Prevent disk space issues by rotating Docker logs
- Create Alerts: Set up alerts for critical events like disconnections
- Monitor System Resources: Watch container resource usage for potential bottlenecks
- Regular Log Analysis: Review logs periodically to identify patterns or issues
Note: Whinself is an unofficial third-party tool that connects to the WhatsApp network using your personal credentials. It is not an official WhatsApp API and is not affiliated with or endorsed by WhatsApp or Meta Platforms, Inc.