Description:
National Grid Carbon Intensity Add-on for Splunk enables the retrieval and indexing of data from National Grid’s Carbon Intensity API.
This API provides an indicative trend of regional carbon intensity of the electricity system in Great Britain (GB) 96+ hours ahead of real-time, in addition to current and historic data.
With accurate current carbon intensity for energy used (rather than high level conversion factors, often updated on an annual basis), organisations can have realtime indications on how they are tracking their progress towards reduction goals.
With carbon intensity forecast data, organisations can adjust the planned schedule of electricity intensive activities to minimize their carbon footprint.
Dashboards to analyse the returned data are provided in the Sustainability Toolkit for Splunk - https://splunkbase.splunk.com/app/6343/.
Setup:
See the Details tab for dependencies and setup instructions.
Privacy:
This app does not require PII nor does it send any data outside the Splunk environment.
Help:
While this app is not formally supported, the developer can be reached at mthomas@splunk.com (OR in splunk-usergroups slack, @mthomas). Responses are made on a best effort basis. Feedback is always welcome and appreciated!
(if you use the User Group approach, include: Learn more about splunk-usergroups slack here: https://docs.splunk.com/Documentation/Community/current/community/Chat#Join_us_on_Slack)
This Add-on implements calls to the following:
Get Carbon Intensity data for current half hour
- Endpoint: https://api.carbonintensity.org.uk/intensity
- Parameters: None
- API Documentation: https://carbon-intensity.github.io/api-definitions/#get-intensit
- How events are processed and saved
- Events saved to Spunk: 1, for current half hour
- Sourcetype: NG:carbonintensity
- Default index: sustainability
- _time: The timestamp in the returned event. This is defined in the sourcetype.
- Default frequency of request: 1800 seconds / 30 minutes
Get Carbon Intensity data for current half hour for GB regions
- Endpoint: https://api.carbonintensity.org.uk/regional
- Parameters: None
- API Documentation: https://carbon-intensity.github.io/api-definitions/#get-regional
- How events are processed and saved
- Events saved to Spunk: 1, for current half hour
- Sourcetype: NG:carbonintensity:byregion
- Default index: sustainability
- _time: The timestamp in the returned event. This is defined in the sourcetype.
- Default frequency of request: 1800 seconds / 30 minutes
Get Carbon Intensity data 48hrs forwards from specific datetime
- Endpoint: https://api.carbonintensity.org.uk/intensity/{from}/fw48h
- Parameters: “from” is set to the date, hour and minute when the API call is made
- API Documentation: https://carbon-intensity.github.io/api-definitions/#get-intensity-from-fw48h
- How events are processed and saved
- Events saved to Spunk: 96, one per half hour period in the next 48 hours
- Sourcetype: NG:carbonintensity:forecast
- Default index: sustainability
- _time: The time the events are saved to Splunk. This is defined in the sourcetype.
- Default frequency of request: 86400 seconds / 1 day
Get Carbon Intensity data for next 48h for GB regions
- Endpoint: https://api.carbonintensity.org.uk/regional/intensity/{from}/fw48h
- Parameters: “from” is set to the date, hour and minute when the API call is made
- API Documentation: https://carbon-intensity.github.io/api-definitions/#get-regional-intensity-from-fw48h
- How events are processed and saved
- Events saved to Spunk: 96, one per half hour period in the next 48 hours
- Sourcetype: NG:carbonintensity:forecast:byregion
- Default index: sustainability
- _time: The time the events are saved to Splunk. This is defined in the sourcetype.
- Default frequency of request: 86400 seconds / 1 day
The following table can be used as a quick comparison of the details provided above
|
Get data for current half hour |
Get data for current half hour for GB regions |
Get data 48hrs forwards from specific datetime |
Get data for next 48h for GB regions |
Endpoint of https://api.carbonintensity.org.uk |
/intensity
|
/regional
|
/intensity/{from}/fw48h
|
/regional/intensity/{from}/fw48h
|
Parameters |
None |
None |
“from” is set to the date, hour and minute when call is made
|
“from” is set to the date, hour and minute when call is made
|
API Documentation |
#get-intensity |
#get-regional |
#get-intensity-from-fw48h |
#get-regional-intensity-from-fw48h |
Event Count |
A single event is returned |
A single event is returned |
96, one per half hour period in the next 48 hours |
96, one per half hour period in the next 48 hours |
Sourcetype |
NG:carbonintensity |
NG:carbonintensity:byregion |
NG:carbonintensity:forecast |
NG:carbonintensity:forecast:byregion |
Default index |
sustainability |
sustainability |
sustainability |
sustainability |
_time |
The timestamp from returned event |
The timestamp from returned event |
The time the events are saved to Splunk |
The time the events are saved to Splunk |
Default request frequency |
30 minutes |
30 minutes |
1 day |
1 day |
Installation
Splunk Cloud
This can be installed on your cloud environment, either as self-service or through a request to Splunk Support.
Splunk Enterprise
Following best practise, the Add-on should be installed on a Heavy Forwarder, to make the API requested.
Sourcetype definitions should be installed on the Indexers and Search Heads.
Setup
Enable any of the required inputs listed above, after changing index names and request frequency if required.
Data Analysis
Dashboards to analyse the returned data are provided in the Sustainability Toolkit for Splunk.