-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example configuration files for test-api
test-api is a minimal API server that the agent can connect to. The implementation does not match the implementation of the actual API server used in product, it's simply enough to allow the agent to connect to it and receive checks and tenant information from it. Signed-off-by: Marcelo E. Magallon <[email protected]>
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
test-api input files | ||
==================== | ||
|
||
The files in this directory are the input to test-api. | ||
|
||
* data.json is used to populate the database. The remote information must be | ||
set to something valid, as it will be passed to the agent to publish metrics | ||
and logs. Note the agent will need the token listed here. | ||
|
||
* test-api.env contains the environment passed to the agent. The example file | ||
contains the token (as listed in data.json) that the agent will use to | ||
connect to test-api. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"tenants": [ | ||
{ | ||
"id": 1, | ||
"orgId": ..., // the org ID of the stack, can be made up | ||
"stackId": ..., // the stack ID of the instances you are connecting to, can be made up | ||
"metricsRemote": { | ||
"name": "metrics", | ||
"url": "https://.../api/prom", // URL of instance to push to, not just the base | ||
"username": "...", // username to authenticate to prometheus instance | ||
"password": "..." // password to authenticate to prometheus instance | ||
}, | ||
"eventsRemote": { | ||
"name": "logs", | ||
"url": "https://.../loki/api/v1", // URL of instance to push to, not just the base | ||
"username": "...", // username to authenticate to loki instance | ||
"password": "..." // username to authenticate to loki instance | ||
} | ||
} | ||
], | ||
"probes": [ | ||
{ | ||
"id": 1, | ||
"tenantId": 1, | ||
"name": "test-probe" | ||
} | ||
], | ||
"probeTokens": { | ||
"1": "..." // random token, base-64 encoded | ||
}, | ||
"checks": [ | ||
{ | ||
"id": 1, | ||
"tenantId": 1, | ||
"frequency": 60000, | ||
"timeout": 10000, | ||
"enabled": true, | ||
"basicMetricsOnly": true, | ||
"settings": { | ||
"multihttp": { | ||
"entries": [ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"url": "https://httpbin.test.k6.io/status/418" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"probes": [1], | ||
"target": "test", | ||
"job": "test" | ||
} | ||
] | ||
} |