Configuring the 1C-Bitrix event log

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
    1177
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • 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
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Setting up event journal in 1C-Bitrix

Event journal in Bitrix (b_event_log) — built-in audit mechanism that by default works in minimal configuration. Out of the box it logs logins and critical system operations, but doesn't record business actions: catalog changes, order operations, iblock actions. Journal setup — this is bringing it to state where it's really useful for incident resolution.

Enabling and basic configuration

Journal management: Settings → Product settings → Module settings → Main module → "Event Journal" tab.

Parameters to set:

  • Record events — enable (may be disabled by default)
  • Record retention time — recommended 90 days for production, 30 days for dev environment
  • Event types — mark all necessary categories

Available event types in stock setup:

Type Code What records
Login USER_LOGIN Successful login
Login error USER_LOGIN_FAILED Failed login attempts
Logout USER_LOGOUT Session termination
User change USER_EDIT Profile/rights editing
Rights change GROUP_POLICY_CHANGED Security policy changes
File operations FILE_DELETE Deletion via file manager

Viewing and filtering

Journal accessible in Settings → Tools → Event Journal. Interface supports filtering by:

  • Event type (AUDIT_TYPE_ID)
  • Module (MODULE_ID)
  • User (USER_ID)
  • Period (TIMESTAMP_X)
  • Severity level (SEVERITY: INFO, WARNING, SECURITY)

Stock interface problem — lack of full-text search by DESCRIPTION field. If you need to find specific change, use SQL:

SELECT * FROM b_event_log
WHERE AUDIT_TYPE_ID = 'IBLOCK_ELEMENT_UPDATE'
  AND DESCRIPTION LIKE '%"PRICE"%'
  AND TIMESTAMP_X >= '2024-01-01'
ORDER BY TIMESTAMP_X DESC
LIMIT 100;

Extending event list

Stock event set covers security, but not business logic. To add custom event types use CEventLog::Add():

CEventLog::Add([
    'SEVERITY' => 'INFO',
    'AUDIT_TYPE_ID' => 'CUSTOM_ORDER_STATUS',
    'MODULE_ID' => 'sale',
    'ITEM_ID' => $orderId,
    'DESCRIPTION' => "Status changed: $oldStatus → $newStatus",
]);

Custom types automatically appear in journal filter. Recommended to use prefix (CUSTOM_) to distinguish from stock types.

Auto-cleanup setup

Without rotation, b_event_log table grows to hundreds of thousands of records. Auto-cleanup configured via agent:

CAgent::AddAgent(
    "CEventLog::CleanUpAgent();",
    "main",
    "N",
    86400  // once a day
);

Agent deletes records older than period set in module settings. If you need archive — export data via CEventLog::GetList() to CSV or separate table before cleanup.

Security monitoring via journal

Practical minimum for tracking suspicious activity:

  • Brute force — more than 5 USER_LOGIN_FAILED records from one IP in 10 minutes
  • Privilege escalationUSER_EDIT event with group change to administrator
  • Mass deletion — series of element deletion events in short time span

For automatic notification on these situations you need separate analyzer script, running by cron, which parses fresh records and sends notification via CEvent::Send().

Event journal setup — one working day task. Result: full visibility of critical user actions with rotation and quick incident search.