pixiv-exporter
Pixiv works metrics exporter for Prometheus. Scrapes view counts, bookmarks, comments, and other metadata for configured users and works, and exposes them as Prometheus gauges. Currently only illustrations are supported.
Installation
From cargo
From docker
Usage
Start the exporter server
Serve metrics with a config file (e.g. config.json):
Metrics are exposed on the configured bind address and port (default 127.0.0.1:6825). Set the PIXIV_REFRESH_TOKEN environment variable (or configure it in the config file) for Pixiv API authentication. To obtain a refresh token, see gppt. Note that headless login is not likely to work currently, and you should use a browser to login and get the refresh token.
Config subcommands
-
Print JSON schema for the config file:
-
Print default config:
-
Validate a config file:
Configuration example
target.users/target.works: user IDs and illustration IDs to scrape.refresh_token: Pixiv refresh token; use{ "env": "VAR_NAME" }to read from an environment variable, or"REFRESH_TOKEN"directly.server.bind/server.port: address and port for the HTTP metrics server.scrape.*: intervals for scraping cycles and per-item delays (seconds; variance is optional).
Run pixiv-exporter config schema for the full JSON schema.
License
MIT. See LICENSE for details.