Accessing QPM Data by Cluster for Untethered Deployments
QPM, or Queries per Month, is the total count of all Traffic/API calls made in a month. It includes all requests regardless of response status.
QPM Implementation
- Every API request gets captured as an access log.
- Each access log is transferred to the log service.
- Every time the log service encounters an incoming access log, it increments the counter.
- At the turn of every 1 hour, on the zeroth minute, the counter is written to a disk.
- The counter is then reset to 0 for the counts of the next hour.
How to find the QPM
To find the total count of queries for a given month, a convenient script is available on the log pod/container at /opt/mashery/containeragent/bin/getCounts.sh.
You'll need to provide the -t| -time mm-yyyy parameter to execute the script successfully.
Usage:
Example execution of getCounts.shgetCounts.sh
getCounts.sh -t|--time mm-yyyyExamples:
getCounts.sh -t 04-2019or
getCounts.sh --time 04-2019
/opt/mashery/containeragent/bin/getCounts.sh -t 04-2019
Counting total number of access logs 234 Finished counting of access logs
How to Check Compliance using QPM Implementation
- Run the following command (for Docker Swarm) on each Log Pod/Container:
docker exec -it <containerid> /opt/mashery/containeragent/bin/getCounts.sh <mm-yyyy>
Example:docker exec -it <containerid> /opt/mashery/containeragent/bin/getCounts.sh 04-2019
- Add up the output for each of the pods.
QPM = LogService1_Total+LogService2_total....+LogService*n*_total
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.