https://github.com/alttch/grafana-fes-datasource
Grafana datasource plugin for Finac Enterprise Server
https://github.com/alttch/grafana-fes-datasource
analytics charts dashboard finances grafana plugin
Last synced: 8 months ago
JSON representation
Grafana datasource plugin for Finac Enterprise Server
- Host: GitHub
- URL: https://github.com/alttch/grafana-fes-datasource
- Owner: alttch
- License: mit
- Created: 2020-05-03T13:43:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-04T10:32:48.000Z (about 3 years ago)
- Last Synced: 2025-01-10T02:32:30.003Z (9 months ago)
- Topics: analytics, charts, dashboard, finances, grafana, plugin
- Language: JavaScript
- Homepage:
- Size: 323 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grafana-fes-datasource
Grafana datasource plugin for [Finac Enterprise
Server](https://www.altertech.com/products/fes/)(can work with custom [Finac](https://github.com/alttch/finac) servers as well)

## Installation
(become a superuser)
```shell
cd /var/lib/grafana/plugins
git clone https://github.com/alttch/grafana-fes-datasource
cd grafana-fes-datasource
npm i
npm run build
systemctl restart grafana-server
```## Data source configuration
* Create new data source in Grafana, choose FesDS plugin
* Use http(s)://yourservername as server URL (no leading slash, no URIs)
* Enter Finac server API key (if set)## Usage
### Simple SELECT
The data source supports all Finac query commands, e.g.
```sql
SELECT account_balance(account="myaccount")
```### Switching base currency on-the-flow
* create Grafana variable, named e.g. *base*, put there EUR,USD,CZK as the
values.* then use variable in queries (don't forget about quotes):
```sql
SELECT account_balance(account="myaccount", base="${base}")
```### Time-based SELECT
Use Grafana global time variables to specify time range, e.g.
```sql
SELECT account_balance_range(account="myaccount", start=${__from}, end=${__to},
step="20a")
```As time variables are integer numbers, quotes are not required.
Note: it's highly useful to use auto-step for charts.
## Data formats
By default, all Finac queries return table series data. The following query
functions can return timestamps:* asset_rate
* asset_rate_range
* account_balance
* account_balance rangeTo change timestamp metric name, run query with "AS" parameter:
```sql
SELECT account_balance_range(start=${__from}, end=${__to}, account="myaccount",
step="20a") AS myaccount
```## Troubleshooting
### Range charts are slow
Increase range step (or decrease, if using auto-step)