Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

results data visual #24

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Replayor Grafana Integration

This guide explains how to set up Grafana visualization for Replayor data.

## Prerequisites

1. Running Grafana instance (v9.0+)
2. Infinity plugin installed

## Setup Steps

In this case, we used docker to launch Grafana.

1. The json array obtained by replayor is used by the nginx proxy for the grafana data source

```
nginx:
image: nginx:latest
container_name: nginx
ports:
- "8000:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ../results/:/opt/grafana/data/:ro # Use the path to the results folder
```

2. Config the data source of grafana. (datasource.yml)

```
apiVersion: 1

datasources:
- name: FileDatasource
uid: replayor
type: yesoreyeram-infinity-datasource
access: "proxy"
url: http://nginx/replay-250/51d3ea41ec62_1729159159 # the result file
```

3. Add the grafana dashboard (dashboard.json)

It's basically defined. (filepath: ./grafana/provisioning/dashboards/dashboard.json)
if you want to defined more panels, you can add it in this file.

4. launch grafana and nginx

```
docker-compose up -d
```

Effect picture:
![img.png](img.png)

I just definded a few panels, you can define more panels as you like.
33 changes: 33 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
x-logging: &logging
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"

services:

grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3001:3000"
volumes:
- ../results/:/opt/grafana/data/:ro
- ./grafana/provisioning/:/etc/grafana/provisioning/:ro
environment:
- GF_SECURITY_ADMIN_USER=replayor
- GF_SECURITY_ADMIN_PASSWORD=replayor
- GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-json-datasource
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/dashboard.json


nginx:
image: nginx:latest
container_name: nginx
ports:
- "8000:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ../results/:/opt/grafana/data/:ro
Loading