Export Twitch metrics to Prometheus.
To run it:
make
./twitch_exporter [flags]
Metric | Meaning | Labels |
---|---|---|
twitch_channel_up | Is the twitch channel Online. | username, game |
twitch_channel_viewers_total | Is the total number of viewers on an online twitch channel. | username, game |
twitch_channel_views_total | Is the total number of views on a twitch channel. | username |
twitch_channel_followers_total | Is the total number of follower on a twitch channel. | username |
twitch_channel_subscribers_total | Is the total number of subscriber on a twitch channel. | username, tier, gifted |
./twitch_exporter --help
twitch.channel
: The name of a twitch channel.twitch.client-id
: The client ID to request the New Twitch API (helix).twitch.access-token
: The access token to request the New Twitch API (helix).log.format
: Set the log target and format. Example:logger:syslog?appname=bob&local=7
orlogger:stdout?json=true
log.level
: Logging level.info
by default.version
: Show application version.web.listen-address
: Address to listen on for web interface and telemetry.web.telemetry-path
: Path under which to expose metrics.
TODO
You can deploy this exporter using the damoun/twitch-exporter Docker image.
For example:
docker pull damoun/twitch-exporter
docker run -d -p 9184:9184 \
damoun/twitch-exporter \
--twitch.client-id <secret> \
--twitch.access-token <secret> \
--twitch.channel dam0un