OSMH: How To Enable The OSMH Plugin Using OCI CLI
Applies To:
Oracle Cloud Infrastructure
OS Management Hub (OSMH)
Goal:
How to enable the OSMH Plugin using OCI CLI.
This is useful when a user cannot enable the OSMH Plugin through the OCI Console.
Solution:
- Install oci-cli according to document: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm
- Get agent config with command:
$ curl -H "Authorization: Bearer Oracle" -L http://169.254.169.254/opc/v2/instance/agentConfig > agent_config.json
- Edit agent_config.json to have "OS Management Hub Agent" enabled:
$ vi agent_config.json
{
"allPluginsDisabled": false,
"managementDisabled": false,
"monitoringDisabled": false,
"pluginsConfig": [
{
"desiredState": "DISABLED",
"name": "Oracle Autonomous Linux"
},
{
"desiredState": "DISABLED",
0