Setting up 1C-Bitrix crash notifications

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1189
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    813
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    657
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Setting up Failure Alerts for 1C-Bitrix

Your Bitrix site crashes, and you learn about it from a customer who couldn't place an order. Typical situation: error 500 hangs for three hours until a manager accidentally visits the site. Built-in Bitrix monitoring via monitoring module is only available in «Business» and higher editions, and even then it doesn't cover all scenarios. Let's explore how to build a notification system that reacts to failures in seconds, not hours.

What Exactly to Monitor

Minimum control points:

  • HTTP-status of main and critical pages — catalog, cart, checkout. If /catalog/ returns 200 but /personal/order/make/ — 500, general healthcheck on homepage shows nothing.
  • Cron health — Bitrix agents (/bitrix/modules/main/tools/cron_events.php) should execute regularly. Checked by last successful run date in b_agent table.
  • MySQL/MariaDB availability — check not just connection, but execute test SELECT. Bitrix on DB loss shows white screen without logging.
  • Free disk space — when /tmp or /upload/ partition fills, site starts throwing write errors for sessions and cache.
  • error.log size — sudden growth of /var/log/php-fpm/error.log or /bitrix/modules/main/tools/log.txt signals problem before it becomes visible to users.

Built-in Bitrix Tools

Module monitoring (if available) configured in Settings → Monitoring. Can check site availability by HTTP, track agents, send email notifications. Limitations: works only with live PHP, doesn't check external dependencies, doesn't integrate with messengers without customization.

More useful is Event Log (b_event_log). Via API CEventLog::Add() you can log custom events, and via filters in admin — set notifications for certain severity.

External Monitoring — Main Channel

Reliable setup built on external service that polls site from outside. Working options:

Tool What checks Notification channels
UptimeRobot (free) HTTP-status, keyword check Email, Telegram, Slack, webhook
Healthchecks.io Cron tasks (dead man's switch) Email, Telegram, PagerDuty
Zabbix / Prometheus + Alertmanager Everything: HTTP, disk, CPU, logs Any via integrations

For small projects UptimeRobot with checks every 5 minutes + Healthchecks.io for cron is enough. For medium and large — Prometheus with blackbox_exporter for HTTP probes and node_exporter for server metrics.

Implement Healthcheck Endpoint

Create /healthcheck.php file in site root, which checks key subsystems:

  • DB connection via $DB->Query("SELECT 1")
  • memcached/redis availability via CBitrixCache
  • write to temp directory
  • license key presence (check CModule::IncludeModule('main'))

If all checks pass — return HTTP 200 with body OK. Any failure — HTTP 503. External monitoring hits this endpoint and reacts to non-200 status.

Telegram Notifications

For Bitrix24 there's built-in webhook integration. For 1C-Bitrix sites easiest to send alerts via Telegram Bot API directly from error handler. In init.php register custom handler via set_exception_handler(), which on critical errors sends POST request to api.telegram.org/bot{TOKEN}/sendMessage.

Don't send every error — use throttling: not more than one message per 5 minutes per error type. Otherwise on mass failure Telegram will block bot for spam.