Scraping, writing, and querying data with InfluxDB
fastai
Scraping, writing, and querying data with InfluxDB
Scraping data
InfluxDB can scrape data - Can collect data in specified intervals - Saves data into a InfluxDB bucket - It collects data from endpoints that accept HTTP(S) and that provide data in the [prometheus data format][https://prometheus.io/docs/instrumenting/exposition_formats/].
Steps to scrape data
Here we will use a the sample metrics data what influxDB generates and can be accessed at http://localhost:8086/metrics
- Find the navigation menu and select Data
- There select the Scrapers tab
- Click on the Select Scraper button
- In the popup window, enter a name and select a bucket.
- For the Target URL add
http://localhost:8086/metrics(or the url from where you would like to scrape your data) - Click Create
Querying data
You can mainly query data in the following ways
- Flux, InfluxData’s functional scripting language
- The InfluxDB user interface
- The
influxcommand line interface - Directly through the InfluxDB API (
/api/v2/query) - Using one of the InfluxDB clients