Device42 Now Integrates With The Foreman

If you currently use Device42 and The Foreman, you can now easily import your nodes from The Foreman with our new open source Device42-The Foreman sync script. This python script connects to both your Device42 and Foreman APIs, reads the relevant Configuration Item (CI) data, and sends that data to Device42.

After importing, you can rely on Device42’s Continuous Discovery technology to automatically maintain an up-to-date inventory of your physical, virtual, and cloud servers and containers, network components, software, services, applications, and their inter-relationships and interdependencies.

About the script

The script can import the following attributes from The Foreman:

  • Hostname
  • Memory Size (MB)
  • FQDN
  • Disks
  • Virtual or Physical
  • CPU Count (Physical)
  • CPU Core Count
  • CPU Model
  • Operating System
  • OS Version
  • MAC Address
  • Network Interfaces

 

Running the script is easy, too. For assumptions, prerequisites, and full details, check out our Foreman integration page.

Configuration and Usage

    1. Create a working directory foo and copy the contents of the Device42 puppet_to_device42_sync_py repository (the Foreman script is part of the Puppet Repo) to it
    2. Copy (or move/rename) the settings file settings.yaml.example to settings.yaml
    3. For details on the Puppet part of the config, details can be found on the puppet_to_device42_sync integration page.
    4. Populate the settings.yaml file you created in the last step with your Foreman server credentials [hostname, myuser, certificate info] and your Device42 instance info [host, user, pass]:
      # ========= Foreman
      Foreman:
          host: host
          user: user
          pass: pass
          puppet_server: null
      
      # ========= Device 42
      Device42:
          host: host
          user: user
          pass: pass
      

(full details in README.MD)

  1.  Configure node filtering, if desired. Details regarding configuration options can be found in NodeFilter.md. Filter settings are added following the ‘options:’ section of settings.yaml
  2. Run the script! $ python foremanexplore.py [-c /path/to/settings.yaml]

If you run into any unexpected behavior, bugs, or otherwise have questions, comments, or feature requests, feel free to reach out to support@device42.com.

Download the Foreman integration script for Device42 today!