Skip to content

kuhn-ruess/cmdbsyncer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,633 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CMDBsyncer

A rule-based and modular system to synchronize hosts between Checkmk, Netbox, and other systems. The main goal is the complete organization of hosts based on CMDB systems with flexible rules and automation.

πŸ”— Links

πŸ“‹ Table of Contents

🎯 Overview

CMDBsyncer is a powerful, web-based tool designed to solve the complex challenge of managing host inventories across multiple IT management systems. Whether you're synchronizing between Checkmk, Netbox, I-DOIT, or other platforms, CMDBsyncer provides a unified approach with rule-based automation.

Key Benefits

  • Centralized Management: Single interface for all your CMDB synchronization needs
  • Rule-Based Logic: Flexible rules for host organization and attribute management
  • Multi-Platform: Support for 15+ systems including Checkmk, Netbox, Ansible, and more
  • Scalable: Tested with 140,000+ hosts
  • Secure: Built-in authentication, 2FA, and encryption of sensitive data

⚑ Quick Start

Get started quickly using Docker Compose:

# Clone the repository
git clone https://github.com/your-username/cmdbsyncer.git
cd cmdbsyncer

# For production: check out the last released version.
# For testing the bleeding edge: stay on main.
git checkout stable

# Start the application
./helper up

# Access the container
./helper shell

# Create your first user
./helper create_user 'your-email@example.com'

# Access the web interface
# Open http://your-host:5003 in your browser

This runs a development version that you can use to test everything.

πŸ“Έ Screenshots

Rules Configuration Rule-based synchronization configuration interface

Debug Options Comprehensive debug and testing options

πŸš€ Main Functions

Core Features

  • 🌐 Web Interface - Complete web-based management with login, 2FA, and user management
  • βš™οΈ Configuration Management - All configuration handled through the web interface (except initial installation)
  • πŸ”Œ Plugin API - Simple API to integrate custom data sources
  • πŸ› Debug Tools - Various debug options available via the ./cmdbsyncer command
  • πŸ” Security - Encryption of secrets and secure credential management
  • ⏰ Scheduling - Built-in cron management for automated synchronization
  • πŸ“Š Monitoring - Integration with monitoring systems
  • 🎯 Template Support - Jinja2 templating for configuration and rules
  • πŸ”„ REST API - Full REST API for automation and integration

Rule Engine

  • πŸ“ Attribute Control - Rules based on host attributes
  • ✏️ Attribute Rewrites - Dynamic modification of host attributes
  • πŸ” Filters - Advanced filtering for hosts and attributes
  • ⚑ Action Rules - Automated actions in Ansible, Checkmk, Netbox, etc.

Ansible Integration

  • πŸ“‹ Inventory Source - Use CMDBsyncer as dynamic Ansible inventory

πŸ”§ Supported Systems

Checkmk

Complete lifecycle management for monitoring systems

  • βœ… Host Management - Full host lifecycle (creation, labels, folders, deletion, rules)
  • πŸ“ˆ Scalability - Tested with more than 140,000 hosts
  • 🏷️ Attribute Sync - Sync and update all host attributes, tags, and labels
  • ⚑ Performance - Full support of API bulk operations and multiprocessing
  • πŸ“ Folder Management - Complete Checkmk folder management with pool features
  • πŸ‘₯ Groups - Creation of host, contact, and service groups
  • 🎯 Tags - Create host tags and host tag groups
  • πŸ“Š BI Integration - Create BI aggregations
  • πŸ“‹ Rules - Create all types of setup rules
  • πŸ”„ Updates - Smart update controls to prevent excessive changes
  • πŸ€– Agents - Commands to activate configuration, bake and sign agents
  • πŸ‘€ User Management - Manage Checkmk users (create/delete/reset password)
  • πŸ“¦ Inventory - Host attributes inventory for Ansible integration
  • πŸ” Password Store - Create and manage encrypted password entries
  • 🎯 DCD Rules - Create Data Collection Rules
  • πŸ” Version Detection - Automatic Checkmk version detection for correct API usage

Ansible

