Critical CDVR Log Alerts via E-Mail

Thank you for continuing to add features to this. I set this up very early after you first released it, and now went to update it, following these instructions, and I got hit with a whole host of errors about variables not being set. I presume these are variables that are now required, that we're required before (HOST_DIR, etc.). Can I just use the sample variables you have in your post, or do I need to tinker and figure out my situation? Docker is a bit of a mystery to me, so that might take some doing.

UPDATE: The answer is no (and probably should have been obvious to me), you can't use the sample variables. I'm not sure how to even find out several of them (any of them having to do with Docker, really), so I reverted to my old settings. Sorry for my cluelessness.

Give me some specific examples of which variables you're unsure of what the values should be and I'll see if I can clarify.

Also, maybe post your current set of values, and I'll confirm if those look correct. Newer versions of the env vars might have an item or two that needs to be redacted, but yours is probably good to post as-is.

Thank you. I probably have a hodgepodge of variables that are used with my old setup, and unused after I entered a few and then reverted, but here's what I have:

CHANNELS_DVR=192.168.7.180:8089
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Eastern
CHANNELS_CLIENTS=192.168.7.252 192.168.7.166 192.168.7.225 192.168.7.226 192.168.7.164 192.168.7.183 
HOST_DIR=/data
HOST_SFS_PORT=8080
FOLDER=/web
TAG=latest
DOMAIN=tailaaxxxx.ts.net
CHANNELS_DVR_HOST=http://192.168.7.180
CHANNELS_DVR_PORT=8089
HOST_PORT=1337

I think these are the ones I'm uncertain about:

HOST_DIR=/data
DVR_SHARE=/mnt/dvr
LOGS_SHARE=/mnt/channelsdvr
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PORTAINER_HOST=htpc6

I presume I can figure out how to get the PORTAINER_TOKEN following the instructions.

I obfuscated my Tailscale domain above, but in my settings it is correct and copied from my Tailscale account.

Thank you.

Remind of your setup please. Where is CDVR running? Where are Docker and Portainer running? Is it all on one computer? What OS's are running?

I have it all (Channels, Docker, Portainer) running on an M1 Mac Mini. It's running Sonoma 14.2.1.

Here's what I'd suggest:

TAG=latest
DOMAIN=tailxxxxx.ts.net
HOST_PORT=1337
CHANNELS_DVR_HOST=192.168.7.180
CHANNELS_DVR_PORT=8089
CHANNELS_CLIENTS=192.168.7.252 192.168.7.166 192.168.7.225 192.168.7.226 192.168.7.164 192.168.7.183 
ALERT_SMTP_SERVER=
ALERT_EMAIL_FROM=
ALERT_EMAIL_PASS=
ALERT_EMAIL_TO=
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Eastern
HOST_DIR=
DVR_SHARE=
LOGS_SHARE=
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=
PORTAINER_HOST=192.168.7.180

On Docker Desktop for Mac the directories you can access from Docker are defined here:

You can add additional directories if needed. But you need to determine where you want to store your OliveTin data, and often /Users/<your_username> is a good option -- then use that for HOST_DIR.

Next figure out the absolute path for the folder that contains your CDVR folders. Mine are here:

That path is what you want to use for DVR_SHARE. If the top level of that path is not on your list of shared resources in Docker Desktop (as shown above) you'll need to add it.

Same for determining LOGS_SHARE. It's the path to the folder that has sub-folders like this:

The e-mail stuff needs to be GMail or Yahoo Mail, both of which support "app passwords", which is similar to a token. You can create more than one, and revoke it if you're ever concerned that it's been compromised. Use the Gmail smtp server info above, or Google what it is if you use Yahoo Mail.

All of the variables above should have values for OliveTin to have full functionality. Let me know if I can help with further clarifications.

I could not use Gmail kept getting unauthorize ... there is something I think I have to do on my email Account but not sure what it is ... I am using my comcast email.

I with don't think you can use Gmail directly -- it needs to be with an "app password", as described here:

Geez that was easy the google help sent me on a wild goose chase.

Thanks so much for walking through this. I really appreciate it. I'm having trouble locating any folders that look like your example for LOGS_SHARE. Also, I presume certain things are OK to comment out in the docker-compose, such as the CHANNELS_DVR_ALTERNATES, where I only run one Channels DVR.

