Skip to content

Commit 100425e

Browse files
authored
Merge pull request #351 from killbill/health-config
aviate health: Add config endpoint
2 parents 39c10aa + 018cb10 commit 100425e

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

source/includes/_aviate-health.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,105 @@ None
343343

344344
If successful, returns a `HealthData` object.
345345

346+
### Retrieve Runtime Configuration
347+
348+
This endpoint retrieves the runtime configuration of a running Kill Bill instance and it provides the detail of the configuration source for each property along with its final value; the sources can be - by order of precedence: Immutable system property, Tenant configuration, Environment variable, Runtime configuration or the Default property value from the system.
349+
350+
**HTTP Request**
351+
352+
`GET /plugins/aviate-plugin/v1/health/config`
353+
354+
> Example Request:
355+
356+
```shell
357+
curl -X GET \
358+
-H "Authorization: Bearer ${ID_TOKEN}" \
359+
-H 'Content-Type: application/json' \
360+
-H 'X-killbill-apiKey: bob' \
361+
-H 'X-killbill-apisecret: lazar' \
362+
'http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/config'
363+
```
364+
365+
```java
366+
```
367+
368+
```ruby
369+
```
370+
371+
```python
372+
```
373+
374+
````php
375+
````
376+
377+
````javascript
378+
````
379+
380+
> Example Response:
381+
382+
```json
383+
{
384+
"config": {
385+
"ImmutableSystemProperties": {
386+
"values": [
387+
{
388+
"key": "user.timezone",
389+
"value": "GMT"
390+
}
391+
]
392+
},
393+
"RuntimeConfiguration": {
394+
"values": [
395+
{
396+
"key": "org.killbill.dao.user",
397+
"value": "admin"
398+
},
399+
{
400+
"key": "org.killbill.persistent.bus.external.sleep",
401+
"value": "300"
402+
},
403+
{
404+
"key": "org.killbill.billing.plugin.kpm.bundlesPath",
405+
"value": "/var/lib/killbill/bundles"
406+
},
407+
...
408+
]
409+
},
410+
"KillBillDefaults": {
411+
"values": [
412+
{
413+
"key": "org.killbill.dao.maxConnectionAge",
414+
"value": "0m"
415+
},
416+
{
417+
"key": "org.killbill.dao.useServerPrepStmts",
418+
"value": "true"
419+
},
420+
{
421+
"key": "org.killbill.billing.server.notifications.retries",
422+
"value": "15m,30m,2h,12h,1d"
423+
},
424+
...
425+
]
426+
}
427+
}
428+
}
429+
```
430+
431+
**Request Body**
432+
433+
None
434+
435+
**Query Parameters**
436+
437+
None
438+
439+
440+
**Response**
441+
442+
If successful, returns a status code of 200 and the requested runtime configuration data.
443+
444+
346445
### Retrieve Metrics
347446

348447
This endpoint returns metric data. This data can be used to assess the health of the system and gain visibility into it. The metrics are computed by the aviate plugin when the `com.killbill.billing.plugin.aviate.enableHealthReporter` property is set to true. Each metric is a timeseries that can be analyzed and/or displayed.

0 commit comments

Comments
 (0)