Skip to content

Integrates Gabriel video surveillance alarms with Sigma Cloud in real time. Enriches, transforms, and forwards events to Sigma Cloud’s API with logging, fault tolerance, and retry logic.

Notifications You must be signed in to change notification settings

gabrielmendezsoares/sigma-cloud-gabriel-integration

Repository files navigation

🚨 Sigma Cloud Gabriel Integration

📋 Overview

This service facilitates integration between Sigma Cloud and Gabriel video surveillance systems, enabling real-time alarm event forwarding. It listens for alarms triggered by Gabriel devices, enriches them with contextual data (such as account, partition, IP, MAC, and channel information), transforms them into Sigma Cloud-compatible formats, and sends them to the Sigma Cloud Events API.

The service also stores the status of each event (sent or failed) in a local database for monitoring, auditing, and retry logic. This integration ensures that motion and intrusion alarms from Gabriel devices are seamlessly reflected in Sigma Cloud’s central monitoring interface.

🎯 Objectives

  • Integrate Gabriel alarms into the Sigma Cloud platform in real-time
  • Enrich alarm data with account, partition, network, and channel context using Segware’s Accounts API
  • Map and transform event types (e.g., motion and intrusion) into standardized Sigma Cloud Contact ID codes
  • Authenticate securely via Bearer tokens for protected API communication with Sigma Cloud
  • Log and persist all alarm events, including their metadata and delivery status (sent or failed)
  • Provide fault-tolerant handling for failures in external APIs with isolated retries and status tracking
  • Support scalable and concurrent alarm processing using Promise.allSettled for high-throughput environments

📦 Quick Start

⚠️ Prerequisites

  • Node.js20.14.0JavaScript runtime environment
  • MySQL8.0Relational database

⚙️ Setup

# Clone & navigate
git clone <repository-url> && cd sigma-cloud-gabriel-integration

# Configure environment
cp .env.example .env  # Edit with your settings

# Install dependencies (auto-runs database setup)
npm install

💡 Database: Import storage.sql.example before running npm install


⚡ Usage

🛠️ Development

npm run start:development

🏗️ Production

npm run build && npm run start:production

📚 Command Reference

🧰 Core

Command Description
npm run start:development Start the application in development
npm run start:production Start the application in production
npm run build Build the application for production
npm run build:watch Build the application with watch mode
npm run clean Clean application build artifacts

🛢️ Database

Command Description
npm run db:pull Pull database schema into Prisma across all schemas
npm run db:push Push Prisma schema to the database across all schemas
npm run db:generate Generate Prisma Client for all schemas
npm run db:migrate:dev Run development migrations across all schemas
npm run db:migrate:deploy Deploy migrations to production across all schemas
npm run db:studio Open Prisma Studio (GUI) across all schemas
npm run db:reset Reset database (pull + generate) for all schemas

🐳 Docker

Command Description
npm run docker:build:development Build Docker image for development
npm run docker:build:production Build Docker image for production
npm run docker:run:development Run development Docker container
npm run docker:run:production Run production Docker container
npm run docker:compose:up:development Start Docker Compose in development
npm run docker:compose:up:production Start Docker Compose in production
npm run docker:compose:up:build:development Start & rebuild Docker Compose in development
npm run docker:compose:up:build:production Start & rebuild Docker Compose in production
npm run docker:compose:down Stop Docker Compose services
npm run docker:compose:logs View Docker Compose logs
npm run docker:prune Clean up unused Docker resources

🧪 Testing

Command Description
npm test Run all tests once
npm run test:watch Run tests in watch mode
npm run test:coverage Run tests and generate a coverage report

About

Integrates Gabriel video surveillance alarms with Sigma Cloud in real time. Enriches, transforms, and forwards events to Sigma Cloud’s API with logging, fault tolerance, and retry logic.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published