Giter Club home page Giter Club logo

arr-sizeondisk-exporter's Introduction

GitHub Tag GitHub top language

Arr SizeOnDisk exporter

Small and lightweight tool to export the size on disk of Radarr and Sonarr libraries.

Usage

Environment variables:

  • RADARR_APIKEY: The API key of the Radarr instance.
  • RADARR_HOST: The URL of the Radarr instance.
  • SONARR_APIKEY: The API key of the Sonarr instance.
  • SONARR_HOST: The URL of the Sonarr instance.

CLI

RADARR_APIKEY=apikey
RADARR_HOST=https://radarr...
SONARR_APIKEY=apikey
SONARR_HOST=https://sonarr...

$ go run cmd/cli/main.go
2024/07/14 11:33:42 Starting server on :9101

Docker

$ docker run -e RADARR_APIKEY=apikey \
                -e RADARR_HOST=https://radarr... \
                -e SONARR_APIKEY=apikey \
                -e SONARR_HOST=https://sonarr... \
                -p 9101:9101 \
                ghcr.io/alemuro/arr-sizeondisk-exporter:latest

2024/07/14 11:33:42 Starting server on :9101

Kubernetes

module "exporter" {
  source  = "alemuro/expose-service-ingress/kubernetes"
  version = "1.23.0"

  namespace = "default"

  name           = "sizeondisk-exporter"
  image          = "ghcr.io/alemuro/arr-sizeondisk-exporter:latest"
  container_port = "9101"
  environment_variables = {
    RADARR_HOST   = "http://radarr"
    RADARR_APIKEY = var.radarr_api_key
    SONARR_HOST   = "http://sonarr"
    SONARR_APIKEY = var.sonarr_api_key
  }
  annotations = {
    service = {
      "k8s.grafana.com/scrape"                 = "true"
      "k8s.grafana.com/metrics.portName"       = "http"
      "k8s.grafana.com/metrics.scheme"         = "http"
      "k8s.grafana.com/metrics.path"           = "/metrics"
      "k8s.grafana.com/metrics.scrapeInterval" = "5m"
    }
  }
}

Metrics

The service exposes a metric called size_on_disk which returns the size in bytes of a movie/series season with the following labels:

  • Category: radarr or sonarr.
  • Collection: The name of the movie/series collection where the movie or season belongs to.
  • Title: The title of the movie or series season.

arr-sizeondisk-exporter's People

Contributors

alemuro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.