Skip to main content

Customize integration with RuSIEM SIEM system

  1. If you do not have the RuSIEM system installed, install it.
  2. Optional: configure ports for audit log ingestion in RuSIEM.
  3. Create a service user.
  4. Get an account-scoped IAM token.
  5. Get the script to export audit logs.
  6. Configure and run the script.
  7. Configure audit log ingestion in RuSIEM.

1. Install RuSIEM

  1. Open the CLI.

  2. Install RuSIEM:

    wget https://files.rusiem.tech/nextcloud/s/j6wcHzzaqT8w5wc/download -O install.sh; bash ./install.sh
  3. In the interactive menu, specify the system parameters. Learn more in the documentation of RuSIEM.

2. Optional: change the port for receiving audit logs in RuSIEM

  1. Log in to the RuSIEM web interface.
  2. Go to Settings → Microservice Settings.
  3. Select the Expert Mode checkbox.
  4. Click .
  5. Change the port number in the syslog configuration.
  6. Click Save.

3. Create a service user

Add a service user with the role audit_logs.admin.

Users can be added by the Account Owner or users with the role iam.admin.

4. Obtain an IAM token for your account

Get an account-scoped IAM token for the service user you created in step 3.

5. Obtain a script for exporting audit logs

We have prepared a script for exporting audit logs — it allows you to export logs to a file, as well as send them to a specified IP address or endpoint via syslog or HTTP/HTTPS.

  1. Open the CLI.

  2. Clone the script repository:

    git clone https://github.com/t-rex-general/auditlog-integration.git

    The script files will be saved to the working directory in the auditlog-integration folder.

6. Configure and run the script

  1. Open the CLI.

  2. Create a virtual environment:

    python3 -m venv .venv
  3. Activate the virtual environment:

    source .venv/bin/activate
  4. Go to the script folder:

    cd auditlog-integration
  5. Install the necessary dependencies:

    pip3 install -r requirements.txt
  6. Create the .env configuration file:

    touch .env
  7. Open the .env configuration file:

    nano .env
  8. Fill in the .env configuration file:

    8.1. Add a block with authentication parameters for the Audit Logs service API:

    AUDIT_LOGS_URL=<base_url>/v1/logs
    USERNAME=<username>
    PASSWORD=<password>
    ACCOUNT_ID=<account_id>

    Specify:

    • <base_url> — URL to access the Audit Logs API in the required pool. You can find the list of URLs in the subsection Audit logs of the instructions List of URLs;
    • <username> — username of the service user you created in step 3;
    • <password> — password of the service user. If the password contains the characters [ ] \ ^ $. |? * + (), escape them by adding a backslash before the character: \;
    • <account_id> — account number, which can be found in the Control Panel in the top right corner.

    8.2. Add a block with event submission parameters:

    TRANSPORT_TYPE=syslog
    SYSLOG_ENABLED=true
    SYSLOG_HOST=<syslog_host>
    SYSLOG_PORT=<syslog_port>

    Specify:

    • <syslog_host> — IP address of the SIEM system;
    • <syslog_port> — port of the SIEM system.

    8.3. Add a line with the API request interval:

    POLL_INTERVAL=<poll_interval>

    Specify <poll_interval> — API polling interval in seconds (default is 30).

    8.4. Save and exit the file by pressing Ctrl+X → Y → Enter.

  9. Run the script:

    python3 main.py

7. Configure receiving audit logs in RuSIEM

  1. In the RuSIEM web interface, go to Events → All Events.
  2. On the top bar, click Parameters.
  3. Select the Search Unparsed Events checkbox.
  4. Click Save.
  5. In the Filter Settings field, enter your Selectel account number and click . You can find the account number in the Control Panel in the top right corner. The RuSIEM web interface will display events from the Audit Logs service.