Development of monitoring dashboard for auto-populate in 1С-Bitrix
The parser works, products populate, but answer simple questions — "how many products updated today?", "what's the error percentage?", "which source is most problematic?" — impossible without a dashboard. Standard Bitrix event journal doesn't work for this: it shows raw records, not aggregates. You need a separate screen with metrics, charts, and health indicators.
What to display on dashboard
Dashboard answers "is everything okay?" in 5 seconds. Key metrics:
Status indicators (top bar):
- Total sources / active / with errors.
- Products processed today: created / updated / skipped / errors.
- Last successful run time for each source.
Charts (central area):
- Elements processed per day (stacked bar — created/updated/skipped/error).
- Parse execution time by source (line chart).
- Error percentage by source (bar chart).
Sources table (bottom):
| Source | Status | Last run | Elements | Errors | Time | Next run |
|---|---|---|---|---|---|---|
| Supplier A | OK | 14:30 | 12,450 | 3 (0.02%) | 8m 12s | 20:30 |
| Supplier B | ERROR | 12:00 | 0 | — | — | (stopped) |
Color scheme: green — last run succeeded and was less than 2 intervals ago, yellow — errors >1%, red — last run failed or overdue.
Data source
Dashboard is built on parser task table data. Minimal schema:
CREATE TABLE parser_task (
id SERIAL PRIMARY KEY,
source_id INT NOT NULL,
status VARCHAR(20),
started_at TIMESTAMP,
finished_at TIMESTAMP,
total_items INT DEFAULT 0,
created_items INT DEFAULT 0,
updated_items INT DEFAULT 0,
error_items INT DEFAULT 0
);
Aggregation done with SQL queries when loading dashboard. For daily chart:
SELECT DATE(started_at) AS day,
SUM(created_items) AS created,
SUM(updated_items) AS updated,
SUM(error_items) AS errors
FROM parser_task
WHERE started_at >= NOW() - INTERVAL '30 days'
GROUP BY DATE(started_at)
ORDER BY day;
On catalogs with up to 100,000 products and 10 sources, these queries run instantly. For large projects, add materialized table parser_stats_daily, updated hourly by agent.
Implementation in admin panel
Dashboard implemented as admin page (/local/admin/parser_dashboard.php), connected via module menu. For charts use Bitrix-built amCharts library (available in CAdminPage) or add Chart.js via $APPLICATION->AddHeadScript().
Page structure:
-
Card widgets at top —
<div>with numeric indicators, styled viaadm-detail-content. Bitrix CSS provides classesadm-info-message,adm-warning-message,adm-error-messagefor color indication. - Canvas charts in center — data loaded via AJAX request to handler returning JSON with aggregates.
- CAdminList at bottom — standard source list with custom columns.
Auto-update
Dashboard must update without page reload. Add setInterval with 60-second period requesting /local/admin/ajax/parser_stats.php. Handler returns JSON with current state. On client, update card numbers and redraw charts.
For "parser running now" indication use polling parser_task status with status = 'running'. Show animated spinner next to source name.
Alerts from dashboard
Add "Configure alerts" button next to each source. On click — modal with thresholds: max error percent, max execution time, max delay between runs. Thresholds stored in b_option. Agent checks thresholds and sends notification when exceeded.
Implementation timescale
| Component | Time |
|---|---|
| SQL aggregation + AJAX handler | 1-2 days |
| Cards + source table | 1-2 days |
| Charts (Chart.js) | 2-3 days |
| Auto-update + running indicator | 1 day |
| Alert threshold config | 1-2 days |
| Total | 1-2 weeks |







