Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Example Sync Integration

A template for building polling-based Scanopy integrations in Python.

What This Template Does

  • Polls the Scanopy API on a configurable interval
  • Fetches hosts and services data
  • Syncs to an external target system (placeholder implementation)

Quick Start

Using Docker Compose (Recommended)

  1. Copy .env.example to .env and fill in your values:

    cp .env.example .env
  2. Start the integration:

    docker compose up -d
  3. View logs:

    docker compose logs -f

Running Locally

  1. Install dependencies:

    pip install -r requirements.txt
  2. Set environment variables:

    export SCANOPY_URL="https://your-instance.scanopy.io"
    export SCANOPY_API_KEY="your-api-key"
    export TARGET_API_URL="https://target-system.example.com"
    export TARGET_API_KEY="target-api-key"
  3. Run:

    python main.py

Configuration

Variable Required Default Description
SCANOPY_URL Yes - Your Scanopy instance URL
SCANOPY_API_KEY Yes - API key with hosts:read, services:read scopes
TARGET_API_URL Yes - Target system API endpoint
TARGET_API_KEY Yes - Target system authentication
POLL_INTERVAL No 300 Sync interval in seconds

Customizing

  1. Update manifest.json with your integration details
  2. Modify sync_to_target() in main.py to implement your sync logic
  3. Add any additional configuration to manifest.json and update the code

License

MIT