Eventfull is a tiny application that can serve as a custom events source for New Relic or any other event sink. A sample events sink server is also included.
You need next environmental variables set if you plan to use NR as events destination:
NEW_RELIC_ACCOUNT_ID
and NEW_RELIC_INSIGHTS_KEY
as per New Relic referrence.
The "user interface" consists of 2 json files:
event.json
is essentially the template of the custom event. As per NR requirements you need to include at least the field eventType
. The rest of the fields are up to you.
Values can be set to go's template variables e.g. {{.service_name}}
which you can define in the configuration json.
conf.json
holds up configuration values.
Here you can set specific values for templatized settings in the event.json
.
If you set a url
then the events will be sent to that endpoint rather than NR.
You can set up specific values for your metrics, such as sli
(which needs to be a percentage) and metric_cutoff_value
. Eventfull will produce events whose value will -over time- be below the cutoff value at sli
percentage. E.g. if you set metric_cutoff_value
to 180 and sli
to 90.0 then 90.0% of the produced events will be below 180 thus giving you a guaranteed Service Level Indicator of 90%. slo
(Service Level Objective) on the other hand is the wanted objective for your service. You can start of next sample configuration if you want to use owr own server for experimentation:
{
"url": "http://localhost:8080/ingest",
"service": "test_service",
"metric": "test_metric",
"cutoff_value": 100,
"sli": 90,
"slo": 99,
"repeat_every_msecs": 1
}
- clone this repo
cd eventfull\eventfull
- Edit
event.json
andconf.json
to your specs. $ go build
$ ./eventfull client
$ ./eventfull server
http://localhost:8080/stats
- Test various custom events formats.
- Test SLO accounting by providing a "service" with guaranteed SLI metrics.