Skip to main content

Export JSON for Custom Dashboards

Emit structured JSON from vg scan --format json or vg report --format json, write it to a file, and feed your DriftScore into custom dashboards and BI tools.

Difficulty
Intermediate
Duration
15 minutes
Steps
5

When you want to build your own visualization — a Grafana panel, an internal BI report, a custom web view — you need structured data, not formatted text. Vibgrate emits JSON from both the scanner and the reporter, so you can pipe your DriftScore and drift contributors into whatever consumes them. This tutorial covers both JSON sources.

Prerequisites

  • The Vibgrate CLI installed (npm i -g @vibgrate/cli)
  • A tool or script that consumes JSON

Steps

1. Scan with JSON output

vg scan --format json

This runs the scan and prints structured JSON instead of the default text.

2. Write JSON to a file

vg scan --format json --out drift.json

A file is easy to upload, archive, or load into a job.

3. Generate a JSON report

If you already have scan artifacts and want the report shape, use the reporter.

vg report --format json --out drift-report.json

4. Feed JSON into your dashboard

Load the JSON into your BI tool, push it to a datastore, or read it from a script. The DriftScore and drift contributors are available as fields for charts and tables.

5. Verify the JSON parses

Validate the output with any JSON parser to confirm it is well-formed before ingesting it.

Verification

The scan and report JSON parse without errors and contain your DriftScore. Because the format is stable JSON, downstream charts can rely on it across runs.

Next Steps

  • Drive automation from the output: "Use Vibgrate CLI Output Programmatically".
  • Send the same results to the hosted dashboard: "Push Scan Results to Vibgrate Cloud".

Prerequisites

  • Vibgrate CLI installed
  • A project to scan
  • A tool that consumes JSON

Steps

  • 1
    Scan with JSON output
  • 2
    Write JSON to a file
  • 3
    Generate a JSON report
  • 4
    Feed JSON into your dashboard
  • 5
    Verify the JSON parses

Category

Vibgrate