Randomly generates Prometheus metrics for simulating default /metrics endpoints accross servers
docker-compose build
docker-compose up -d
curl http://localhost:32865/metrics
If you want to cause any resource metric to behave abnormaly, you could:
curl http://localhost:32865/accidents \
--header "Content-Type: application/json" \
--request POST \
--data "{
\"resourcename\": \"/resource/test-0001\",
\"type\": \"latency\",
\"value\": 100
}";
/resource/test-0001 to have a median duration of 100mscurl http://localhost:32865/accidents \
--header "Content-Type: application/json" \
--request POST \
--data "{
\"resourcename\": \"/resource/test-0001\",
\"type\": \"calls\",
\"value\": 100
}";
/resource/test-0001 to increase by a factor of 100curl http://localhost:32865/accidents \
--header "Content-Type: application/json" \
--request POST \
--data "{
\"resourcename\": \"/resource/test-0001\",
\"type\": \"errorrate\",
\"value\": 70
}";
/resource/test-0001 to float around 70%To remove all accidents, send a HTTP DELETE to the same endpoint
curl -X DELETE http://localhost:32865/surgery-accident
By default, this generator simulates requests to 10 different URIs, 2 different service versions, 2 different app versions and 2 different device types
Via the /entropy/set endpoint you can control this numbers resulting in how many samples are collected each time.
curl http://localhost:32865/entropy/set \
--header "Content-Type: application/json"
--request POST \
--data "{
\"uricount\": 20,
\"serviceversioncount\": 2,
\"appversioncount\": 2,
\"devicecount\": 2
}";
Content type
Image
Digest
sha256:610f3cb0c…
Size
15.8 MB
Last updated
almost 4 years ago
docker pull abilioesteves/metrics-generator