docs-v2/content/v2.0/collect-data/scraper-metrics-endpoint.md

2.9 KiB

title weight seotitle description menu
Scrape data using the /metrics endpoint 102 Scrape data using the /metrics endpoint Use the InfluxDB UI to configure a scraper with a /metrics endpoint for collecting metrics from InfluxDB instances or third-party systems.
v2_0
name parent
Scrape data using the /metrics endpoint Collect data

An InfluxDB scraper collects data from specified targets at regular intervals and then writes the scraped data to a bucket. Scrapers can capture hardware and OS metrics from third-party systems or even from InfluxDB instances. In InfluxDB 2.0, the metrics are scraped from /metrics HTTP endpoints, in the Prometheus data format, which is supported by InfluxDB.

To quickly create a scraper in InfluxDB 2.0, you can use the InfluxDB 2.0 user interface (UI) to specify the target URL and the bucket to store the data. The scraped data is collected in the Prometheus data format and then transformed to match the InfluxDB data structure in the buckets.

Use the InfluxDB UI to configure a scraper for data collection

Follow the steps below to configure an InfluxDB scraper that uses an /metrics HTTP endpoint for collecting metrics and loading the scraped data into a bucket.

  1. Open a web browser to access the InfluxDB 2.0 user interface (localhost:9999). The Getting started with InfluxDB 2.0 screen appears.
  2. In the navigation bar on the left, click Organizations and then click the name of your organization. The Organization page appears for the selected organization.
  3. Click the Scrapers tab. A listing of any existing scrapers appears, listing the URL and the BUCKET name.
  4. Click Create Scraper. The Data Loading page appears with Add Scraper Target options to define a scraper.
  5. From the Bucket listing, select the bucket for collecting the data.
  6. Enter the Target URL to use for the Prometheus /metrics HTTP endpoint. The default URL value is http://localhost:9999/metrics.
  7. Click Finish. Your new scraper appears in the scraper listing, displaying the values you specified for the URL and the BUCKET.

The new scraper is now collecting data into the InfluxDB bucket you specified.

Next steps

Now that you have a bucket of data ready for exploration, you can: