Layer7 API Management

  • 1.  CA Portal - Analytics Reports Empty Result

    Posted Feb 19, 2016 10:30 AM

    Hello, I see ANALYTICS option in my CA portal which have many reports like Ranked Reports, Org Revenue Reports and so on. But, all reports returns Empty data though I do progress many transactions in Gateway or Portal. I am able to open these reports in staging mode where all parameter are empty except title or description. There is a Query Parameter. Do i need to configure anything in order get all report load with data instead of Empty result All time ? Any help appreciated truly. Thanks !!



  • 2.  Re: CA Portal - Analytics Reports Empty Result

    Posted Jun 16, 2016 12:07 AM

    my first suspect would be portal metrics.

     

    I am providing a link for portal version 3.1 as i do not know the version of the portal that you are running, please check if this has been set up

     

    Configure the Portal Metrics Synchronization Utility - CA API Developer Portal - 3.1 - CA Technologies Documentation



  • 3.  Re: CA Portal - Analytics Reports Empty Result
    Best Answer

    Broadcom Employee
    Posted Jun 21, 2016 12:25 AM

    To get the metrics data ready for reports,

    1. sync metrics (same as didsi01's comment)

    Configure the Portal Metrics Synchronization Utility - CA API Developer Portal - 3.5 - CA Technologies Documentation

    2. install Portal.Integration.Policy.Snippet

    Convert the Gateway Service - CA API Developer Portal - 3.5 - CA Technologies Documentation

    after  the snippet included in the API, you call the API with api key.



  • 4.  Re: CA Portal - Analytics Reports Empty Result

    Posted Sep 16, 2016 10:16 PM

    Hi pros, 

     

    I got here because of my Portal is not synced with metrics, too. 

     

    I have portal & GW isntalled on different hosts, so after editing the properties file I was able to get the ./test-portal.sh. 

    However, I'm using my API with my API key, and when I want to sync the metrics to portal, I get this error : 

     

     

    [root@gw ApiPortal]# sh portal.sh
    Starting metrics sync.
    16 Sep 2016 22:12:58,055 DEBUG PortalMetricsSyncUtilityMain - Initializing PortalMetricsGoidGenerator with prefix: b6c040a73d13581c
    16 Sep 2016 22:12:58,056 INFO PortalMetricsGoidGeneratorImpl - Initializing generator with prefix: b6c040a73d13581c
    16 Sep 2016 22:12:58,057 DEBUG PortalMetricsSyncUtilityMain - SYNC selected.
    16 Sep 2016 22:12:58,060 INFO PortalMetricsSyncUtilityMain - Sync started at Fri Sep 16 22:12:58 PDT 2016
    16 Sep 2016 22:12:58,072 DEBUG PortalMetricsSyncUtilityMain - Metrics Bin Interval = 15
    16 Sep 2016 22:12:58,073 INFO MySQLSyncUtility - Copying data in batches of 100 for portal managed services: {e6648714f0bc7c93bbc5a2e09243286c=d6008d8c-e8ba-47d6-9902-468c5e1bfe45}
    16 Sep 2016 22:12:58,097 INFO MySQLSyncUtility - Copying data for service id: e6648714f0bc7c93bbc5a2e09243286c uuid: d6008d8c-e8ba-47d6-9902-468c5e1bfe45
    16 Sep 2016 22:12:58,100 INFO AbstractPortalMetricsUtility - Published service e6648714f0bc7c93bbc5a2e09243286c already exists in destination database.
    16 Sep 2016 22:12:58,101 INFO MySQLSyncUtility - Latest period start for serviceGoidHex e6648714f0bc7c93bbc5a2e09243286c: 1474084800000
    16 Sep 2016 22:12:58,102 INFO MySQLSyncUtility - Number of metrics that require sync for service e6648714f0bc7c93bbc5a2e09243286c: 0
    16 Sep 2016 22:12:58,103 INFO PortalMetricsSyncUtilityMain - Finished syncing hourly data.
    16 Sep 2016 22:12:58,105 INFO MySQLAggregateAndSyncUtility - Aggregating and copying the last 15 minutes of data for services: {e6648714f0bc7c93bbc5a2e09243286c=d6008d8c-e8ba-47d6-9902-468c5e1bfe45}
    16 Sep 2016 22:12:58,128 INFO AbstractPortalMetricsUtility - Published service e6648714f0bc7c93bbc5a2e09243286c already exists in destination database.
    16 Sep 2016 22:12:58,165 DEBUG PortalMetricsSyncUtilityMain - Error aggregating fine data: Transaction rolled back.
    com.l7tech.portal.metrics.SyncException: Transaction rolled back.
    at com.l7tech.portal.metrics.MySQLAggregateAndSyncUtility.aggregateAndSync(Unknown Source)
    at com.l7tech.portal.metrics.PortalMetricsSyncUtilityMain.b(Unknown Source)
    at com.l7tech.portal.metrics.PortalMetricsSyncUtilityMain.a(Unknown Source)
    at com.l7tech.portal.metrics.PortalMetricsSyncUtilityMain.main(Unknown Source)
    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '76cce6f207fa45bc8c3fbdd4026164df-\xE6d\x87\x14\xF0\xBC|\x93\xBB\' for key 'nodeid'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2683)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2144)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2444)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2362)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2347)
    at com.l7tech.portal.metrics.MySQLAggregateAndSyncUtility.a(Unknown Source)
    ... 4 more
    16 Sep 2016 22:12:58,168 INFO PortalMetricsSyncUtilityMain - Total execution time: 111 milliseconds.
    Finished metrics sync.

     

    First of all, I assume that because of my metrics in GW has ZERO entries to sync, nothing will happen in portal. But why? I do have a policy with snippet and this API has the Managed by Portal assertion.

     

     

    Ideas? 

     

    Thanks,



  • 5.  Re: CA Portal - Analytics Reports Empty Result

    Broadcom Employee
    Posted Sep 21, 2016 02:48 AM

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '76cce6f207fa45bc8c3fbdd4026164df-\xE6d\x87\x14\xF0\xBC|\x93\xBB\' for key 'nodeid'

     

    Did you ever manually migrate the metrics data?

     

    On  table `service_metrics`, there is UNIQUE KEY `nodeid` (`nodeid`,`published_service_goid`,`resolution`,`period_start`) 

     

    1. easier way, backup and remove data from service_metrics, service_metrics_details, message_context_mapping_keys, message_context_mapping_values tables on lrsdata database on  portal server

    2. if you have to keep previous metrics data, then you have to find out the what records on lrsdata duplicate with the records on ssg, then remove them on lrsdata.