Scrapes the Destiny API and reports metrics to be scraped with Prometheus.
Requires:
- NodeJS (tested with v14.17.0)
- Bungie developer application
- Destiny membership authorized with OAuth
- This does not strictly require it, but you probably want to run Prometheus to scrape this
- Copy
.env.sampleto.env - Fill in the
DESTINY_MEMBERSHIP_*values with your Destiny membership type and membership ID.
- Sign into Bungie.net
- Visit https://bungie.net/en/Application and Create New App
- Set OAuth Client Type to Confidential
- Set Redirect URL to
https://paracausal.science/oauth/ - Set Origin Header to
https://paracausal.science - Hit save
- Take note of the client_id, client_secret, and API Key and fill their values in
.env
- Visit https://paracausal.science/oauth/
- You have already completed steps 1-7 on this page in the previous step so just fill in the
client_idandclient_secretand click the link - You will need to authorize the login on Bungie.net, and you will be redirected back to paracausal.science/oauth/
- Copy the
oauth token(the JSON object containingaccess_token) and put it in aauth.jsonfile in the root of this repository
- Install dependencies with
yarn install - Run the exporter with
yarn start - Visit http://localhost:9991/metrics - it should display metrics in the Prometheus format
This will be up to you, but it shouldn't be too involved. Scrape interval of more than 1 minute is probably not required as the Bungie API has heavy caching and new data would not be returned any more frequently.
