Forum Stats

  • 3,853,853 Users
  • 2,264,287 Discussions
  • 7,905,483 Comments

Discussions

EM 12c - How to force agent to re-evaluate targets on host

DSEVERN
DSEVERN Member Posts: 8 Red Ribbon
edited Mar 31, 2020 12:24PM in Enterprise Manager

We have several Weblogic environments where we undeploy and existing application and deploy a new version with a different name, several times a week.  The current version of the application might be named "Application-123" and the new version of the application would be named "Application-124".

The problem I'm having is that when we delete the current weblogic deployment and then deploy the new version, the old version shows as Down, in Enterprise Manager Grid control.

Is there a way to force the agent to re-evaluate what targets are actually on a host so it will get rid of the old deployments and stop showing them as down, since in reality they aren't there?

FYI, this is Enterprise Manager Cloud Control 12.1.0.4 if that is relevant. (yes, I know, quite old and out of Support).

Thanks in advance!

Answers

  • Venkata Thiruveedhi-Oracle
    Venkata Thiruveedhi-Oracle Posts: 590 Employee
    edited Mar 31, 2020 11:25AM

    Hi,

    You can use the following command from agent to perform force collection of target.

    ./emctl control agent <Target_Name>:oracle_database Response

    Note: You need to replace the necessary target name + target type.

    Best Regards,

    Venkat

  • DSEVERN
    DSEVERN Member Posts: 8 Red Ribbon
    edited Mar 31, 2020 11:50AM

    Hi Venkat,

    But won't that just force the agent to re-collect the Metric "Response" for the target "oracle_database"?

    The problem I have is that I have see the following targets:

    Target                                                                                                                       Type                                              Down Since [Sorted in descending order]

    /TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-498      Clustered Application Deployment Mar 13, 2020 3:13:44 PM

    /TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-501      Clustered Application Deployment Mar 19, 2020 5:00:54 PM

    /TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-493      Clustered Application Deployment Feb 5, 2020 4:03:10 PM

    /TST_WFM_WFMDomain/WFMDomain/wls_wfm3/WFM-Company-SC-493           Application Deployment Feb 5, 2020 4:02:10 PM

    /TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-496           Application Deployment Mar 10, 2020 11:22:06 AM

    /TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-499      Clustered Application Deployment Mar 17, 2020 5:00:32 PM

    /TST_WFM_WFMDomain/WFMDomain/wls_wfm3/WFM-Company-SC-500           Application Deployment Mar 18, 2020 5:35:30 PM

    /TST_WFM_WFMDomain/WFMDomain/wls_wfm3/WFM-Company-SC-496           Application Deployment Mar 10, 2020 11:22:07 AM

    /TST_WFM_WFMDomain/WFMDomain/wls_wfm2/WFM-Company-SC-498           Application Deployment Mar 13, 2020 3:13:44 PM

    /TST_WFM_WFMDomain/WFMDomain/wls_wfm3/WFM-Company-SC-499           Application Deployment Mar 17, 2020 5:00:31 PM

    /TST_WFM_WFMDomain/WFMDomain/wls_wfm3/WFM-Company-SC-498           Application Deployment Mar 13, 2020 3:13:44 PM

    /TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-494      Clustered Application Deployment Feb 21, 2020 5:04:24 PM

    The currently running application is "WFM-Company-SC-502"

    All of the above targets don't actually exist in Weblogic anymore but EMGC still thinks they do.

    How do I clear them/force EM Agent to recognize they no longer exist?

  • Venkata Thiruveedhi-Oracle
    Venkata Thiruveedhi-Oracle Posts: 590 Employee
    edited Mar 31, 2020 12:07PM

    Hi,

    Please see my earlier update, you need to replace the target_name & target_type from the command i gave. That was an example.

    To find out all the targets monitored by your Agent, run the following command:

    ./emctl config agent listtargets

    This will give you the target name + target type.

    Best Regards,

    Venkat

  • DSEVERN
    DSEVERN Member Posts: 8 Red Ribbon
    edited Mar 31, 2020 12:20PM

    Is there no command to force the agent to re-evaluate what targets ACTUALLY are in existence on the host and get rid of the ones that are no longer there?

    It seems like you are giving me a command to remove, manually, each of the targets that no longer exist.

    Perhaps there is another stategy?  Is there an OMS command or job that can be run to force it remove the invalid/nonexistent targets?

    When I execute "emctl config agent listtargets" it shows:

    [hostname.domain.com, host]

    [hostname.domain.com:3872, oracle_emd]

    [agent12c1_2_hostname.domain.com, oracle_home]

    [hostname2.domain.com:3872_proxy, oracle_emd_proxy]

    [OracleHome_1_hostname.domain.com, oracle_home]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-491, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-491, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/WFM-Company-SC-491, j2ee_application_domain]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-492, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-492, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-493, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-493, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-494, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-494, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-495, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-495, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-496, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-496, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-498, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-498, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/WFM-Company-SC-498, j2ee_application_domain]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-499, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-499, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/WFM-Company-SC-499, j2ee_application_domain]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-500, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-500, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/WFM-Company-SC-500, j2ee_application_domain]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-501, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-501, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/WFM-Company-SC-501, j2ee_application_domain]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-503, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-503, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/WFM-Company-SC-503, j2ee_application_domain]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm, weblogic_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/AdminServer, weblogic_j2eeserver]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1, weblogic_j2eeserver]

    [/TST_WFM_WFMDomain/WFMDomain, weblogic_domain]

    In this list, the only VALID targets are:

    [hostname.domain.com, host]

    [hostname.domain.com:3872, oracle_emd]

    [agent12c1_2_hostname.domain.com, oracle_home]

    [hostname2.domain.com:3872_proxy, oracle_emd_proxy]

    [OracleHome_1_hostname.domain.com, oracle_home]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1/WFM-Company-SC-503, j2ee_application]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm/WFM-Company-SC-503, j2ee_application_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/WFM-Company-SC-503, j2ee_application_domain]

    [/TST_WFM_WFMDomain/WFMDomain/cluster_wfm, weblogic_cluster]

    [/TST_WFM_WFMDomain/WFMDomain/AdminServer, weblogic_j2eeserver]

    [/TST_WFM_WFMDomain/WFMDomain/wls_wfm1, weblogic_j2eeserver]

    [/TST_WFM_WFMDomain/WFMDomain, weblogic_domain]

    All the targets with #491 thru 501 no longer exist.

  • Venkata Thiruveedhi-Oracle
    Venkata Thiruveedhi-Oracle Posts: 590 Employee
    edited Mar 31, 2020 12:24PM

    Hi,

    There is no command to automate a deletion of target.

    You have to manually go to the EM Console and delete all those targets which are not needed..

    OR

    You can run the emcli command to delete the targets.

    Reference:https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.3.1/emcli/verb-reference…

    Best Regards,
    Venkat