DX Application Performance Management

  • 1.  How to find agent identifier together with alert name using Alerts Polling

    Posted Oct 22, 2013 01:11 AM
    Hi, Everyone,

    I am facing a dilemma when I am trying to use Alerts polling web service to list the alerts that have crossed danger threshold together with agent identifiers.

    What I do is making a call to web service getAllAlertsSnapshot to find out the module name and alert name that is in danger state (numeric is 3) ,

    Based on the module name and alert name I suppose to use another web service to find the related agent identifier such that I can quickly locate the agent that is having problem.

    Unfortunately, API Reference Guide for CA Application Performance Management does not give such a web service. The most close web service is getAlertSnapshot but it requires agent Identifier as input.

    Do we have a solution for my problem , or I am using it wrongly?

    Thanks for listening.

    Cyril


  • 2.  RE: How to find agent identifier together with alert name using Alerts Poll

    Posted Oct 22, 2013 07:55 AM
    Hi Cyril,

    One of the developers gave me the following answer for you:

    You need to call the AgentService operation getAllAgents.

    Then he can compare the FQDN and Host name to find the appropriate agent. The connector code looks like this

    String host = alert.getAgentHost().toLowerCase();
    for (DAgentSnapshot snapshot : agents)
    {
    String snapshotHostName = snapshot.getHostName();
    String snapshotFQDN = snapshot.getFqdn();
    if (((snapshotFQDN != null) && snapshotFQDN.toLowerCase().equals(hostLC))
    || ((snapshotHostName != null) && snapshotHostName.toLowerCase().equals(hostLC)))
    {
    logger.warn("processLegacyAlert agent found fqdnName " + host);
    createAlertCIHelper(snapshot, process, agent, propsMap, host, nonDuplicates);
    break;
    }
    logger.warn("processLegacyAlert matching agent for legacy alert " + host + " not found");
    }


    Please let me know if that solves your problem.

    Regards,

    Florian.


  • 3.  RE: How to find agent identifier together with alert name using Alerts Poll

    Posted Oct 22, 2013 07:22 PM
    Hi Florian.

    Thank your for the reply.

    Just a few questions. how do you create or where do you get object "[color=#280aeb]alert[color]" in the below line in your codes ?
    String host = [color=#280aeb]alert[color].getAgentHost().toLowerCase();

    I am using web service [color=#280aeb]getAllAlertsSnapshot[color] but it does not seem to return [color=#280aeb]FQDN[color] , host information , or [color=#280aeb]agent identifier[color] that I can use to match an appropriate agent.

    Below are the information returned by [color=#280aeb]getAllAlertsSnapshot[color] (described in http://<host>:<port>/introscope-web-services/services/AlertPollingService?wsdl )

    ■ alertCurrStatus type int
    ■ alertName - nullable; type string
    ■ alertPrevStatus type int
    ■ alertStatusChanged type boolean
    ■ manModuleName - nullable; type string
    ■ simpleAlert type boolean
    ■ thresholdValue type int

    Regards,
    Cyril Guh


  • 4.  RE: How to find agent identifier together with alert name using Alerts Poll

    Posted Oct 23, 2013 04:48 AM
    Hi Cryil,

    Here's the response from our Engineer:

    "I am using


    http://<host>:<port>/apm-web-services/services/AlertService?wsdl

    getStateOfLegacyAlerts();

    For updates we use SNMP traps – not the web service

    If you want to use the old web services, some rough pseudo code:

    managedModules=getManagedModules
    for each managedModule in managedModules
    agentSnapshots= getAgentSnapShots(managedModule .managedModuleName)
    for each agentSnapshot in agentSnapshots
    alerts= getAlertSnapshots(managedModule .managedModuleName ,agentSnapshot.agentIdentifier)
    // you now have a list of alerts for agentName+ managedModuleName
    "

    Keep us posted,

    Florian.


  • 5.  RE: How to find agent identifier together with alert name using Alerts Poll

    Posted Oct 24, 2013 10:04 AM
    Hi Florian,

    Thanks for following up my question.

    I tried http://<host>:<port>/[color=#2e07f3]apm-web-services[color]/services/AlertService?wsdl but it gives me HTTP 404 (page not found error), however, http://<host>:<port>/[color=#2e07f3]introscope-web-services[color]/services/ works.

    I am using introscope 9.1.1. Is there any specific configuration I need to do?

    I followed the instruction in docment "CA Application Perfomance Management API Reference Guide" to edit <INTROSCOPE_HOME>/config/IntroscopeEnterpriseManager.properties and add below line to enable web serivce:

    introscope.alerts.extension.managementmodules.enable

    However, it only works on web services in http://<host>:<port>/[color=#2e07f3]introscope-web-services[color] , but not http://<host>:<port>/[color=#2e07f3]apm-web-services[color]/services which has HTTP 404 error

    Regards,
    Cyril Guh


  • 6.  RE: How to find agent identifier together with alert name using Alerts Poll

    Broadcom Employee
    Posted Oct 27, 2013 10:08 PM

    You have a typo: it's AlertsService?wsdl not AlertService?wsdl



  • 7.  RE: How to find agent identifier together with alert name using Alerts Poll

    Posted Oct 28, 2013 08:40 PM

    Thanks for the reply and pointing out the error.

    Yes, I am able to get http://../apm-web-services/../AlertsService?wsdl  from one environment ( we have multiple introscope environements for development, testing and load testing). But on another enviornment, I am still getting HTTP 404 error while http://../introscope-web-services/.. works. Is there any log I can look at to check what is causing that?

    I tried getStateOfLegacyAlerts defined in AlertsService?wsdl on the environment where there is no HTTP 404 error for wsdl retrieval, it gives empty result but  I am sure there should be multiple alerts in introscope. The empty result is like below: 

      <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Body>
    - <ns1:getStateOfLegacyAlertsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="com.wily.apm.model.webservices">
      <getStateOfLegacyAlertsReturn soapenc:arrayType="ns2:DAlertSnapshot[0]" xsi:type="soapenc:Array" xmlns:ns2="urn:com.wily.apm.model.webservices.common" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" />
      </ns1:getStateOfLegacyAlertsResponse>
      </soapenv:Body>
      </soapenv:Envelope>
     

    What could have gone wrong?

    Thanks heap

    Cyril

     

     



  • 8.  Re: How to find agent identifier together with alert name using Alerts Polling
    Best Answer

    Broadcom Employee
    Posted May 15, 2015 07:31 PM

    Closing discussion.

     

    If this is still relevant, please start a new discussion in APM Dev (http://bit.ly/caapm_dev).