User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

services:zabbix [2025/04/18 12:58] – created - external edit 127.0.0.1services: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 playlist and add it to that). With an additional plugin it can feed Jellyfin with all the metadata for smooth navigation. +[[https://www.zabbix.com|Zabbix]] is a comprehensive monitor tool that collects data, store it and displays nicely.
-+
-==== Installation ====+
  
-TubeArchivist is available using docker composei will show you how to install with rootless podman of course.+Zabbix comes as a server and an agent, the server store data and displays it using a PHP based web interfacewhile the agents collects data from hosts and send it to the server
  
-Add the usual dedicated user: +==== Server Installation ====
-<code bash> +
-useradd -d /data/daemons/tubearchivist -m tubearchivist -g media +
-</code>+
  
-Create the needed folders+Zabbix is available in Gentoo portage, but for installing the Zabbix server i prefer to use a podman container approach, because
-<code bash> +  * Zabbix server depends on PostgreSQL or MariaDB, and i don't want to manage either directly 
-mkdir /data/Media/YouTube +  * 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:media /data/Media/YouTube +  * Zabbix is managed by Gentoo's webroot stuff, and i don't like it
-su - tubearchivist +
-mkdir cache es redis +
-</code>+
  
-Download the composer file from [[https://github.com/tubearchivist/tubearchivist/blob/master/docker-compose.yml|here]], and edit like the following: +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: tubearchivist +
-    image: bbilly1/tubearchivist +
-    ports: +
-      - 8124:8000 +
-    volumes: +
-      - /data/Media/YouTube:/youtube +
-      - /data/daemons/tubearchivist/cache:/cache +
-    environment: +
-      - ES_URL=http://archivist-es:9200 +
-      - REDIS_CON=redis://archivist-redis:6379 +
-      - TA_HOST=https://tube.mydomain.com http://127.0.0.1:8124 +
-      # 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://login.mydomain.com/logout +
-      - ELASTIC_PASSWORD=<< create a random password >> +
-      - TZ=Europe/London +
-      Uncomment to enable extra debug:  +
-      #- DJANGO_DEBUG=True +
-    depends_on: +
-      - archivist-es +
-      - archivist-redis +
-    networks: +
-      - tubearchivist-net+
  
-  archivist-redis+The Zabbix docker repository is [[https://github.com/zabbix/zabbix-docker|here]], you need to create (as usual) a dedicated user and clone the repo
-    image: redis +<code bash> 
-    container_name: archivist-redis +useradd -d /data/daemons/zabbixserver -m zabbixserver 
-    restart: unless-stopped +su zabbixserver 
-    expose: +git clone https://github.com/zabbix/zabbix-docker.git 
-      "6379" +cd zabbix-docker 
-    volumes: +</code>
-      - /data/daemons/tubearchivist/redis:/data +
-    depends_on: +
-      archivist-es +
-    networks: +
-      - 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/tubearchivist-es +
-    container_name: archivist-es +
-    environment: +
-      - "ELASTIC_PASSWORD=<< copy same password above >>" +
-      - "ES_JAVA_OPTS=-Xms1g -Xmx1g" +
-      - "xpack.security.enabled=true" +
-      - "discovery.type=single-node" +
-      - "path.repo=/usr/share/elasticsearch/data/snapshot" +
-    ulimits: +
-      memlock: +
-        soft: -1 +
-        hard: -1 +
-    volumes: +
-      - /data/daemons/tubearchivist/es:/usr/share/elasticsearch/data +
-    expose: +
-      - "9200" +
-    networks: +
-      - tubearchivist-net+
  
-networks+I did it for you, here it is
-  tubearchivist-net: +<file docker-compose.yml>
-    dns_enabled: true+
 </file> </file>
  
-This example shows how to use Authelia SSO authentication (for more info see [[services:authelia|here]]), you will not need to setup an initial password and username. +TBD
- +
-Adding **http://127.0.0.1:8124** to TA_HOST is required to ensure that the Jellyfin plugin works.+
  
 Pull the images: Pull the images:
Line 106: Line 42:
 Follow the [[selfhost:nginx|The Reverse Proxy concept]] and the [[selfhost:sso|Authentication]] pages. Follow the [[selfhost:nginx|The Reverse Proxy concept]] and the [[selfhost:sso|Authentication]] pages.
  
-TubeArchivist requires a subdomain, so i assume you will host as **https://tube.yourdomain.com**: +TBD
-<file - tube.conf>+
  
-server { +==== Agent Installation ====
-        server_name tube.mydomain.com; +
-        listen 443 ssl; +
-        listen 8443 ssl; +
-        http2 on;+
  
-        access_log /var/log/nginx/tube.mydomain.com_access_log main; +TBD
-        error_log /var/log/nginx/tube.mydomain.com_error_log info; +
-       include "org.mydomain/authelia_location.conf";+
  
-        location ^~ / { 
-               include "com.mydomain/authelia_proxy.conf"; 
-               include "com.mydomain/authelia_authrequest.conf"; 
-                proxy_pass http://127.0.0.1:8124; 
-        } 
-        include com.mydomain/certbot.conf; 
-} 
- 
-</file> 
  
 ===== Autostart ===== ===== Autostart =====
Line 133: Line 53:
 To start it, and set it up on boot, as usual follow my indications [[gentoo:containers|Using Containers on Gentoo]], so link the **user-containers** init script: To start it, and set it up on boot, as usual follow my indications [[gentoo:containers|Using Containers on Gentoo]], so link the **user-containers** init script:
 <code> <code>
-ln -s /etc/init.d/user-containers /etc/init.d/user-containers.tubearchivist+ln -s /etc/init.d/user-containers /etc/init.d/user-containers.zabbixserver
 </code> </code>
  
 and create the following config file: and create the following config file:
-<file - /etc/conf.d/user-containers.tubearchivist+<file - /etc/conf.d/user-containers.zabbixserver
-USER=tubearchivist +USER=zabbixserver 
-DESCRIPTION="Download YouTube stuff"+DESCRIPTION="Zabbix server and frontend"
 </file> </file>
  
 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 default +rc-update add user-containers.zabbixserver default 
-rc-service user-containers.tubearchivist start+rc-service user-containers.zabbixserver start
 </code> </code>
- 
-===== Jellyfin Integration ===== 
- 
-Use [[https://github.com/tubearchivist/tubearchivist-jf-plugin|this plugin]] in JellyFin. 
- 
-In short, open JellyFin go to administration / plugins and add a new repository with the following details: 
-  * Repository name: TubeArchivistMetadata 
-  * Repository URL: https://github.com/tubearchivist/tubearchivist-jf-plugin/raw/master/manifest.json 
- 
-Now navigate to the plugins and install **TubeArchivistMetadata**, now restart Jellyfin server. 
- 
-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://127.0.0.1:8124 (you need to use the local URL to avoid the Authelia SSO filtering the plugin requests) 
-  * TubeArchivist API key: can be found inside TubeArchivist, under Settings / Application / Integration 
- 
-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. 
  
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information