Automation and configuration management

  • πŸ“‹ Inventory - Rule-based inventory source
  • πŸ–₯️ Agent Management - Complete Checkmk agent management (Linux & Windows)
    • Installation and TLS registration
    • Bakery registration
  • πŸ—οΈ Site Management - OMD site management (updates, creation)
    • Automatic Checkmk version downloads

Netbox

Network infrastructure management

  • πŸ”„ Bidirectional Sync - Rule-based export and import of devices and VMs
  • πŸ—οΈ Auto-Creation - Automatic category creation
  • πŸ—ΊοΈ Infrastructure - Export sites, interfaces, IPAM data
  • πŸ‘₯ Contacts - Contact management
  • πŸ“ Location Management - Comprehensive location handling

I-DOIT

IT documentation and CMDB

  • πŸ“Š Template-Based - Rule-based export and import using templates
  • πŸ”„ Bidirectional - Full import/export capabilities

Other Integrations

PRTG - Network monitoring

  • πŸ“₯ Object Import - Import monitoring objects to sync with Checkmk

BMC Remedy - IT Service Management

  • πŸ“Š Limited Import - Basic import functionality

Cisco DNA - Network management

  • 🌐 Device Import - Import devices and interface information

CSV Files - Data management

  • πŸ“„ Host Management - Manage hosts based on CSV files
  • βž• Data Enhancement - Add additional information from CSV files

LDAP - Directory services

  • πŸ‘₯ Object Import - Import objects from LDAP directories

REST APIs - Custom integrations

  • πŸ”Œ Custom APIs - Import from custom REST API endpoints

JSON - File-based data

  • πŸ“„ File Import - Import JSON file structures

Jira CMDB - Atlassian integration

  • ☁️ Cloud & On-Prem - Support for both deployment types
  • πŸ“₯ Object Import - Import CMDB objects

JDISC - Network discovery

  • πŸ” Discovery Import - Import discovered objects

VMware - Virtualization

  • πŸ“Š Attribute Management - Import and export VM attributes
  • πŸ”„ Bidirectional - Full import/export to VMware VMs

Database Systems

  • MySQL - Import and inventory database tables
  • MSSQL/FreeTDS/ODBC - Support for all ODBC-based database connections

πŸ› οΈ Installation

Prerequisites

  • Docker and Docker Compose
  • Python 3.11+ (for development)
  • Web browser (for the management interface)

Production Installation

  1. Clone the repository and pick a version

    git clone https://github.com/your-username/cmdbsyncer.git
    cd cmdbsyncer
    
    # Use the stable branch (last released version) for production:
    git checkout stable
    # …or pin to a specific release tag for reproducible deployments:
    # git checkout v3.12.12

    See RELEASE.md for the full branching/versioning policy.

  2. Configure environment

    # Copy and edit configuration files
    cp docker-compose.prod.yml docker-compose.yml
    # Edit the configuration as needed
  3. Start the application

    docker-compose up -d
  4. Create admin user

    ./helper create_user 'admin@your-domain.com'

Development Installation

For development and testing purposes:

# Start development environment
./helper up

# Access container shell
./helper shell

# Create test user  
./helper create_user 'test@example.com'

# Access at http://localhost:5003

πŸ“‹ Requirements

System Requirements

  • Memory: Minimum 2GB RAM, recommended 4GB+
  • Storage: Minimum 10GB free space
  • Network: HTTPS access to target systems (Checkmk, Netbox, etc.)

Supported Target Systems

  • Checkmk: All current versions (automatic detection)
  • Netbox: v2.8+
  • Ansible: v2.9+
  • I-DOIT: v1.12+
  • And many more - see full compatibility matrix

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow existing code style
  • Add tests for new features
  • Update documentation as needed
  • Test with multiple target systems

Git Hooks

The repository ships a pre-commit hook in .githooks/ that refreshes application/buildinfo.txt, runs pylint on staged Python files, and executes the unit-test suite before each commit. Activate it once per clone:

git config core.hooksPath .githooks

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support


⭐ If you find this project helpful, please give it a star! ⭐

About

Rule Based Syncronisation System with Support Checkmk, Netbox, PRTG, Ansible and many systems.

Resources

License

Stars

Watchers

Forks

Contributors