📖
Stake Local Dashboard
  • Stake Local Dashboard
    • Library Sections
  • Dashboard Installation
    • Installation Overview
    • Install Supporting Software
      • Install Prerequisites
      • Install Prometheus
      • Install Grafana
      • Install node_exporter
      • Install json_exporter
      • Install Ethereum Metrics Exporter
    • Configure Ethereum Clients
    • Configure Supporting Software
      • Configure json_exporter
      • Configure Prometheus Rules
      • Configure Ethereum Metrics Exporter
    • Prometheus Jobs & Targets
      • Prometheus Jobs
      • About Stake Local Labels
      • Base Targets Installation
      • Consensus Client Targets
      • Execution Client Targets
      • Validator Client Targets
      • node_exporter Target
      • json_exporter Target
      • Ethereum Metrics Exporter Targets
      • Third-Party Targets
      • Ethereum Address Targets
      • Validator Public Key Targets
      • Optional: Grafana Target
      • Optional: Prometheus Target
      • Clean Up Unused Targets
    • Optional: Alternative Dashboard Compatibility
      • Besu Dashboard Compatibility
      • Erigon Dashboard Compatibility
      • Geth Dashboard Compatibility
      • Lighthouse Dashboard Compatibility
      • Lodestar Dashboard Compatibility
      • Nethermind Dashboard Compatibility
      • Nimbus Dashboard Compatibility
      • Prysm Dashboard Compatibility
      • Teku Compatibility
    • Enable & Start/Restart Services
      • Checking Software Status
    • Install Dashboard
  • Additional Modifications
    • Additional Staking Groups
    • Change or Add Currency
Powered by GitBook
On this page
  • json_exporter
  • Create System Account
  • Build the json_exporter Executable
  • Install json_exporter
  • Configure Startup
  • Optional: Clean Up Installation Files
  • Notes
  1. Dashboard Installation
  2. Install Supporting Software

Install json_exporter

Install json_exporter for access to local and third-party API data

PreviousInstall node_exporterNextInstall Ethereum Metrics Exporter

Last updated 2 years ago

json_exporter

json_exporter queries endpoints providing JSON-formatted data and converts that data into the Prometheus metrics format. It is used to query consensus and execution client JSON APIs, and to query external APIs for price and software release data.

Create System Account

Create a user account under which json_exporter can run.

sudo adduser --system json_exporter --group --no-create-home

Build the json_exporter Executable

Clone the latest release.

mkdir ~/git
cd ~/git
git clone --depth 1 --branch v0.5.0 https://github.com/prometheus-community/json_exporter.git

Build json_exporter from source code.

cd json_exporter
make build

Install json_exporter

Copy the json_exporter executable to the /usr/local/bin directory.

sudo cp json_exporter /usr/local/bin/

Check to see if json_exporter was installed correctly.

/usr/local/bin/json_exporter --version --help

Create a directory for the configuration file.

sudo mkdir /etc/json_exporter

Configure Startup

Create a systemd service file to configure automatic startup of the json_exporter service.

sudo nano /etc/systemd/system/json_exporter.service

Insert the following into the json_exporter systemd service file.

[Unit]
Description=JSON Exporter

[Service]
Type=simple
Restart=always
RestartSec=5
User=json_exporter
ExecStart=/usr/local/bin/json_exporter --config.file /etc/json_exporter/json_exporter.yml

[Install]
WantedBy=multi-user.target

Save the file and exit the editor.

Optional: Clean Up Installation Files

Remove the json_exporter git repository.

cd
rm -rf ~/git/json_exporter

Notes

json_exporter will listen on port 7979. This is the port from which Prometheus will query for metrics.

We have not yet configured nor started json_exporter.

The instructions below are for version 0.5.0. , and adapt the instructions below.

Check for newer versions of json_exporter
Results of adduser command
Results of git clone command
Results of make build command
Results of json_exporter command