Manage Connections and Credentials
Use the CLI to create, update, and delete connections.
Credential Commands
get-secret-for-configuration
Gets a secret for a single configuration passed.
Parameters:
--id [vcenter_configuration_id | oracle_database_configuration_id | msql_configuration_id | msql_default_credential_id | oracle_default_credential_id]--record-type ['oracle_database_configuration' | 'vcenter_configuration' | 'msql_configuration' | 'msql_shared_monitoring_credential' | 'oracle_shared_monitoring_credential']
create-oracle-shared-credential
Creates Oracle shared credentials
Parameters:
--monitoring-configuration-idmonitoring configuration ID to make the shared credentials for--user(optional) [string]--password(optional) [string]
delete-oracle-shared-credential
Delete a Oracle shared credential
Parameters:
--idID of the oracle shared credential to delete
get-oracle-default-credential
Get Oracle default credential record. This optional default can be set to serve as your default credential. Any individual connection string can override the default credential as needed.
Parameters:
--monitoring-configuration-idmonitoring configuration ID to get the default credentials for
example:
opscompass license-manager get-oracle-default-credential
update-oracle-shared-credential
Update Oracle shared credential record
Parameters:
--idID of the oracle shared credential to update--user(optional) [string]--password(optional) [string]
create-msql-shared-credential
Creates MSQL shared credentials
Parameters:
--monitoring-configuration-idmonitoring configuration ID to make the shared credentials for--user(optional) [string]--password(optional) [string]--directory-auth(optional) 'SESSION' | null
delete-msql-shared-credential
Delete a MSQL shared credential
Parameters:
--idID of the msql shared credential to delete
get-msql-default-credential
Get MSQL default credential record
Parameters:
--monitoring-configuration-idmonitoring configuration ID to get the default credentials for
update-msql-shared-credential
Update MSQL shared credential record
Parameters:
--idID of the msql shared credential to update--user(optional) [string]--password(optional) [string]--directory-auth(optional) 'SESSION' | null
Create connections
Create a connection configuration for a specific resource, such as an Oracle database or vCenter. These commands can be used as part of a database onboarding automation workflow.
You may find it easier to create and update connections using the Opscompass web interface.
create-vcenter-configuration
Creates a single vCenter configuration associated with the given monitoring configuration.
Parameters:
--monitoring-configuration-id [monitoring_configuration_id]--name [unique name]--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "vmotion"--connection(optional) — The hostname or IP address.--user(optional) — Connection username.--password(optional) — Connection password.
create-oracle-database-configuration
Creates a single Oracle database configuration associated with the given monitoring configuration.
Parameters:
--monitoring-configuration-id [monitoring_configuration_id]--configuration-name [unique name]--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "dbcompliance"--user(optional) — User to use for connection.--password(optional) — Password to use for connection.--server(optional) — Server to use for connection.
create-msql-configuration
Creates a single SQL Server configuration associated with the given monitoring configuration.
Parameters:
--monitoring-configuration-id [monitoring_configuration_id]--nameor--configuration-name— Unique name.--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "dbcompliance"--server(optional) — The hostname or IP address.--user(optional) — Connection username.--password(optional) — Connection password.--directory-auth(optional) —['SESSION' or NULL]
create-network-discovery-configuration
Creates a new network discovery configuration associated with the given monitoring configuration.
Parameters:
--monitoring-configuration-id [monitoring_configuration_id]--oracle-ports(optional) — Comma-separated list of valid port numbers to look for Oracle connections.--mssql-ports(optional) — Comma-separated list of valid port numbers to look for SQL Server connections.--other-ports(optional) — Comma-separated list of valid port numbers to look for miscellaneous connections.--dns-servers(optional) — Comma-separated list of valid IPv4 DNS servers to use for DNS resolution. Can be specified multiple times.--subnet(optional) — Valid IPv4 CIDR block. If supplied,--subnet-nameis also required. Can be supplied multiple times.--subnet-name(optional) — Name for the next/last subnet block provided. If supplied,--subnetis also required. Can be supplied multiple times.
Update connections
Update a connection configuration for a specific resource, such as an Oracle database or vCenter. These commands require knowledge of JSON formats and parameter passing. You may find it easier to create and update connections using the Opscompass web interface.
update-vcenter-configuration
Updates a single vCenter configuration.
Parameters:
--id [configuration id]--nameor--configuration-name(optional) — Unique name.--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "vmotion"--connection(optional) — The hostname or IP address.--user(optional) — Connection username.--password(optional) — Connection password.
update-vcenter-configurations
Updates multiple vCenter configurations.
Parameters:
--id [configuration id]--nameor--configuration-name(optional) — Unique name.--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "vmotion"--connection(optional) — The hostname or IP address.--user(optional) — Connection username.--password(optional) — Connection password.
OR
--json-updates— Stringified JSON objects with your updates.
For quick updates, you may use the above parameters:
opscompass license-manager update-vcenter-configurations --id 137 --name "updatedName" --id 138 --name "otherUpdatedName" --id 144 --name "lastUpdatedName" --action "skip" --action "vmotion"
For larger updates, JSON may be used with the --json-updates flag:
opscompass license-manager update-vcenter-configurations --json-updates '[{"id":"137","configurationName":"updatedName"},{"id":"138","configurationName":"otherUpdatedName"},{"id":"144","configurationName":"lastUpdatedName","actions":["skip","vmotion"]}]'
update-oracle-database-configuration
Updates a single Oracle database configuration.
Parameters:
--id [configuration id]--nameor--configuration-name(optional) — Unique name.--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "dbcompliance"--user(optional) — User to use for connection.--password(optional) — Password to use for connection.--server(optional) — Server to use for connection.
update-oracle-database-configurations
Updates multiple Oracle database configurations.
Parameters:
--id [configuration id]--nameor--configuration-name(optional) — Unique name.--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "dbcompliance"--user(optional) — The user to use for the connection.--password(optional) — The password to use for the connection.--server(optional) — The server to use for the connection.
OR
--json-updates— Stringified JSON objects with your updates.
For quick updates, you may use the above parameters:
opscompass license-manager update-oracle-database-configurations --id 57 --name "updatedName" --id 62 --name "otherUpdatedName" --id 77 --name "lastUpdatedName"
For larger updates, JSON may be used with the --json-updates flag. This example updates configuration names:
opscompass license-manager update-oracle-database-configurations --json-updates '[{"id":"57","configurationName":"updatedName"},{"id":"77","configurationName":"otherUpdatedName"},{"id":"79","configurationName":"lastUpdatedName"}]'
update-msql-configuration
Updates a single SQL Server configuration.
Parameters:
--id [configuration id]--nameor--configuration-name(optional) — Unique name.--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "dblicensing"--server(optional) — The server.--user(optional) — Connection username.--password(optional) — Connection password.--directory-auth(optional) —['SESSION' or NULL]
update-msql-configurations
Updates multiple SQL Server configurations.
Parameters:
--id [configuration id]--nameor--configuration-name(optional) — Unique name.--action(optional) — Pass multiple times to define which actions this connection can take.
Example:--action "skip" --action "dblicensing"--server(optional) — The server.--user(optional) — Connection username.--password(optional) — Connection password.--directory-auth(optional) —['SESSION' or NULL]
OR
--json-updates— Stringified JSON objects with your updates.
For quick updates, you may use the above parameters:
opscompass license-manager update-msql-configurations --id 31 --name "newname" --server "sql-server-01.example.com" --user "joe" --action "skip" --id 25 --name "secondname" --action "skip" --action "dblicensing"
For larger updates, JSON may be used with the --json-updates flag:
opscompass license-manager update-msql-configurations --json-updates '[{"id":"25","configurationName":"25","server":"sql-server-01.example.com","user":"tony","actions":["skip","dblicensing"]},{"id":"31","configurationName":"31","server":"sql-server-02.example.com","user":"tony","actions":["skip","dblicensing"]}]'
update-network-discovery-configuration
Updates an existing network discovery configuration. If an optional parameter is not provided, it is assumed that the field should be set to undefined. You may find it easier to use the Opscompass web interface for this command.
Parameters:
--id [network_discovery_configuration_id]--oracle-ports(optional) — Comma-separated list of valid port numbers to look for Oracle connections.--mssql-ports(optional) — Comma-separated list of valid port numbers to look for SQL Server connections.--other-ports(optional) — Comma-separated list of valid port numbers to look for miscellaneous connections.--dns-servers(optional) — Comma-separated list of valid IPv4 DNS servers to use for DNS resolution. Can be specified multiple times.--subnet(optional) — Valid IPv4 CIDR block. If supplied,--subnet-nameis also required. Can be supplied multiple times.--subnet-name(optional) — Name for the next/last subnet block provided. If supplied,--subnetis also required. Can be supplied multiple times.
Delete connections
delete-network-discovery-configuration
Deletes a network discovery configuration.
Parameters:
--id [network_discovery_configuration_id]
delete-oracle-database-configuration
Deletes an Oracle database configuration.
Parameters:
--id [oracle_database_configuration_id]
delete-vcenter-configuration
Deletes a vCenter configuration.
Parameters:
--id [vcenter_configuration_id]
delete-msql-configuration
Deletes a SQL Server configuration.
Parameters:
--id [msql_configuration_id]