Install json_exporter

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

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
Results of adduser command

Build the json_exporter Executable

The instructions below are for version 0.5.0. Check for newer versions of json_exporter, and adapt the instructions below.

Clone the latest release.

Results of git clone command

Build json_exporter from source code.

Results of make build command

Install json_exporter

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

Check to see if json_exporter was installed correctly.

Results of json_exporter command

Create a directory for the configuration file.

Configure Startup

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

Insert the following into the json_exporter systemd service file.

Save the file and exit the editor.

Optional: Clean Up Installation Files

Remove the json_exporter git repository.

Notes

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

Last updated