For things you don't need, just make the Environment value look like this
CHANNELS_DVR_ALTERNATES=

LOGS_SHARE should point to the directory where the Channels DVR executables are installed.
You'll see this in the DVR log when Channels DVR starts

2024/04/04 15:48:57.005970 [SYS] Starting Channels DVR v2024.04.04.1838 (linux-x86_64 pid:13521) in /var/packages/ChannelsDVR/target/channels-dvr/data

In my case it's /var/packages/ChannelsDVR/target/channels-dvr

Thank you! My logs don't show a restart, but I tried your path, and that seems to have worked. I'm going in now and playing around with things. (OliveTin seems to be working, as I was able to use it just now to restart the server)

It's correct if you're running Channels DVR on a Synology using the Synology package.

You can view the logs going back further by specifying the number of lines you want to view
http://x.x.x.x:8089/log?n=10000
where x.x.x.x is the IP address of your Channels DVR Server and n=10000 is the number of lines to display

Try:

/Users/<your_username>/Library/Application Support/ChannelsDVR

It's OK, but unnecessary, just don't define that value in the env vars section.

What is this error ? ... Google email works but I see this error ... In container Log.

level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""

Not actually an error, just an info message. These can be ignored.

Run the OliveTin Post-Install Healthcheck Action and post the results here, and we'll see where you're at. Sensitive info is automatically redacted.

Here it is (I didn't run the extended check, because it told me to run a sudo command from the directory I have bound to /config, but I don't know what that directory would be):

Checking your OliveTin installation...
(extended_check=false)

----------------------------------------

Checking that your selected Channels DVR server (192.168.7.180:8089) is reachable by URL:
HTTP Status: 200 indicates success...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1276  100  1276    0     0   623k      0 --:--:-- --:--:-- --:--:-- 1246k
HTTP Status: 200
Effective URL: http://192.168.7.180:8089/

----------------------------------------

Checking that your selected Channels DVR server's data files (/mnt/192.168.7.180-8089) are accessible:
Folders with the names Database, Images, Imports, Logs, Movies, Streaming and TV should be visible...

total 20
drwxr-xr-x   11 root root   352 Feb 19 09:42 .
drwxr-xr-x    1 root root  4096 Apr 10 18:13 ..
-rw-r--r--    1 root root 14340 Apr 10 17:52 .DS_Store
drwxr-xr-x   33 root root  1056 Apr 10 18:12 Database
drwxr-xr-x 1455 root root 46560 Apr 10 00:59 Images
drwxr-xr-x    6 root root   192 Apr 29  2023 Imports
drwxr-xr-x    5 root root   160 Apr 29  2023 Logs
drwxr-xr-x   69 root root  2208 Mar 12 22:12 Movies
drwxr-xr-x    5 root root   160 Apr 29  2023 PlayOn
drwxr-xr-x   16 root root   512 Apr 10 08:44 Streaming
drwxr-xr-x   17 root root   544 Apr  5 17:11 TV

----------------------------------------

Checking that your selected Channels DVR server's log files (/mnt/192.168.7.180-8089_logs) are accessible:
Folders with the names data and latest should be visible...

