This repository contains scripts and examples to integrate with Gremlin SaaS. The provided examples cover managing service annotations, running service reliability tests, and interacting with the Honeycomb API.
Use these scripts to manage annotations for various services.
Run the following command to manage storefront annotations:
./scripts/manage-storefront-annotations.sh <Action> <Suffix> <Team ID> <Namespace>
Example:
./scripts/manage-storefront-annotations.sh add East b8d5b49a-36cb-461f-95b4-9a36cb061ffe storefront
Run the following command to manage WordPress annotations:
./scripts/manage-wordpress-annotations.sh <Action> <Suffix> <Team ID> <Namespace>
Examples:
./scripts/manage-wordpress-annotations.sh add Test 0e1177cd-d46b-43e4-9177-cdd46b33e402 wordpress-test
./scripts/manage-wordpress-annotations.sh add Prod 0e1177cd-d46b-43e4-9177-cdd46b33e402 wordpress-prod
Execute the following script to run service reliability tests:
./scripts/test-services.sh <Team ID>
Example:
./scripts/test-services.sh 0e1177cd-d46b-43e4-9177-cdd46b33e402
These examples demonstrate how to interact with the Honeycomb API.
Retrieve all triggers for the frontend proxy:
curl -s -X GET https://api.honeycomb.io/1/triggers/frontendproxy \
-H "X-Honeycomb-Team: $TF_VAR_honeycomb_storefront_api_key" | jq .
Retrieve all Service Level Objectives (SLOs) for the frontend proxy:
curl -s -X GET https://api.honeycomb.io/1/slos/frontendproxy \
-H "X-Honeycomb-Team: $TF_VAR_honeycomb_storefront_api_key" | jq .
To create markers, use the following details:
- Request URL:
https://api.honeycomb.io/1/markers/__all__
Note: The dataset slug or use
__all__
for endpoints that support environment-wide operations.
-
Custom Headers:
- Key:
X-Honeycomb-Team
- Value:
<Honeycomb API Key>
- Key:
-
Payload Example:
{ "message": "Gremlin ${ATTACK_TYPE} attack (ID: ${ATTACK_ID}) is ${STATUS} (Final Stage: ${STAGE}) from ${SOURCE}", "type": "attack-${ATTACK_TYPE}", "url": "https://app.gremlin.com/attacks/${ATTACK_ID}" }
Feel free to submit issues or pull requests to enhance these examples further.