|
1 | | -From version 5.4.0 we have introduce a new feature to collect usage data as part of the Platform. |
| 1 | +From version 5.4.0 a new `Licensing Component` feature was introduced to [collect usage data](https://docs.particular.net/servicepulse/usage) from within the Particular Platform. |
2 | 2 |
|
3 | 3 | Usage data is collected from 3 different sources: |
4 | | -- Audited messages |
5 | | -- Monitoring metrics |
| 4 | +- Audit instance(s) |
| 5 | +- Monitoring instance |
6 | 6 | - Directly from the broker |
7 | 7 |
|
8 | | -The error instance is the orchestrator for all the collection from all these different endpoints. |
| 8 | +The Error instance is the orchestrator for collecting usage data from all the different sources. |
9 | 9 |
|
10 | | -Audited messages usage is collected by querying the audit instances every so often. |
11 | | -Broker collection is also collected by querying the borker directly every 24 hours. |
12 | | -The monitoring metrics collection is collected by the metrics intance sending a direct message to a well known queue that by default is named "servicecontrol.throughput". |
| 10 | +The Audit instance(s) is/are queried once a day to obtain usage data. The initial query will grab all available historic data. |
| 11 | +The broker is queried once a day to obtain usage data. Depending on the broker, the initial query will grab the last 30 days of data. |
| 12 | +The Monitoring instance uses its metrics calculations to send usage data to the Error instance every 5 minutes to a pre-defined satellite queue with the default name of `servicecontrol.throughput`. |
13 | 13 |
|
14 | 14 |
|
15 | | -### Why is the "servicecontrol.throughput" queue hardcoded? |
16 | | -The TF that initially created this new feature decided that by hardcoding the queue name, it would be simpler for the customers to get started because they don't need to configure anything up front. |
17 | | -This was decided based on simplicity of upgrade vs maintanability. |
| 15 | +### Why is the "servicecontrol.throughput" queue not a sub queue of the Error instance? |
18 | 16 |
|
19 | | -### Why is the "servicecontrol.throughput" not a sub queue of the error instance? |
20 | | -Because this would mean customer would have to configure the sending endpoint (monitoring instance) with the name of this queue, which we wanted to avoid. |
| 17 | +The usage collection queue needs to be known to the Monitoring instance. |
21 | 18 |
|
22 | | -#### But we have SCMU, can't that make sure the queue names match? |
23 | | -SCMU is a Windows only tool, as well as, this would only work if they are installing all instances on the same machine. |
24 | | -Same reasons why, we do not configure the remote audit instances. |
| 19 | +At the time of creating this feature it was decided that having a queue name that is not dependent on the name of the Error instance means less setup for majority of customers since the feature would "just work" out of the box. |
| 20 | + |
| 21 | +If the queue name was based on the Error instance name (i.e. "ErrorInstanceQueueName.throughput") then **every ** customer would have to make updates to their Monitoring instance config to set the correct queue name. |
| 22 | + |
| 23 | +The decision favoured simplicity of upgrade over existing ServiceControl queue name conventions, keeping in line with the tech lead preferences for [software that "just works"](https://github.com/Particular/Strategy/blob/master/tech-lead-preferences/it-just-works.md#it-just-works) and [convenience](https://github.com/Particular/Strategy/blob/master/tech-lead-preferences/usability.md#convenience). |
| 24 | + |
| 25 | + |
| 26 | +#### Why isn't SCMU used to ensure the names match? |
| 27 | + |
| 28 | +SCMU is a Windows only tool, plus the install of the Monitoring instance is separate to that of the Error instance. |
| 29 | +Additionally, the Monitoring instance can be installed on a different server to the Error instance. |
| 30 | +For similar reasons we do not configure the remote audit instances in SCMU. |
25 | 31 |
|
26 | 32 | ### Can the "servicecontrol.throughput" queue be renamed? |
27 | | -Yes, see https://docs.particular.net/servicecontrol/monitoring-instances/configuration#usage-reporting |
| 33 | + |
| 34 | +Yes, the queue name can be changed via: |
| 35 | + |
| 36 | +- the [LicensingComponent/ServiceControlThroughputDataQueue](https://docs.particular.net/servicecontrol/servicecontrol-instances/configuration#usage-reporting-when-using-servicecontrol-licensingcomponentservicecontrolthroughputdataqueue) setting on the Error instance |
| 37 | +- the [Monitoring/ServiceControlThroughputDataQueue](https://docs.particular.net/servicecontrol/monitoring-instances/configuration#usage-reporting-monitoringservicecontrolthroughputdataqueue) on the Monitoring instance |
| 38 | + |
| 39 | +These two settings must match for the usage reporting from Monitoring to work correctly. |
0 commit comments