total 111996
drwxr-xr-x 42 root root     1344 Apr 10 18:12 .
drwxr-xr-x  1 root root     4096 Apr 10 18:13 ..
drwx------  5 root root      160 Jul  9  2023 USA-PA37649-X.airings
drwx------  5 root root      160 Jul  9  2023 USA-PA37649-X.groups
drwx------  5 root root      160 Jul  3  2023 X-M3U.airings
drwx------  5 root root      160 Jul  3  2023 X-M3U.groups
drwx------  5 root root      160 Jul  3  2023 X-STRMLNK.airings
drwx------  5 root root      160 Jul  3  2023 X-STRMLNK.groups
drwx------  5 root root      160 Jul  3  2023 X-TVE.airings
drwx------  5 root root      160 Jul  3  2023 X-TVE.groups
drwx------  5 root root      160 Jul  3  2023 X-VIRTUAL.airings
drwx------  5 root root      160 Jul  3  2023 X-VIRTUAL.groups
drwx------  5 root root      160 Jul  3  2023 XMLTV-PlutoTV.airings
drwx------  5 root root      160 Jul  3  2023 XMLTV-PlutoTV.groups
-rw-------  1 root root 12807581 Apr 10 16:25 XMLTV-PlutoTV.xml
drwx------  5 root root      160 Oct  8  2023 XMLTV-TWiT.airings
drwx------  5 root root      160 Oct  8  2023 XMLTV-TWiT.groups
-rw-------  1 root root    11989 Apr 10 09:51 XMLTV-TWiT.xml
drwxr-xr-x  3 root root       96 Jul  3  2023 cache
-rw-r--r--  1 root root     1094 Jul  3  2023 cert.pem
-rw-r--r--  1 root root  2097055 Apr  7 15:49 channels-dvr-http-2024-04-07T15-49-24.667.log
-rw-r--r--  1 root root   774280 Apr 10 18:39 channels-dvr-http.log
-rw-r--r--  1 root root 35708459 Apr 10 18:13 channels-dvr.log
-rw-r--r--  1 root root  2096143 Apr  6 09:35 channels-http-cache-2024-04-06T09-36-00.472.log
-rw-r--r--  1 root root  1276346 Apr 10 18:12 channels-http-cache-trace.log
-rw-r--r--  1 root root  1514225 Apr 10 18:12 channels-http-cache.log
drwxr-xr-x  7 root root      224 Apr 10 18:12 channels-tailscale
-rw-r--r--  1 root root  1048497 Apr  9 15:04 channels-tailscale-2024-04-09T15-04-41.292.log
-rw-r--r--  1 root root   304273 Apr 10 18:38 channels-tailscale.log
drwxr-xr-x  3 root root       96 Nov 12 08:14 chromedata
-rw-r--r--  1 root root       21 Apr  9 21:57 chromedp-version
-rw-r--r--  1 root root 10485756 Apr  5 17:54 hls-2024-04-05T17-54-32.374.log
-rw-r--r--  1 root root 10484333 Apr  9 21:58 hls-2024-04-09T21-58-13.472.log
-rw-r--r--  1 root root  1381508 Apr 10 08:44 hls.log
-rw-------  1 root root     1679 Jul  3  2023 key.pem
-rw-r--r--  1 root root 28360704 Apr 10 18:37 recorder.db
drwx------ 11 root root      352 Feb  2 13:16 recorder.idx
-rw-------  1 root root  1048576 Apr 10 18:12 settings.db
-rw-r--r--  1 root root   131072 Jul  3  2023 settings.db.old
-rw-r--r--  1 root root   856722 Apr  9 21:57 tve_chrome.log
-rw-r--r--  1 root root   887227 Jan 13 17:49 tve_error_screenshot.html
-rw-r--r--  1 root root   274630 Jan 13 17:49 tve_error_screenshot.png

----------------------------------------

Here's a list of your current OliveTin-related settings:

HOSTNAME=olivetin
CHANNELS_DVR=192.168.7.180:8089
CHANNELS_DVR_ALTERNATES=
CHANNELS_CLIENTS=192.168.7.252 192.168.7.166 192.168.7.225 192.168.7.226 192.168.7.164 192.168.7.183
ALERT_SMTP_SERVER=smtp.gmail.com:587
ALERT_EMAIL_FROM=[Redacted]@gmail.com
ALERT_EMAIL_PASS=[Redacted]
ALERT_EMAIL_TO=[Redacted]@gmail.com
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
PORTAINER_TOKEN=[Redacted]
PORTAINER_HOST=192.168.7.180

----------------------------------------

Here's the contents of /etc/resolv.conf from inside the container:

# Generated by Docker Engine.
# This file can be edited; Docker Engine will not make further changes once it
# has been modified.

nameserver 127.0.0.11
search tail[Redacted].ts.net
options ndots:0

# Based on host file: '/etc/resolv.conf' (internal resolver)
# ExtServers: [192.168.65.7]
# Overrides: [search]
# Option ndots from: internal

----------------------------------------

Here's the contents of /etc/hosts from inside the container:

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.20.0.2	olivetin

Oh, and after using OliveTin to restart Channels, my variable for LOGS_SHARE is /Users/myname/Library/Application Support/ChannelsDVR/data

Should I be taking the "data" off the end?

Yes.

No problem, basic check is fine at this point. Everything other than removing "data" from your LOGS_SHARE path looks good. Congrats you're OliveTinning!

1 Like