It depends of wha you mean by any metrics. Below is the analytics data flow and some potential scenarios:
ANALYTICS DATA FLOW
SCENARIOS
1) Management UI shows analytics data but the data is not refreshing, it is old (60 mins >)
Possibility A: Problem with aggregation.
- Most of the reports on the UI show data from aggregate tables. Aggregates are performed by PS. If PS is down or failing, there may not be new aggregated data to show.
- On this scenario, custom reports will show new/recent date but aggregated reports will not.
Possibility B: Problem with incoming raw data.
- Analytics events are produced by MP and placed in QD. If QDs are down, or QS are down or failing, no new date will be fed to the PG.
- This will generate the illusion of frozen in time reports.
- On this scenario, no new data is show on aggregate reports or customer reports. But UI is able to display data for both.
2) No date is showing at all, no aggregates or customer reports are working
Possibility A: PostgreSQL is down or failing.
Possibility B: PostgreSQL is down slow.
- This may be the product of too much raw data on the system for the hardware specification used for PG
- Too much data volume for the hardware specification used for PG
- On this scenario, queries will always execute but their execution is probably exceeding the time out by MS and UI.
Possibility C: Environment was not provisioned in Analytics pipeline.
- There is an association between Org and Env to components QS and PS that happen during the on-boarding process for Org and Env. If that associated failed or it is not performed, the system will not now which analytics components to use for Org and Env.
- See relevant API and checks below.
Analytics group configuration:
> curl -u <sysAdminEmail> "http://<ms_IP>:8080/v1/analytics/groups/ax"
[ {
"name" : "axgroup001",
"properties" : {
"consumer-type" : "ax"
},
"scopes" : [ "traininglab~prod" ],
"uuids" : {
"postgres-server" : [ "baf7d9d5-618c-4ce4-8c5b-23ad2c62eb51:489aa9b0-b764-4ade-8615-27db09e9deca" ],
"qpid-server" : [ "708cf21f-2efe-41c9-97b5-809e56676347", "4f1c20e5-0dc5-450c-8619-3cd9fe75ce4b" ]
},
"consumer-groups" : [ {
"name" : "consumer-group-001",
"consumers" : [ "708cf21f-2efe-41c9-97b5-809e56676347", "4f1c20e5-0dc5-450c-8619-3cd9fe75ce4b" ],
"datastores" : [ "baf7d9d5-618c-4ce4-8c5b-23ad2c62eb51:489aa9b0-b764-4ade-8615-27db09e9deca" ],
"properties" : {
}
} ],
"data-processors" : {
}
} ]
The API above allows you to display the analytics groups. Here you are looking to validate that your Org and Env are listed on the scopes. On the example above, my Org is called traininglab and Env is called prod.
Analytics provisioning for Env:
curl -u <adminEmail>:<adminPassword> [http://<management-server-private-ip>:8080/v1/organizations/<orgname>/environments/<envname>/provisioning/axstatus](http://<management-server-private-ip>:8080/v1/organizations/<orgname>/environments/<envname>/provisioning/axstatus)
The API above allow you to understand if the provisioning of analytics for the environment was successful. Scan the output and look for “SUCCESS”. Anything other than success may represent a missing step or error.
Validate Postgres schema was created:
psql -h /opt/apigee/var/run/apigee-postgresql -U apigee apigee
apigee=# : \d analytics."<orgname>.<envname>.fact"
apigee=# \q
Run the command above on your PostgreSQL master. Replace orgname by your Org name and envname by Env name.