Differences
This shows you the differences between two versions of the page.
services:zabbix [2025/04/18 12:58] – created - external edit 127.0.0.1 | services:zabbix [2025/04/18 13:41] (current) – willy | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Zabbix ====== | ====== Zabbix ====== | ||
- | [[https://wwwV.tubearchivist.com/|TubeArchivist]] is YouTube downloader and metadata collector. You can use it to download your favourite YouTube channels and playlists (to dowload single videos, create | + | [[https://www.zabbix.com|Zabbix]] is a comprehensive monitor tool that collects data, store it and displays nicely. |
- | d | + | |
- | ==== Installation ==== | + | |
- | TubeArchivist is available | + | Zabbix comes as a server and an agent, the server store data and displays it using a PHP based web interface, while the agents collects data from hosts and send it to the server. |
- | Add the usual dedicated user: | + | ==== Server Installation ==== |
- | <code bash> | + | |
- | useradd -d / | + | |
- | </ | + | |
- | Create | + | Zabbix is available in Gentoo portage, but for installing |
- | <code bash> | + | * Zabbix server depends on PostgreSQL or MariaDB, and i don't want to manage either directly |
- | mkdir / | + | * Zabbix web UI is based on PHP, and i don't want to share a PHP instance between two services nor manually run multiple PHP instances |
- | chown tubearchivist: | + | * Zabbix is managed by Gentoo' |
- | su - tubearchivist | + | |
- | mkdir cache es redis | + | |
- | </ | + | |
- | Download | + | Using a container is pretty easy for the server part and better suited to my approach. |
- | <file - docker-compose.yml> | + | |
- | version: '3.5' | + | |
- | services: | + | Read [[https://www.zabbix.com/documentation/current/en/manual/installation/containers#docker-compose|this]] page to understand what i will be doing here. |
- | tubearchivist: | + | |
- | container_name: | + | |
- | image: bbilly1/ | + | |
- | ports: | + | |
- | - 8124:8000 | + | |
- | volumes: | + | |
- | - / | + | |
- | - / | + | |
- | environment: | + | |
- | - ES_URL=http:// | + | |
- | - REDIS_CON=redis:// | + | |
- | - TA_HOST=https://tube.mydomain.com http://127.0.0.1: | + | |
- | # Uncommen tthe next two to NOT use SSO: | + | |
- | #- TA_USERNAME=not_needed | + | |
- | #- TA_PASSWORD=not_needed | + | |
- | # Comment the next three to use SSO: | + | |
- | - TA_ENABLE_AUTH_PROXY=true | + | |
- | - TA_AUTH_PROXY_USERNAME_HEADER=HTTP_REMOTE_USER | + | |
- | - TA_AUTH_PROXY_LOGOUT_URL=https: | + | |
- | - ELASTIC_PASSWORD=<< | + | |
- | - TZ=Europe/London | + | |
- | | + | |
- | #- DJANGO_DEBUG=True | + | |
- | depends_on: | + | |
- | - archivist-es | + | |
- | - archivist-redis | + | |
- | networks: | + | |
- | - tubearchivist-net | + | |
- | archivist-redis: | + | The Zabbix docker repository is [[https:// |
- | | + | <code bash> |
- | | + | useradd |
- | restart: unless-stopped | + | su - zabbixserver |
- | expose: | + | git clone https://github.com/zabbix/zabbix-docker.git |
- | - " | + | cd zabbix-docker |
- | | + | </ |
- | - /data/daemons/tubearchivist/redis:/data | + | |
- | | + | |
- | | + | |
- | | + | |
- | - tubearchivist-net | + | |
- | archivist-es: | + | Now you need to choose which version on base OS and database you want in the container... The Zabbix people like to make things complex, so you can choose beween many Linux flavours and both MariaDB or PostgreSQL. I choose Alpine (the smallest) and PostgreSQL. Then you need to go trough all the mess they did with compose (yes i know, it's advanced compose usage to leverage blah blah blah) and extrapolate a single, linear, working compose file. |
- | image: bbilly1/ | + | |
- | container_name: | + | |
- | environment: | + | |
- | - " | + | |
- | - " | + | |
- | - "xpack.security.enabled=true" | + | |
- | - " | + | |
- | - "path.repo=/ | + | |
- | ulimits: | + | |
- | memlock: | + | |
- | soft: -1 | + | |
- | hard: -1 | + | |
- | volumes: | + | |
- | - / | + | |
- | expose: | + | |
- | - " | + | |
- | networks: | + | |
- | - tubearchivist-net | + | |
- | networks: | + | I did it for you, here it is: |
- | | + | < |
- | dns_enabled: | + | |
</ | </ | ||
- | This example shows how to use Authelia SSO authentication (for more info see [[services: | + | TBD |
- | + | ||
- | Adding **http:// | + | |
Pull the images: | Pull the images: | ||
Line 106: | Line 42: | ||
Follow the [[selfhost: | Follow the [[selfhost: | ||
- | TubeArchivist requires a subdomain, so i assume you will host as **https:// | + | TBD |
- | <file - tube.conf> | + | |
- | server { | + | ==== Agent Installation ==== |
- | server_name tube.mydomain.com; | + | |
- | listen 443 ssl; | + | |
- | listen 8443 ssl; | + | |
- | http2 on; | + | |
- | access_log / | + | TBD |
- | error_log / | + | |
- | | + | |
- | location ^~ / { | ||
- | | ||
- | | ||
- | proxy_pass http:// | ||
- | } | ||
- | include com.mydomain/ | ||
- | } | ||
- | |||
- | </ | ||
===== Autostart ===== | ===== Autostart ===== | ||
Line 133: | Line 53: | ||
To start it, and set it up on boot, as usual follow my indications [[gentoo: | To start it, and set it up on boot, as usual follow my indications [[gentoo: | ||
< | < | ||
- | ln -s / | + | ln -s / |
</ | </ | ||
and create the following config file: | and create the following config file: | ||
- | <file - / | + | <file - / |
- | USER=tubearchivist | + | USER=zabbixserver |
- | DESCRIPTION=" | + | DESCRIPTION=" |
</ | </ | ||
Add the service to the default runlevel and start it now: | Add the service to the default runlevel and start it now: | ||
<code bash> | <code bash> | ||
- | rc-update add user-containers.tubearchivist | + | rc-update add user-containers.zabbixserver |
- | rc-service user-containers.tubearchivist | + | rc-service user-containers.zabbixserver |
</ | </ | ||
- | |||
- | ===== Jellyfin Integration ===== | ||
- | |||
- | Use [[https:// | ||
- | |||
- | In short, open JellyFin go to administration / plugins and add a new repository with the following details: | ||
- | * Repository name: TubeArchivistMetadata | ||
- | * Repository URL: https:// | ||
- | |||
- | Now navigate to the plugins and install **TubeArchivistMetadata**, | ||
- | |||
- | After Jellyfin is running again, go to the plugins page and configure the TubeArchivistMetadata plugin with the following settings: | ||
- | * Collection name: whatever you like, maybe YouTube | ||
- | * TubeArchivist URL: http:// | ||
- | * TubeArchivist API key: can be found inside TubeArchivist, | ||
- | |||
- | Now, to **use** the plugin, in Jellyfin go to settings -> libraries and add a new library of type "TV shows" and unselect all sources fo all kinds except TubeArchivist. | ||