Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srclosson/faker-datasource
Datasource that uses faker.js to create random data for panels
https://github.com/srclosson/faker-datasource
datasource faker faker-generator grafana grafana-datasource
Last synced: 24 days ago
JSON representation
Datasource that uses faker.js to create random data for panels
- Host: GitHub
- URL: https://github.com/srclosson/faker-datasource
- Owner: srclosson
- License: apache-2.0
- Created: 2020-03-02T22:49:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T20:13:51.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T19:40:35.987Z (7 months ago)
- Topics: datasource, faker, faker-generator, grafana, grafana-datasource
- Language: TypeScript
- Size: 2.55 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Data Source
[![CircleCI](https://circleci.com/gh/grafana/simple-datasource/tree/master.svg?style=svg)](https://circleci.com/gh/grafana/simple-datasource/tree/master)
The faker datasource uses faker.js to create random data for panels.
In a single request, the time range is divided up, and a request for random data is generated.
The datasource uses moustace templates to generate data, so:
```
{{name.lastName}}, {{name.firstName}} {{name.suffix}}
{{address.city}}
{{database.column}}
{{random.number({"min": 1, "max": 255})}}
```Will generate a table of data with time, and 3 columns: a random name, a city, a database column, and a random integer between 1 and 255.
For a chart, the following:
```
{{random.number({"min": 1, "max": 255})}}
{{random.number({"min": 255, "max": 512})}}
```Will generate 2 series from a single request (A).
If you move the second line to it's own request, you get the same dataset, but over two queries.Feedback and comments welcome.