influxdata / influxdata/telegraf
Add an input plugin for FXMacroData macroeconomic and FX data
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
I want Telegraf to collect official macroeconomic indicators (CPI, policy rates, payrolls, GDP, unemployment, trade balance and so on) and FX reference data as time series, so they can sit in the same InfluxDB alongside market and application metrics and be joined, alerted on and dashboarded like any other measurement.
Today that means writing a custom script per publisher, because each central bank and statistics office has its own format and release mechanics. [FXMacroData](https://fxmacrodata.com) aggregates those official sources behind one REST API across 18 currencies, with USD available without an API key, which makes it a good fit for a single input plugin.
### Expected behavior
An `inputs.fxmacrodata` plugin that, on each gather, fetches the latest observations for the configured currencies and indicators and emits one point per observation. Each point should be timestamped with the instant the figure was published rather than the collection time, since a macro value is only meaningful alongside when it became known. Null values should be skipped rather than written as zero. An optional `api_key` (read through `config.Secret` and sent as a request header) unlocks non-USD currencies; a currency that is not authorised should be reported for that series without failing the rest of the gather.
### Actual behavior
There is no input plugin for this data. Collecting it requires an external script feeding `inputs.exec` or `inputs.http` with per-series JSON path configuration, and neither of those can stamp points with the publication instant carried in the payload.
### Additional info
Implementation proposed in #19678 (plugin, tests with `httptest`, `README.md`, `sample.conf`, registration in `plugins/inputs/all`). Example output:
```text
fxmacrodata_indicator,currency=USD,indicator=inflation,source=BLS value=3.4,reference_date="2026-07-31" 1786192200000000000
```
Disclosure: I work on FXMacroData.
Contributor guide
Research direction
Start by reviewing the proposed implementation in #19678 and the existing input-plugin layout. The payload names the plugin tests using httptest, README.md, sample.conf, and registration in plugins/inputs/all. Done means inputs.fxmacrodata gathers configured currencies and indicators, preserves publication timestamps, skips nulls, handles optional authentication, and reports unauthorised currencies without aborting the gather.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100