April 11, 2018

emcli Enterprise Manager Command Line Interface

emcli  -- Enterprise Manager Command Line Interface, in Oracle

emcli login -username="sysman"

emcli modify_target -name="pdb2" -type="oracle_database" -credentials= "UserName:sys;password:secret;Role:SYSDBA" -on_agent

emcli modify_target -name="+ASM_devdb" -type="asm_instance" -credentials= "UserName:sys;password:devasm;Role:SYSDBA" -on_agent

emcli delete_target -name="testdb" -type="oracle_database"

emcli setup -url=https://prodoem.oem-app.com/em/ -username=sysman -password=12coem

emcli help verb
emcli help
  argfile    -- execute emcli verbs from a file
  help       -- get help for emcli verbs (Usage: emcli help [])
  login      -- login to the EM Management Server (OMS)
  logout     -- logout from the EM Management Server (OMS)
  setup      -- setup emcli to work with an EM Management Server (OMS)
  sync       -- synchronize with the EM Management Server (OMS)
  version    -- list emcli verb versions or the emcli client version

  Agent Recovery Verbs
    resyncAgent   -- Agent Recovery

  Agent Administration Verbs
    get_agent_properties     -- displays details of all properties of an agent.
    get_agent_property       -- displays the value of specific property of an agent.
    set_agent_property       -- modify specific property of an agent.

  Audit Settings Verbs
    disable_audit           -- Disable em auditing for all User Operations.
    enable_audit            -- Enable em auditing for all User Operations.
    show_audit_settings     -- Show the Current Audit Settings Stored in repository.
    show_operations_list    -- Show all Auditable EM Operation Names.
    update_audit_settings   -- Update the Current Audit Settings Stored in repository.

  Blackout Verbs
    create_blackout   -- create a blackout
    delete_blackout   -- delete a blackout
    get_blackout_details  -- get detailed info for a blackout
    get_blackout_reasons  -- list all blackout reasons
    get_blackout_targets  -- list targets for a blackout
    get_blackouts   -- list blackouts
    stop_blackout   -- stop a blackout

  Cloning Verbs
    clone_as_home         -- clone an Application Server Oracle home.
    clone_crs_home        -- clone a Oracle Clusterware Oracle home.
    clone_database_home   -- clone an Oracle home database.
    extend_as_home        -- extend an Application Server Oracle home.
    extend_crs_home       -- extend a Oracle Clusterware Oracle home.
    extend_rac_home       -- extend a RAC Oracle home.

  Credential Verbs
    clear_credential 
    set_credential   -- set preferred or monitoring credentials for given users
    show_credential_set_info   -- display the credential set parameters
    show_credential_type_info   -- display the credential type parameters
    update_host_password   -- Update the host password change in EM Credential Sub-System
    update_password   -- update passwords for a given target
    update_target_password   -- Update the Changed target password in EM Credential Sub-System

  Credential Verbs - Oracle Database
    update_db_password   -- Update the target password change in EM Credential Sub-System and change at target database

  Discover and Push to Agents Verbs
    discover_wls   -- get summary for DISCOVER_PUSH Verb

  Execute Command Verbs
    execute_hostcmd   -- execute a host command
    execute_sql   -- execute a sql command

  Group Verbs
    create_group   -- create a group
    delete_group   -- delete a group
    get_group_members   -- list the members in a group
    get_groups   -- list all groups
    modify_group   -- modify a group

  Management Services and Repository Verbs
    loader_perf  -- execute performance test to determine network bottleneck between OMS and EM Repository.

  Job Verbs
    delete_job   -- delete a specified job
    get_job_execution_detail  -- display details of job execution 
    get_jobs   -- get a list of existing jobs
    retry_job   -- re-start a previously failed job execution
    stop_job   -- stop a specified job
    submit_job   -- submit a job

  Licensing
    grant_license_no_validation   -- grant licenses on a set of user specified or all packs to a set of user specified or all targets belonging to the input licensable target type.
    grant_license_with_validation   -- grant licenses on a set of user specified or all packs to a set of user specified or all targets belonging to the input licensable target type as per business rules.
    revoke_license_no_validation   -- revoke licenses on a set of user specified or all packs from a set of user specified or all targets belonging to the input licensable target type.
    revoke_license_with_validation   -- revoke licenses on a set of user specified or all packs from a set of user specified or all targets belonging to the input licensable target type as per business rules.

  Management Plug-in Verbs
    add_group_to_mpa                -- add a group to a Management Plug-in Archive
    add_mp_to_mpa                   -- add a Management Plug-in to a Management Plug-in Archive

  Masking Verbs
    export_masking_definition   -- Export masking definition to the specified path.
    generate_masking_script   -- Generate masking script and store in the repository
    import_masking_definition   -- Import masking definition from a specified file.
    list_masking_definitions   -- Get the list of masking definitions ,the associated target and their script status
    reassoc_masking_definition   -- Reassociate an existing masking definition to another database target.
    save_masking_script     -- Save generated masking script to the specified path.
    submit_masking_job   -- Submit a masking job ,display job id and execution id 

  Metric Collection And Alerts
    clear_stateless_alerts    -- clears one or more stateless alert(s)
    collect_metric     -- collects metric data on demand
    get_metrics_for_stateless_alerts   -- gets the list of metrics whose alerts can be manually cleared
    get_on_demand_metrics    -- gets the list of metrics
    get_unsync_alerts   -- get the list of alerts that are out-of-sync between agent and repository

  Notification Verbs
    subscribeto_rule   -- subscribe user to rule with email notification
    update_event_rule   -- disable or enable repeat notification for notification rule

  Deployment Procedure Verbs
    confirm_instance   -- Confirm manual step.
    delete_instance   -- Delete a stopped or completed Deployment Instance.
    get_instance_data_xml   -- Download Instance Data XML
    get_instance_status   -- Display Procedure Instance status
    get_instances   -- Display list of Procedure Instances
    get_procedure_types   -- display Procedure types
    get_procedure_xml   -- download Deployment Procedure XML
    get_procedures   -- display Procedure lists
    get_retry_arguments   -- Get arguments of failed steps which can be retried.
    ignore_instance   -- Ignore failed step.
    reschedule_instance   -- Reschedule a submitted Procedure Instance for execution.
    resume_instance   -- Resume a suspended Deployment Instance.
    retry_instance   -- Retry failed instance or failed step.
    set_instance_jobgrants   -- set the user access privilege for jobs of the Deployment Instance
    start_paf_daemon   -- Start Deployment Procedure Manager Daemon
    status_paf_daemon   -- Get Deployment Procedure Manager Daemon status
    stop_instance   -- Stop a scheduled, failed or running Deployment Instance.
    stop_paf_daemon   -- Stop Deployment Procedure Manager Daemon
    submit_procedure   -- submit a Deployment Procedure for execution.
    suspend_instance   -- Suspend a running Deployment Instance.
    update_and_retry_step   -- Update arguments of the failed step and retry it

  Privilege Delegation Settings
    apply_privilege_delegation_setting   -- set Privilege Delegation Setting on given targets
    clear_privilege_delegation_setting   -- clear Privilege Delegation Setting from given hosts
    create_privilege_delegation_setting   -- create Privilege Delegation Setting Template to apply later.
    delete_privilege_delegation_settings   -- deletes Privilege Delegation Setting Template.
    list_privilege_delegation_settings   -- lists Privilege Delegation Setting Templates available on server to apply on targets.
    list_target_privilege_delegation_settings   -- lists current Privilege Delegation Setting on targets.

  Provisioning Verbs
    provision   -- provision a hardware server.

  Agent Patch Verbs
    submit_agent_patch Patch the Agent

  Redundancy Group Verbs
    create_red_group   -- create a group
    create_redundancy_group   -- creates a Redundancy Group
    modify_red_group   -- modify a redundancy group
    modify_redundancy_group   -- modifies a Redundancy Group
    view_redundancy_group   -- shows the present configuration of the Redundancy Group

  Refresh WLS Domain Verbs
    refresh_wls 

  Report Import/Export Verbs
    export_report      -- export a Report from repository to XML File
    get_reports        -- list all reports owned by cli administrator or other specific administrator
    import_report      -- import a Report into repository from XML File

  SecureComm Verbs
    get_ca_info   -- Display the Agents whose certificates are issued by the CA(s)

  Services Verbs
    add_beacon     -- adds a beacon to monitoring beacons of service
    apply_template_tests  -- Apply an XML Service Template to a Target
    assign_test_to_target -- assigns a test-type to a specified target-type and version
    change_service_system_assoc   -- changes the system for a particular service
    create_aggregate_service   -- create an aggregate service
    create_service   -- creates a Service of given type
    delete_metric_promotion -- deletes a metric promotion on a service
    delete_test   -- deletes a Service Test
    delete_test_threshold   -- deletes a test threshold
    disable_test   -- disables a Service Test monitoring
    enable_test   -- enables a Service Test monitoring
    extract_template_tests   -- Extract a Service Template as XML
    get_aggregate_service_info   -- get timezone region and availability evaluation function
    get_aggregate_service_members -- get sub-service members of the aggregate service
    get_test_thresholds   -- gets test thresholds
    modify_aggregate_service   -- modify an aggregate service
    remove_beacon     -- removes a beacon from monitoring beacons of service
    remove_service_system_assoc   -- removes the System for a Service of given type
    run_avail_diag -- runs availability diagnostics on a service target
    run_promoted_metric_diag -- runs promoted metric diagnostics on a service target
    set_availability     -- sets availability type of service
    set_key_beacons_tests -- sets the key beacons and tests of a service
    set_metric_promotion -- promotes a system/test based metric to performance/usage/business metric of a service
    set_properties     -- sets properties on a test or test, beacon level
    set_test_threshold   -- sets a test threshold
    sync_beacon   -- syncronize a beacon which is monitoring the target (reloads all collections to beacon)

  System Verbs
    create_system   -- create a system
    delete_system   -- delete a system
    get_system_members  -- list the members in a system
    modify_system   -- modify a system

  Target Data Verbs
    add_target   -- add a target to the repository
    add_target_property  -- Adds a new target property to all targets of the specified target type 
    delete_target   -- delete a specified target
    get_target_properties  -- Lists all property names for the target type provided
    get_targets   -- get status and blackout info for targets
    modify_target   -- modify a target instance definition
    relocate_targets   -- relocate targets from one agent to another
    remove_target_property   -- Removes the target property from all targets of the specified target type
    set_standby_agent   -- permitting targets to relocate from one agent to another
    set_target_property_value   -- Set/Updates the property value for targets provided

  Monitoring Templates
    apply_template   -- apply a monitoring template
    export_template   -- export a template
    import_template   -- import a template
    modify_collection_schedule   -- modify collection schedule for a collection

  User Administration Verbs
    create_role   -- create a new role
    create_user   -- create a new user
    delete_role   -- delete an existing role
    delete_user   -- delete an existing user
    get_supported_privileges   -- Get the list of available privileges
    grant_privs   -- Grant privileges to a user or role
    grant_roles   -- Grant roles to a user or role
    modify_role   -- modify an existing role
    modify_user   -- modify an existing user
    revoke_privs   -- Revoke privileges from a user or role
    revoke_roles   -- Revokes roles from a user or role

  Virtualization Verbs
    delete_guest_vm   -- Delete Guest Virtual Machine.
    get_guest_vm_status   -- Get the status of the Guest Virtual Machine.
    get_virtual_server_status   -- Get the status of the Virtual Server.
    list_guest_vm   -- List all Guest Virtual Machines.
    list_ovm_virtual_server_pool   -- List OVM Virtual Server Pools.
    list_virtual_server   -- List all Virtual Servers.
    list_virtual_server_pool   -- List all Virtual Server Pools.
    migrate_vsp_ovm_to_em   -- Migrate Virtual Server Pool from OVM Manager to EM.
    pause_guest_vm   -- Pause Guest Virtual Machine.
    reboot_guest_vm   -- Reboot Guest Virtual Machine.
    reboot_virtual_server   -- Reboot Virtual Server.
    resume_guest_vm   -- Resume Guest Virtual Machine.
    start_guest_vm   -- Start Guest Virtual Machine.
    start_vt_daemon   -- Start virtualization daemon.
    status_vt_daemon   -- Get status for virtualization daemon.
    stop_guest_vm   -- Stop Guest Virtual Machine.
    stop_virtual_server   -- Stop Virtual Server.
    stop_vt_daemon   -- Stop virtualization daemon.
    suspend_guest_vm   -- Suspend Guest Virtual Machine.
    unpause_guest_vm   -- Unpause Guest Virtual Machine.

emcli > help()
emcli > help(create_system)

Related Articles: emctl commands emca commands 
opatchauto utility

No comments:

Post a Comment