{"id":15062618,"url":"https://github.com/aquilax/grafana-ledger-data-source-server","last_synced_at":"2025-10-05T00:53:45.957Z","repository":{"id":141417712,"uuid":"218331609","full_name":"aquilax/grafana-ledger-data-source-server","owner":"aquilax","description":"Grafana server for ledger data written in Go","archived":false,"fork":false,"pushed_at":"2022-04-06T05:06:15.000Z","size":70,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-26T07:02:30.042Z","etag":null,"topics":["go","grafana"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aquilax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-29T16:21:16.000Z","updated_at":"2024-11-18T09:50:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"632868ca-7e20-4cd9-a425-f8483f8b689d","html_url":"https://github.com/aquilax/grafana-ledger-data-source-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aquilax/grafana-ledger-data-source-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fgrafana-ledger-data-source-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fgrafana-ledger-data-source-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fgrafana-ledger-data-source-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fgrafana-ledger-data-source-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquilax","download_url":"https://codeload.github.com/aquilax/grafana-ledger-data-source-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fgrafana-ledger-data-source-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395916,"owners_count":25979691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","grafana"],"created_at":"2024-09-24T23:43:52.613Z","updated_at":"2025-10-05T00:53:45.942Z","avatar_url":"https://github.com/aquilax.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grafana-ledger-data-source-server\n\nGrafana JSON DataSource server for Ledger-cli.\n\nThis is a small Go backend server for using with Grafana's [SimpleJson](https://grafana.com/grafana/plugins/grafana-simple-json-datasource) DataSource plugin.\n\n**Note**: There is a hacky PHP alternative [here](https://github.com/aquilax/grafana-ledger-data-source-php-server) which uses directly ledger-cli for data access.\n\n**Note**: This is only a proof of concept project. Use it at your own risk.\n\n![grafana-ledger-data-source-server](data/screenshot.png)\n\n## Try it out\n\n### Running the server\n\nMake sure you have [Go](https://golang.org/doc/install) installed.\n\nInstall the server:\n\n```\ngo get github.com/aquilax/grafana-ledger-data-source-server\n```\n\nNow you can run the server like that:\n\n```\ngrafana-ledger-data-source-server -f path/to/your/file.ledger\n```\n\n### Running Grafana\n\nThe easiest way to get started is by using the docker image for following [these instructions](https://grafana.com/docs/installation/docker/).\n\nAt the time of writing the command to run is:\n\n```\ndocker run \\\n  -d \\\n  -p 3000:3000 \\\n  --name=grafana \\\n  -e \"GF_INSTALL_PLUGINS=grafana-simple-json-datasource\" \\\n  grafana/grafana\n```\n\nNote that the `GF_INSTALL_PLUGINS=grafana-simple-json-datasource` installs the [grafana-simple-json-datasource](https://github.com/grafana/simple-json-datasource) plugin.\n\nAfter the command runs successfully, head to http://localhost:3000 and log in with `admin/admin`.\n\n\n### Configuring the data source\n\n* Go to http://localhost:3000/datasources and press `Add data source`.\n* Select the `SimpleJSON` plugin from the list.\n* Type `http://localhost:8080` in the URL field\n* Select `Browser` in the Access field\n* Press Save \u0026 Test\n\nIf the server is running, you should see a success message\n\n\n### Creating a dashboard\n\n* Create new dashboard and `Add Query`.\n* From the Query dropdown select the `SimpleJSON` data source (for new installation it is also the default)\n* From the query select `timeserie` (default)\n* Start typing account name in the next field and select one in the dropdown\n* You can add more queries to the same panel, or add as many panels as you need\n\n## Accounts\n\nBoth exact account names and account groups can be used when query-ing the data. For example for the following ledger transaction:\n\n```\n2015/10/12 Exxon\n    Expenses:Food:Lunch       10.00\n    Expenses:Food:Dinner      20.00\n    Liabilities:MasterCard\n```\n\nThese are all available accounts to select from:\n\n```\nLiabilities:\nLiabilities:MasterCard\nExpenses:\nExpenses:Food:\nExpenses:Food:Dinner\nExpenses:Food:Lunch\n```\n\nFor the names that end on `:`, the data will be aggregated for all accounts that start with the selected prefix. For example the value for `Expenses:Food:` will be `30.00` for `2015/10/12`.\n\n\n## Notes\n* The transaction are currently read only when the server starts.\n* The server uses the [howeyc/ledger](https://github.com/howeyc/ledger) package for parsing the ledger files and comes with all its limitations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquilax%2Fgrafana-ledger-data-source-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquilax%2Fgrafana-ledger-data-source-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquilax%2Fgrafana-ledger-data-source-server/lists"}