A modern, real-time server status monitoring dashboard built with React and TypeScript. This application provides a clean and intuitive interface for monitoring the operational status of multiple servers.
- π Real-time server status monitoring
- π Historical uptime tracking
- π± Responsive design
- β‘ Fast and lightweight
- π₯οΈ Fullscreen mode
- π Auto-refresh every hour
- π Uptime percentage calculations
- π¨ Clean, modern UI with dark mode
- Zabbix 5 integration
- React 18
- TypeScript
- Vite
- Tailwind CSS
- Font Awesome Icons
- date-fns
- zabbix/python3 for fetching the data
- Node.js (v16 or higher)
- npm or yarn
npm installWill use the status-history.json in the public directory
npm run devWill use the status-history.json in the dist (current) directory
npm run buildThis application can fetch real-time monitoring data from Zabbix using the scripts/fetch-zabbix.py script.
- Python 3.x
requestslibrary (pip install requests)- Access to a Zabbix server with API enabled (tested on Zabbix 5)
- Zabbix user credentials with read permissions
-
Install Python dependencies:
pip install requests # Or on debian flavors : apt install python3 python3-requests -
Edit the fetch-zabbix.py script and configure the following variables:
# Zabbix server configuration zabbix_url = "https://YOUR-SERVER/zabbix/api_jsonrpc.php" username = "your-zabbix-username" password = "your-zabbix-password" # Output file path (should match your build directory) output_file = "dist/status-history.json" # Host filter (regex pattern to filter specific hosts) host_filter = r"^v\d+\..*" # Example: hosts starting with 'v' followed by numbers # History retention in days history_duration_days = 90
-
Create data JSON
# Generate/update data from Zabbix python3 scripts/fetch-zabbix.py
For production/automated deployments (quiet mode):
python3 scripts/fetch-zabbix.py -qThe script performs the following operations:
- Authentication: Connects to Zabbix API using provided credentials
- Host Discovery: Retrieves hosts matching the configured filter pattern
- Data Collection: Fetches ICMP ping data for each host
- Historical Analysis: Processes daily uptime statistics
- JSON Generation: Creates/updates the status-history.json file with:
- Server status history
- Uptime percentages
- Last update timestamps
- Historical data (configurable retention period)
The generated JSON follows this structure:
{
"lastUpdated": "2023-12-01T10:00:00Z",
"servers": [
{
"id": "10001",
"name": "server1.example.com",
"history": [
{
"timestamp": "2023-12-01",
"up": true,
"average": 0.9876
}
]
}
]
}You can use any script to generate the JSON structure above
For continuous monitoring, you can set up a cron job to automatically update the data:
# Update every hour
0 * * * * cd /path/to/project && python3 scripts/fetch-zabbix.py -qsrc/
βββ components/ # React components
β βββ ServiceRow.tsx # Individual server status row
β βββ StatusBar.tsx # Status history visualization
β βββ StatusGrid.tsx # Grid view of server status
β βββ StatusPage.tsx # Main status dashboard
βββ hooks/ # Custom React hooks
β βββ useFullscreen.ts # Fullscreen mode functionality
β βββ useInterval.ts # Auto-refresh functionality
βββ types/ # TypeScript type definitions
β βββ server.ts # Server and status types
βββ utils/ # Utility functions
β βββ calculations.ts # Uptime calculations
βββ App.tsx # Root component
βββ index.css # Main CSS file
βββ main.tsx # Application entry point
- Visual indicators for server status (up/down)
- Historical status timeline
- Last update timestamp
- Timeline view of server status
- Quick visual reference for past performance
- Hover details for specific timestamps
- Percentage-based uptime calculations
- Historical data analysis
- Clear status indicators
- Automatic data updates every hour
- Manual refresh capability
- Last refresh timestamp display
- Toggle fullscreen view
- Optimized display for monitoring screens
- Keyboard shortcut support
This application was developed by Answeb, an agency specialized in web development and e-commerce solutions. Answeb supports businesses in their digital transformation by creating custom solutions tailored to their specific needs.
Answeb Expertise:
- WordPress & WooCommerce, Prestashop development
- ERP integrations and business solutions
- Custom connectors and APIs
- Advanced e-commerce solutions
For any technical questions or feature requests for this application, you can contact the Answeb team through our website.
