Exporting or Importing Prometheus Metrics

Exporting Prometheus Metrics

Existing Prometheus metrics can be exported as a .json file. This exported file contains all the details of the Job. You can also select multiple Jobs and export them in a .zip file.

Procedure 

1. Navigate to Exporters > Prometheus Metrics page.
2. Go to the Metrics tab and select a job or multiple jobs and then click the export icon () in the upper-left corner.
If you export a single Job, a .json file is downloaded.
If you Export multiple Jobs at the same time, a .zip file is downloaded.

Importing Prometheus Metrics

You can import the Prometheus Metrics which has already been exported.

When you export Prometheus metrics, the exported .json file contains all the details of the Prometheus metrics. You have to import the .json file and deploy (with or without modifications) to your Prometheus Exporter. You can also import multiple Jobs (.json files) as a .zip file.

Prerequisites

You must have the .json file that contains the exported Metrics.

Procedure 

1. Navigate to Exporters > Prometheus Metrics page.
2. In the Prometheus Metrics page, select the Metrics tab and click the import icon () in the upper-left corner.
To import a single Job, select the Job (.json) file that you want to import.
To import multiple Jobs at the same time, select the .zip file that contains all the Jobs that you want to import.
3. Click Open.

Result

The imported Job is listed on the Metrics tab.