---
title: How do I bulk-load data gathering configuration details?
description: Database configurations provide our data gathering scripts with the connection details necessary to collect data for license, configuration, and compliance checks.
---

[Skip to content](https://kb.opscompass.com/knowledge/how-do-i-bulk#main-content)

[![Opscompass](https://kb.opscompass.com/hubfs/opscompass-logo-2024-web-small.svg)](https://opscompass.com)

- [Home](https://opscompass.com/)
- [Why Opscompass](https://opscompass.com/why-opscompass/)
- Product
  
  Show submenu for Product

    - [Inventory](https://opscompass.com/inventory/)
    - [Configuration Drift](https://opscompass.com/product/configuration-drift/)
    - [Compliance](https://opscompass.com/product/compliance/)
    - [Licenses](https://opscompass.com/solutions/licenses/)
- Solutions
  
  Show submenu for Solutions

    - [Hybrid and Multi-Cloud Visibility](https://opscompass.com/solutions/multi-cloud-visibility/)
- [About Us](https://opscompass.com/company/)

Open main navigation

Close main navigation

- [Home](https://opscompass.com/)
- [Why Opscompass](https://opscompass.com/why-opscompass/)
- Product
  
  Show submenu for Product

    - [Inventory](https://opscompass.com/inventory/)
    - [Configuration Drift](https://opscompass.com/product/configuration-drift/)
    - [Compliance](https://opscompass.com/product/compliance/)
    - [Licenses](https://opscompass.com/solutions/licenses/)
- Solutions
  
  Show submenu for Solutions

    - [Hybrid and Multi-Cloud Visibility](https://opscompass.com/solutions/multi-cloud-visibility/)
- [About Us](https://opscompass.com/company/)
- [Get a Demo](https://opscompass.com/demo/)

[Get a Demo](https://opscompass.com/demo/)

 What are you looking for?

- There are no suggestions because the search field is empty.

1. [Help Center](https://kb.opscompass.com/knowledge)
2. [Opscompass Integrations](https://kb.opscompass.com/knowledge/opscompass-integrations)

# How do I bulk-load data gathering configuration details?

### Overview

Database configurations provide our data gathering scripts with the connection details necessary to collect data for license, configuration, and compliance checks in the Opscompass product. 

Configuration details can be entered through the UI under Licenses -\> Data Configuration 

![A dark flyout on the left side of the page is expanded with a highlight on a page that says Data Configuration. The body of the page to the right consists of cards with fields for users to enter their Oracle server configurations.](https://kb.opscompass.com/hs-fs/hubfs/Screenshot%202024-12-06%20at%2010.10.09%20AM.png?width=688&height=410&name=Screenshot%202024-12-06%20at%2010.10.09%20AM.png)

The information may also be entered via atomic commands using the Opscompass CLI, or by using the bulk\_load.js script provided in the data gathering base-scripts module. 

 

For details on using the Opscompass CLI refer to the following KB: 

[Getting Started with OpsCompass Command Line Interface](https://kb.opscompass.com/knowledge/opscompass-command-line-interface) 

### The bulk\_load.js Script

As the name implies, this is a JavaScript utility that requires Node.js to run.  It is provided as part of the base-scripts module, which can be found in ~/.opscompass/scripts/base-scripts/src/scripts/bulk\_load.js.  The script makes use of ~/.opscompass/defaults.json to determine the company and account details under which to create the configuration(s). 

Conceptually, all the utility does is to break apart an Opscompass data gathering configuration file into its components and send them to Opscompass using the appropriate CLI commands. 

It can be invoked directly using “bulk\_load.js push {filename}” where {filename} points to the file to be loaded.  Any valid file path may be specified.   

#### Input Data

The bulk\_load.js script expects the input file to match the Opscompass data gathering configuration file format, with an optional bulk\_create section.  The bulk\_create section can be used to specify default credentials for each connection type.  Additional examples can be found in the base-scripts/src/Config/ directory.  If no configurationId is specified, as shown in this example, a new configuration file will be created. 

```
{   "configurationId": null,   "bulk_create": {     "oracle_default_credentials": {       "user": "0racle_test",       "password": "secretPassword"     },    "microsoft_default_credentials": {      "user": "AD_User42",      "password": "SQL$erver-Welcome2",      "directory_auth": "SESSION",    }   },   "oracle_dbs": [     {       "name": "host1~svc1",       "server": "host1:1521/svc1",       "actions": [         "dblicensing"       ]     },    ...   ],      "microsoft_dbs": [       {         "name": "with_backslash_and_others",         "NOTE": [          "We will never get a string with just one backslash",          "The password below is 'a!b\cd$fg@h~ hoorah'",          "But the backslash must be escaped by a second backslash"        ],        "server": "sqltest",        "user": "$qltest",        "password": "a!b\\cd$fg@h~ hoorah",        "actions": ["dblicensing"]      }     ] } 
```

### How can I generate the JSON?

The easiest way is to start with an existing configuration or sample file and make changes.  When configurationId is set to a valid number under your authorized account(s), the bulk loader will attempt to apply changes to the existing configuration file.  The default configurationId can be found in the “~/.opscompass/defaults.json” file. 

A quick way to duplicate a configuration file is to copy it to a new file, change the configurationId property to null, and then push it to Opscompass using the bulk loader. When configurationId is missing, undefined, or null, the bulk loader will create a new configuration file with the same name as the source file. 

#### Extracting from an Asset Management Tool other than Opscompass

The JSON format is straightforward, so if you can run a report listing your Oracle and/or Microsoft databases in the Opscompass format, you can bulk load that directly.  However, some tools only offer limited export / output options.  Using CSV is almost always an option and there are many tools for converting CSV to JSON.  

Here is an example: 

```
#!/bin/bash # This script shows how to convert an example CSV format to JSON # The output can be pushed to Opscompass via the bulk_load.js utility #   found in the base-scripts module # # Refer to bulk_sample*.json in the base-scripts/src/Config directory #   for full examples including default credentials # This example uses the npm package csv2json # npm install -g csv2json # Example input: # cat host_port_service.csv  #  hostname,port,service_name #  host1,1521,svc1 #  host2,1521,svc2 #  host3,1523,svc3 #  host4,1521,svc4 ( printf '{\n"oracle_dbs":\n' awk -F, '   BEGIN{print "name,server"}   NR>1{     print $1"~"$3","$1":"$2"/"$3   } ' host_port_service.csv | csv2json printf "}\n" ) | jq '.oracle_dbs[] += {"actions": ["dblicensing"]}' # Example output: # { #   "oracle_dbs": [ #     { #       "name": "host1~svc1", #       "server": "host1:1521/svc1", #       "actions": [ #         "dblicensing" #       ] #     }, #     { #       "name": "host2~svc2", #       "server": "host2:1521/svc2", #       "actions": [ #         "dblicensing" #       ] #     }, #     { #       "name": "host3~svc3", #       "server": "host3:1523/svc3", #       "actions": [ #         "dblicensing" #       ] #     }, #     { #       "name": "host4~svc4", #       "server": "host4:1521/svc4", #       "actions": [ #         "dblicensing" #       ] #     } #   ] # } 
```

The output above can be pushed as-is, or you can add the bulk\_create section as shown above in the Input Data section.  To add the connections to an existing configuration file, add the corresponding configurationId.  

To get a list of existing configuration files run the following command: 

```
$ opscompass license-manager list-monitoring-configurations [   {     "configurationName": "Test Configuration",     "id": "1",     "companyId": "37"   },   {     "configurationName": "dgConfig-prod.json",     "id": "79",     "companyId": "37"   }, ... ] 
```

 

- [About Opscompass](https://kb.opscompass.com/knowledge/about-opscompass#main-content)

    - [Company Information](https://kb.opscompass.com/knowledge/about-opscompass#company-information)
- [Getting Started](https://kb.opscompass.com/knowledge/getting-started#main-content)

    - [Logging In](https://kb.opscompass.com/knowledge/getting-started#logging-in)
    - [Connecting Cloud Accounts](https://kb.opscompass.com/knowledge/getting-started#connecting-cloud-accounts)
    - [Users and Teams](https://kb.opscompass.com/knowledge/getting-started#users-and-teams)
- [Opscompass CLI](https://kb.opscompass.com/knowledge/opscompass-cli#main-content)

    - [Getting Started](https://kb.opscompass.com/knowledge/opscompass-cli#getting-started)
    - [Resources](https://kb.opscompass.com/knowledge/opscompass-cli#resources)
    - [Accounts](https://kb.opscompass.com/knowledge/opscompass-cli#accounts)
    - [Compliance](https://kb.opscompass.com/knowledge/opscompass-cli#compliance)
    - [Licensing](https://kb.opscompass.com/knowledge/opscompass-cli#licensing)
    - [Examples](https://kb.opscompass.com/knowledge/opscompass-cli#examples)
    - [AI Skills](https://kb.opscompass.com/knowledge/opscompass-cli#ai-skills)
- [Opscompass FAQs](https://kb.opscompass.com/knowledge/opscompass-faqs#main-content)

    - [General](https://kb.opscompass.com/knowledge/opscompass-faqs#general)
- [New Features](https://kb.opscompass.com/knowledge/new-features)
- [Account Management](https://kb.opscompass.com/knowledge/account-management)
- [Compliance](https://kb.opscompass.com/knowledge/compliance)
- [Documents](https://kb.opscompass.com/knowledge/documents)
- [Drift](https://kb.opscompass.com/knowledge/drift)
- [Inventory](https://kb.opscompass.com/knowledge/inventory)
- [Licenses](https://kb.opscompass.com/knowledge/licenses#main-content)

    - [Oracle](https://kb.opscompass.com/knowledge/licenses#oracle)
    - [SQL Server](https://kb.opscompass.com/knowledge/licenses#sql-server)
- [Navigation and Dashboard](https://kb.opscompass.com/knowledge/navigation-and-dashboard)
- [Opscompass Integrations](https://kb.opscompass.com/knowledge/opscompass-integrations)
- [Tutorials](https://kb.opscompass.com/knowledge/tutorials#main-content)

    - [CLI](https://kb.opscompass.com/knowledge/tutorials#cli)

[![Opscompass](https://kb.opscompass.com/hubfs/opscompass-logo-2024-web-small.svg "Opscompass")](http://opscompass.com)

<https://opscompass.com/contact/> <https://www.linkedin.com/company/opscompass/>

Copyright © 2025, Opscompass