Skip to content

Add an input plugin for FXMacroData macroeconomic and FX data #19697

Description

@roberttidball

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 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:

fxmacrodata_indicator,currency=USD,indicator=inflation,source=BLS value=3.4,reference_date="2026-07-31" 1786192200000000000

Disclosure: I work on FXMacroData.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions