Skip to content

kinduff/firefly_iii_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firefly III Exporter

GitHub release (latest by date) Go Reference Go Report Card CodeFactor Test / Build Docker Pulls GitHub all releases

This is a Prometheus exporter for Firefly III. It provides statistics from accounts, transactions, and categories.

An example of the output of this exporter can be found here.

Feature list

This is a work in progress, please feel free to contribute with additional statistics by extending this exporting and submitting a Pull Request.

  • Accounts
    • Count
    • Balances
  • Transations
    • Count
  • Categories
    • Count
    • Transactions
  • Bills
  • Piggy banks
  • Budgets
  • Recurrences

Prerequisites

One of the two, depending on your running method.

Running this exporter

See Configuration in order to set the necessary params to run the exporter.

Using a binary

You can download the latest version of the binary built for your architecture here.

Using Docker

The exporter is also available as a Docker image in DockerHub and Github CR. You can run it using the following example and pass the configuration as environment variables:

$ docker run \
  --name firefly_iii_exporter \
  -p 4002:4002 \
  -e BASE_URL=<url-to-firefly-iii> \
  -e API_KEY=<personal-access-token> \
  kinduff/firefly_iii_exporter:latest

Alternative, you can use ghcr.io/kinduff/firefly_iii_exporter if you want to use the Github Container Registry.

Using the source

Optionally, you can download and build it from the sources. You have to retrieve the project sources by using one of the following way:

$ go get -u github.com/kinduff/firefly_iii_exporter
# or
$ git clone https://github.com/kinduff/firefly_iii_exporter.git

Install the needed vendors:

$ GO111MODULE=on go mod vendor

Then, build the binary:

$ go build -o firefly_iii_exporter .

Configuration

You can use both environment variables or parameters in both the binary or the docker image. If you wish to use parameters, simply invoke the same environment variable but in downcase, or use the flag --help for more information.

Environment variable Description Default Required
BASE_URL URL path including protocol to the Firefly III instance Yes
API_KEY Your Personal Access Token Yes
HTTP_PORT The port the exporter will be running the HTTP server 4002
SCRAPE_INTERVAL Time in natural format to scrap statistics from the instance 30s

Available Prometheus metrics

Metric name Description
firefly_iii_account_balance_metrics Current balance of each of the available accounts
firefly_iii_account_transactions_metrics Total transactions of each of the available accounts
firefly_iii_accounts_metrics Total accounts available
firefly_iii_transaction_by_category_metrics Total transactions per available category
firefly_iii_transactions_metrics Total transactions available