Skip to content

The syslog_to_zerto.py script sets up a UDP syslog server that listens on port 514. Whenever a syslog message is received, the script parses the message, formats it into an alert, and sends the alert to Zerto as a checkpoint. The script uses Keycloak for authentication to obtain the access token needed for the Zerto API.

License

Notifications You must be signed in to change notification settings

ZertoPublic/syslog2zertopython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Syslog to Zerto Integration

This repository contains a Python script that acts as a syslog server, receives syslog messages, parses them, and posts the parsed alerts to Zerto as checkpoints. The script also includes Keycloak authentication to obtain an access token required for Zerto API calls.

Description

The syslog_to_zerto.py script sets up a UDP syslog server that listens on port 514. Whenever a syslog message is received, the script parses the message, formats it into an alert, and sends the alert to Zerto as a checkpoint. The script uses Keycloak for authentication to obtain the access token needed for the Zerto API.

Files

  • syslog_to_zerto.py: The main script that sets up the syslog server, handles incoming syslog messages, and posts alerts to Zerto.
  • send_syslog_message.py: A helper script to send test syslog messages to the syslog server for testing purposes.

Installation

  1. Clone the Repository: bash git clone https://github.com/yourusername/syslog-to-zerto.git cd syslog-to-zerto

  2. Install Dependencies:

    • Ensure you have Python installed.

    • Install the required Python packages:

      pip install requests

Configuration

Update the following configuration variables in syslog_to_zerto.py with your actual values:

  • zvmAddress: IP address or DNS name of your Zerto Virtual Manager.
  • keycloakClientID: The client ID defined in Keycloak.
  • keycloakClientSecret: The client secret defined in Keycloak.
  • vpgIdentifier: The identifier for your Virtual Protection Group (VPG).
  • verifyCertificate: Set to False if you want to disable SSL certificate verification.

Usage

Running the Syslog Server

  1. Run the Syslog Server: sudo python syslog_to_zerto.py

Sending Test Syslog Messages

  1. Run the Test Script: python send_syslog_message.py

About

The syslog_to_zerto.py script sets up a UDP syslog server that listens on port 514. Whenever a syslog message is received, the script parses the message, formats it into an alert, and sends the alert to Zerto as a checkpoint. The script uses Keycloak for authentication to obtain the access token needed for the Zerto API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages