Sign inSign up

novinem/optic

By novinem

Updated 12 months ago

The goal of Optic is to check if configurations on different cloud providers match.

Image
Monitoring & observability
0

1.2K

novinem/optic repository overview

About this image

This repository contains our 'Optic' checker. The goal of Optic is to check if configurations on different cloud providers match. For example; we host our SpamExperts spamfilters on OpenProvider, but our domain names are registered with Trans-IP. This can lead to configuration mismatches in where you've registered a spamfilter for a domain, but the DNS entries don't point to the spamfilter. Or, maybe you've deleted your spamfilter but forgot to change the DNS entires for the domain. This image is here to check those mismatches, and inform you via Slack.

About: known limitations

  • Currently (in v0.1) the only implemented Cloud providers are Trans-IP and OpenProvider (hence the name Optic - Open Provider Trans Ip Checker). The only check (discipline) it can perform is if your SpamExperts filters registered with OpenProvider match the TransIP DNS settings. So, if you forget to include the right DNS entries in TransIP for SpamExperts to work, you get notified via Slack.
  • The code only supports one domain name registrar at a time. That means that you need one single source of truth for your domain registrar. The workaround for this would be to run multiple checkers simultaneously, and then exclude the domains that are not part of this registrar. But, this is not optimal.

About: Implementations

While Optic is capable of plug'n'play different types of Cloud providers and logging services (by extending the abstract classes and re-building the image), this current version only implements the following features:

  • Cloudproviders:
    • Trans-IP (only as domain registrar)
    • Openprovider (only as spamexperts registrar)
  • Logging: Slack

Installation: With Plain Docker

  1. Download the Optic image from the Docker Hub with the ID: novinem/optic.
  2. Make sure the required files are mounted in the container. These files are:
    1. /usr/src/config/config.yml - The config for Optic (see the config.yml.example)
    2. /usr/src/config/transip-key.key - (optional) The private key file for the TransIp Api (see the config.yml.example)
  3. Start the container with: docker run --rm novinem/optic -v ...
    • Like you see, this image doesn't expose any ports.

Installation: With Docker-compose

  1. Copy the docker-compose.yml file to your directory.
  2. Make sure the required files/folders exist in your working directory. See the chapter above for details about the required files and folders.
  3. Run Optic with: docker compose up

Example: docker-compose.yml

---
version: '3'
    
services:
    
    optic_main:
        image: novinem/optic:latest
        container_name: optic_main
        volumes:
          - ./config:/usr/src/config
        restart: unless-stopped

Example: config.yml


# |||||||||||||||||||||||||||||||||||||
# |
# | Configuration
# |
# |||||||||||||||||||||||||||||||||||||

continuous: false
continuous_delay_seconds: 86400
continuous_completion_message: true

# You can use multiple loggers at once.
# The different values for 'log_level' are: debug, info, warning, error, fatal
loggers: 
  - type: slack
    log_level: info
    type_meta:
      slack_webhook_url: https://hooks.slack.com/services/....

checkers:

  - description: TransIP/Openprovider SpamExperts Mismatch Checker
    excluded_domains: []
    registrars:
    - registrar: transip
      disciplines:
        - domain
      meta:
        username: <username>
        private_keyfile: <private_key_filename_in_config_folder>
    - registrar: openprovider
      disciplines:
        - spamexperts
      meta:
        username: <username>
        password: <password>

  - description: Another TransIP/Openprovider SpamExperts Mismatch Checker
    excluded_domains:
      - domain1.com
      - domain2.com
    registrars:
    - registrar: transip
      disciplines:
        - domain
      meta:
        username: <username>
        private_keyfile: <private_key_filename_in_config_folder>
    - registrar: openprovider
      disciplines:
        - spamexperts
      meta:
        username: <username>
        password: <password>

Tag summary

Content type

Image

Digest

sha256:8f3ae953d

Size

134 MB

Last updated

12 months ago

docker pull novinem/optic