* Strip nulls (again) * Add stripnulls script * Add transformations field * Close FieldConfig struct; proper plugin validating * s/graph/viz/ field in histogram dashboard * Use ui.GraphFieldConfig in histogram model * Add models for stat, gauge, barguage panel plugins Also toss necessary shared types into cue/ui/gen.cue, with TODOs to move them appropriately later. * Add required license headers * Heap of updates to cue UI components * Fix barchart types and one old devenv input * Use the GraphFieldConfig directly for timeseries * Add models.cue for a few panel plugins Barchart, state-timeline, and status-history * Enable the test validating all devenv dashboards!! * Fix effects of not checking after making comments * Update packages/grafana-ui/src/options/models.gen.ts Co-authored-by: Ryan McKinley <ryantxu@gmail.com> * Realign and unalign cue with ts types * Update devenv test to sniff for null errors Best option we have right now for helping people to know they need to strip nulls from devenv dashboards. * Add speculative default for barchart stacking * Fixup some dated devenv dashboards timeline-modes needed to be regenerated with the appropriate tooltip values included, per typing requirements, and timeline-demo needed to have the `mode` field removed, as it is not intended to be persisted. * Add necessary missing options for various panels * Regenerate devenv dashboards Co-authored-by: Ryan McKinley <ryantxu@gmail.com> |
||
---|---|---|
.. | ||
benchmarks/ab | ||
bulk_alerting_dashboards | ||
bulk-dashboards | ||
dev-dashboards | ||
dev-dashboards-without-uid | ||
docker | ||
e2e-api-tests | ||
local-npm | ||
create_docker_compose.sh | ||
dashboards.yaml | ||
datasources_docker.yaml | ||
datasources.yaml | ||
README.md | ||
setup.sh |
Set up your development environment
This folder contains useful scripts and configuration so you can:
- Configure data sources in Grafana for development.
- Configure dashboards for development and test scenarios.
- Create docker-compose file with databases and fake data.
Install Docker
Grafana uses Docker to make the task of setting up databases a little easier. If you do not have it already, make sure you install Docker before proceeding to the next step.
Developer dashboards and data sources
./setup.sh
After restarting the Grafana server, there should be a number of data sources named gdev-<type>
provisioned as well as
a dashboard folder named gdev dashboards
. This folder contains dashboard and panel features tests dashboards.
Please update these dashboards or make new ones as new panels and dashboards features are developed or new bugs are
found. The dashboards are located in the devenv/dev-dashboards
folder.
docker-compose with databases
This command creates a docker-compose file with specified databases configured and ready to run. Each database has
a prepared image with some fake data ready to use. For available databases, see docker/blocks
directory. Notice that
for some databases there are multiple images with different versions. Some blocks such as slow_proxy_mac
or apache_proxy_mac
are specifically for Macs.
make devenv sources=influxdb,prometheus,elastic5
Some of the blocks support dynamic change of the image version used in the Docker file. The signature looks like this:
make devenv sources=postgres,openldap,grafana postgres_version=9.2 grafana_version=6.7.0-beta1
Notes per block
Grafana
The grafana block is pre-configured with the dev-datasources and dashboards.
Jaeger
Jaeger block runs both Jaeger and Loki container. Loki container sends traces to Jaeger and also logs its own logs into itself so it is possible to setup derived field for traceID from Loki to Jaeger. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://grafana.com/docs/loki/latest/clients/docker-driver/#installing for installation instructions.
Graphite
version | source name | graphite-web port | plaintext port | pickle port |
---|---|---|---|---|
1.1 | graphite | 8180 | 2103 | 2103 |
1.0 | graphite1 | 8280 | 2203 | 2203 |
0.9 | graphite09 | 8380 | 2303 | 2303 |
Troubleshooting
Containers that read from log files fail to start (Mac OS)
If you are running Mac OSX, containers that read from the log files (e.g. Telegraf, Fileabeat, Promtail) can fail to start. This is because the default Docker for Mac does not have permission to create grafana
folder at the /var/log
location, as it runs as the current user. To solve this issue, manually create the folder /var/log/grafana
, then start the containers again.
sudo mkdir /var/log/grafana