Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
services:zabbix [2025/04/18 12:58] – created - external edit 127.0.0.1 | services:zabbix [2025/05/06 05:56] (current) – [Zabbix] willy | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Zabbix ====== | ====== Zabbix ====== | ||
- | [[https:// | + | **Note:** i currently gave up on Zabbix because it's dpeloyment |
- | d | + | |
- | ==== Installation ==== | + | |
- | TubeArchivist is available using docker compose, i will show you how to install with rootless podman of course. | ||
- | Add the usual dedicated user: | + | [[https:// |
- | <code bash> | + | |
- | useradd -d /data/ | + | |
- | </ | + | |
- | Create | + | Zabbix comes as a server and an agent, |
- | <code bash> | + | |
- | mkdir /data/ | + | |
- | chown tubearchivist: | + | |
- | su - tubearchivist | + | |
- | mkdir cache es redis | + | |
- | </ | + | |
- | Download the composer file from [[https:// | + | ==== Server Installation ==== |
- | <file - docker-compose.yml> | + | |
- | version: ' | + | |
- | services: | + | Zabbix is available in Gentoo portage, but for installing the Zabbix server i prefer to use a podman container approach, because: |
- | | + | |
- | container_name: | + | * 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 |
- | image: bbilly1/ | + | * Zabbix is managed by Gentoo' |
- | ports: | + | |
- | - 8124:8000 | + | |
- | volumes: | + | |
- | - / | + | |
- | - / | + | |
- | environment: | + | |
- | - ES_URL=http:// | + | |
- | - REDIS_CON=redis:// | + | |
- | - TA_HOST=https:// | + | |
- | # 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/ | + | |
- | # Uncomment to enable extra debug: | + | |
- | #- DJANGO_DEBUG=True | + | |
- | depends_on: | + | |
- | - archivist-es | + | |
- | - archivist-redis | + | |
- | networks: | + | |
- | - tubearchivist-net | + | |
- | archivist-redis: | + | Using a container is pretty easy for the server part and better suited to my approach. |
- | image: redis | + | |
- | container_name: | + | |
- | restart: unless-stopped | + | |
- | expose: | + | |
- | - " | + | |
- | volumes: | + | |
- | - / | + | |
- | depends_on: | + | |
- | - archivist-es | + | |
- | networks: | + | |
- | - tubearchivist-net | + | |
- | archivist-es: | + | Read [[https://www.zabbix.com/documentation/current/en/manual/installation/containers# |
- | image: bbilly1/tubearchivist-es | + | |
- | container_name: | + | |
- | environment: | + | |
- | - " | + | |
- | - " | + | |
- | - "xpack.security.enabled=true" | + | |
- | - " | + | |
- | - " | + | |
- | ulimits: | + | |
- | memlock: | + | |
- | soft: -1 | + | |
- | hard: -1 | + | |
- | volumes: | + | |
- | - /data/ | + | |
- | expose: | + | |
- | | + | |
- | networks: | + | |
- | - tubearchivist-net | + | |
- | networks: | + | The Zabbix docker repository is [[https:// |
- | | + | <code bash> |
- | | + | useradd |
+ | su - zabbixserver | ||
+ | git clone https:// | ||
+ | cd zabbix-docker | ||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | I did it for you, here it is: | ||
+ | <file - docker-compose.yml> | ||
</ | </ | ||
- | 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 45: | ||
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 56: | ||
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. | ||