OliveTin for Channels: An Interface for Misc Channels DVR Scripts & Tricks

Thanks, got it.

BTW, I had similar problems with email from the Channel Lineup Change Notifications script. I stopped working on that problem until the simpler log alerter problem is fixed. But I note that the two scripts use different email approaches. Do you think the two have a common cause?

I have no problem with Channel Lineup Changes no alerts is a good thing after the initial alert.

During my early testing I forced channel changes by deleting/adding new sources but didn't see all of the email alerts I expected. But we'll deal with that after the log alerts problem is understood and fixed.

@skipt Could you please re-pull and redeploy bnhf/olivetin:latest. I've implemented a variation on the logalerter.sh fix that's working for me using a Windows Docker host.

Will do. Can you suggest a way to export and later import my environment to the new pull?

Nothing really to do there. The primary thing that's unique to you are your Portainer environment variables -- those will stay the same. Anything you have running using the pseudo-cron (showing a green Channels icon) of OliveTin will be restarted with the new container.

Stop the OliveTin stack, make any changes you've been meaning to make :slight_smile: to the env vars, and then click "Update the stack" followed by using the "Re-pull and redeploy" slider. That's all there is to it.

Great, thanks. I'll also printenv before and after as a way of looking for deltas to be fixed.

Latest release I only got 1 alert same as before nothing after. I am going to see how my UBUNTU server does ....

My Ubuntu Server works as designed ... ...

The following CDVR (192.168.50.93:8089) log lines match your filters:

2024/08/09 10:01:13.145073 [DVR]   indexed 461 airings (50 channels) [1s fetch, 507ms index]
2024/08/09 10:01:13.587291 [DVR]   indexed 9 movies (5 channels) [386ms fetch, 55ms index]
2024/08/09 18:37:19.308356 [DVR] Indexed 3 channels (42 airings + 0 replaced) with placeholders [143ms index]
2024/08/09 18:37:19.320422 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-09 6:30PM
2024/08/09 18:37:22.799188 [DVR]   indexed 1280 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:23.501220 [DVR]   indexed 89 movies (29 channels) [528ms fetch, 173ms index]
2024/08/09 18:37:23.518245 [DVR]   pruned 36 replaced airings in 16ms.
2024/08/09 18:37:23.529202 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-10 12:30AM
2024/08/09 18:37:26.660635 [DVR]   indexed 1368 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:27.349991 [DVR]   indexed 65 movies (19 channels) [519ms fetch, 169ms index]
2024/08/09 18:37:27.370797 [DVR]   pruned 4 replaced airings in 20ms.
2024/08/09 18:37:27.393678 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-10 6:30AM
2024/08/09 18:37:30.777660 [DVR]   indexed 1309 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:31.512836 [DVR]   indexed 85 movies (28 channels) [577ms fetch, 156ms index]
2024/08/09 18:37:31.528558 [DVR]   pruned 7 replaced airings in 15ms.
2024/08/09 18:37:31.538383 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-10 12:30PM
2024/08/09 18:37:34.636115 [DVR]   indexed 1221 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:35.489527 [DVR]   indexed 106 movies (34 channels) [593ms fetch, 260ms index]
2024/08/09 18:37:35.503678 [DVR]   pruned 7 replaced airings in 14ms.
2024/08/09 18:37:35.527560 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-10 6:30PM
2024/08/09 18:37:38.848346 [DVR]   indexed 1278 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:39.455467 [DVR]   indexed 93 movies (30 channels) [455ms fetch, 151ms index]
2024/08/09 18:37:39.472614 [DVR]   pruned 6 replaced airings in 16ms.
2024/08/09 18:37:39.484832 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-11 12:30AM
2024/08/09 18:37:42.747965 [DVR]   indexed 1361 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:43.403126 [DVR]   indexed 72 movies (23 channels) [518ms fetch, 136ms index]
2024/08/09 18:37:43.418484 [DVR]   pruned 1 replaced airings in 15ms.
2024/08/09 18:37:43.429334 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-11 6:30AM
2024/08/09 18:37:46.720616 [DVR]   indexed 1278 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:47.314401 [DVR]   indexed 86 movies (28 channels) [462ms fetch, 131ms index]
2024/08/09 18:37:47.328950 [DVR]   pruned 1 replaced airings in 14ms.
2024/08/09 18:37:47.343766 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-11 12:30PM
2024/08/09 18:37:50.754068 [DVR]   indexed 1251 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:51.493078 [DVR]   indexed 91 movies (27 channels) [598ms fetch, 139ms index]
2024/08/09 18:37:51.511364 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-11 6:30PM
2024/08/09 18:37:54.895960 [DVR]   indexed 1263 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:55.588780 [DVR]   indexed 91 movies (25 channels) [491ms fetch, 201ms index]
2024/08/09 18:37:55.613618 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-12 12:30AM
2024/08/09 18:37:58.755707 [DVR]   indexed 1344 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:37:59.475440 [DVR]   indexed 72 movies (23 channels) [583ms fetch, 136ms index]
2024/08/09 18:37:59.491625 [DVR]   pruned 2 replaced airings in 16ms.
2024/08/09 18:37:59.504093 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-12 6:30AM
2024/08/09 18:38:02.810502 [DVR]   indexed 1347 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:03.370415 [DVR]   indexed 62 movies (20 channels) [454ms fetch, 104ms index]
2024/08/09 18:38:03.391363 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-12 12:30PM
2024/08/09 18:38:06.689897 [DVR]   indexed 1279 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:07.436110 [DVR]   indexed 77 movies (24 channels) [596ms fetch, 148ms index]
2024/08/09 18:38:07.458967 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-12 6:30PM
2024/08/09 18:38:10.583071 [DVR]   indexed 1311 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:11.207964 [DVR]   indexed 72 movies (24 channels) [502ms fetch, 121ms index]
2024/08/09 18:38:11.231282 [DVR]   pruned 2 replaced airings in 23ms.
2024/08/09 18:38:11.245891 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-13 12:30AM
2024/08/09 18:38:14.906073 [DVR]   indexed 1366 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:15.651752 [DVR]   indexed 58 movies (17 channels) [644ms fetch, 101ms index]
2024/08/09 18:38:15.676916 [DVR]   pruned 19 replaced airings in 24ms.
2024/08/09 18:38:15.691466 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-13 6:30AM
2024/08/09 18:38:18.981243 [DVR]   indexed 1335 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:19.837996 [DVR]   indexed 58 movies (16 channels) [748ms fetch, 108ms index]
2024/08/09 18:38:19.869715 [DVR]   pruned 31 replaced airings in 31ms.
2024/08/09 18:38:19.884740 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-13 12:30PM
2024/08/09 18:38:23.277912 [DVR]   indexed 1319 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:23.927679 [DVR]   indexed 70 movies (21 channels) [519ms fetch, 129ms index]
2024/08/09 18:38:23.952529 [DVR]   pruned 34 replaced airings in 24ms.
2024/08/09 18:38:23.968245 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-13 6:30PM
2024/08/09 18:38:27.315609 [DVR]   indexed 1345 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:27.989632 [DVR]   indexed 71 movies (24 channels) [548ms fetch, 125ms index]
2024/08/09 18:38:28.009819 [DVR]   pruned 32 replaced airings in 19ms.
2024/08/09 18:38:28.021896 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-14 12:30AM

The following CDVR (192.168.50.93:8089) log lines match your filters:

2024/08/09 18:38:32.280290 [DVR]   indexed 54 movies (16 channels) [408ms fetch, 138ms index]
2024/08/09 18:38:32.298769 [DVR]   pruned 27 replaced airings in 17ms.
2024/08/09 18:38:32.313234 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-14 6:30AM
2024/08/09 18:38:35.887263 [DVR]   indexed 1328 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:36.584113 [DVR]   indexed 59 movies (16 channels) [587ms fetch, 109ms index]
2024/08/09 18:38:36.601522 [DVR]   pruned 30 replaced airings in 17ms.
2024/08/09 18:38:36.613276 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-14 12:30PM
2024/08/09 18:38:40.000249 [DVR]   indexed 1320 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:41.096658 [DVR]   indexed 72 movies (22 channels) [890ms fetch, 205ms index]
2024/08/09 18:38:41.127757 [DVR]   pruned 28 replaced airings in 30ms.
2024/08/09 18:38:41.152181 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-14 6:30PM
2024/08/09 18:38:44.559756 [DVR]   indexed 1306 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:45.828493 [DVR]   indexed 71 movies (22 channels) [1s fetch, 114ms index]
2024/08/09 18:38:45.848342 [DVR]   pruned 76 replaced airings in 19ms.
2024/08/09 18:38:45.879082 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-15 12:30AM
2024/08/09 18:38:49.118407 [DVR]   indexed 1346 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:49.696590 [DVR]   indexed 58 movies (15 channels) [408ms fetch, 169ms index]
2024/08/09 18:38:49.734515 [DVR]   pruned 98 replaced airings in 36ms.
2024/08/09 18:38:49.757818 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-15 6:30AM
2024/08/09 18:38:53.626178 [DVR]   indexed 1302 airings (167 channels) [2s fetch, 1s index]
2024/08/09 18:38:54.273801 [DVR]   indexed 56 movies (17 channels) [551ms fetch, 95ms index]
2024/08/09 18:38:54.293597 [DVR]   pruned 89 replaced airings in 19ms.
2024/08/09 18:38:54.304763 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-15 12:30PM
2024/08/09 18:38:57.542802 [DVR]   indexed 1287 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:38:58.288419 [DVR]   indexed 74 movies (23 channels) [566ms fetch, 179ms index]
2024/08/09 18:38:58.314711 [DVR]   pruned 92 replaced airings in 25ms.
2024/08/09 18:38:58.328646 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-15 6:30PM
2024/08/09 18:39:02.314246 [DVR]   indexed 1277 airings (167 channels) [2s fetch, 1s index]
2024/08/09 18:39:04.013841 [DVR]   indexed 72 movies (25 channels) [1s fetch, 152ms index]
2024/08/09 18:39:04.035301 [DVR]   pruned 102 replaced airings in 21ms.
2024/08/09 18:39:04.049248 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-16 12:30AM
2024/08/09 18:39:07.153237 [DVR]   indexed 1365 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:07.818214 [DVR]   indexed 58 movies (17 channels) [528ms fetch, 136ms index]
2024/08/09 18:39:07.847387 [DVR]   pruned 85 replaced airings in 28ms.
2024/08/09 18:39:07.873338 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-16 6:30AM
2024/08/09 18:39:11.469714 [DVR]   indexed 1298 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:12.095443 [DVR]   indexed 51 movies (18 channels) [529ms fetch, 96ms index]
2024/08/09 18:39:12.116005 [DVR]   pruned 69 replaced airings in 20ms.
2024/08/09 18:39:12.129834 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-16 12:30PM
2024/08/09 18:39:15.063934 [DVR]   indexed 1247 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:15.838703 [DVR]   indexed 74 movies (27 channels) [604ms fetch, 170ms index]
2024/08/09 18:39:15.863851 [DVR]   pruned 67 replaced airings in 24ms.
2024/08/09 18:39:15.878768 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-16 6:30PM
2024/08/09 18:39:18.955590 [DVR]   indexed 1284 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:19.809923 [DVR]   indexed 78 movies (28 channels) [686ms fetch, 166ms index]
2024/08/09 18:39:19.828474 [DVR]   pruned 32 replaced airings in 17ms.
2024/08/09 18:39:19.854201 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-17 12:30AM
2024/08/09 18:39:23.162480 [DVR]   indexed 1387 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:23.837025 [DVR]   indexed 56 movies (17 channels) [566ms fetch, 108ms index]
2024/08/09 18:39:23.854718 [DVR]   pruned 12 replaced airings in 17ms.
2024/08/09 18:39:23.866155 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-17 6:30AM
2024/08/09 18:39:27.309542 [DVR]   indexed 1300 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:28.390046 [DVR]   indexed 67 movies (23 channels) [901ms fetch, 178ms index]
2024/08/09 18:39:28.417154 [DVR]   pruned 8 replaced airings in 26ms.
2024/08/09 18:39:28.443744 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-17 12:30PM
2024/08/09 18:39:31.894938 [DVR]   indexed 1225 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:32.805013 [DVR]   indexed 92 movies (29 channels) [757ms fetch, 152ms index]
2024/08/09 18:39:32.822705 [DVR]   pruned 12 replaced airings in 17ms.
2024/08/09 18:39:32.834717 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-17 6:30PM
2024/08/09 18:39:36.080284 [DVR]   indexed 1258 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:36.785432 [DVR]   indexed 83 movies (26 channels) [562ms fetch, 142ms index]
2024/08/09 18:39:36.806263 [DVR]   pruned 2 replaced airings in 20ms.
2024/08/09 18:39:36.819788 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-18 12:30AM
2024/08/09 18:39:47.221289 [DVR]   indexed 1344 airings (167 channels) [8s fetch, 1s index]
2024/08/09 18:39:48.063057 [DVR]   indexed 57 movies (19 channels) [739ms fetch, 102ms index]
2024/08/09 18:39:48.081011 [DVR]   pruned 16 replaced airings in 17ms.
2024/08/09 18:39:48.091800 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-18 6:30AM
2024/08/09 18:39:51.165270 [DVR]   indexed 1235 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:52.309003 [DVR]   indexed 77 movies (24 channels) [943ms fetch, 200ms index]
2024/08/09 18:39:52.337959 [DVR]   pruned 17 replaced airings in 28ms.
2024/08/09 18:39:52.357737 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-18 12:30PM
2024/08/09 18:39:55.440574 [DVR]   indexed 1248 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:39:56.178794 [DVR]   indexed 79 movies (24 channels) [592ms fetch, 145ms index]
2024/08/09 18:39:56.198193 [DVR]   pruned 19 replaced airings in 18ms.
2024/08/09 18:39:56.209869 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-18 6:30PM
2024/08/09 18:39:59.309748 [DVR]   indexed 1258 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:00.037696 [DVR]   indexed 80 movies (26 channels) [536ms fetch, 191ms index]
2024/08/09 18:40:00.061053 [DVR]   pruned 12 replaced airings in 23ms.
2024/08/09 18:40:00.086653 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-19 12:30AM
2024/08/09 18:40:03.525388 [DVR]   indexed 1347 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:04.324710 [DVR]   indexed 63 movies (21 channels) [636ms fetch, 162ms index]
2024/08/09 18:40:04.344380 [DVR]   pruned 12 replaced airings in 19ms.
2024/08/09 18:40:04.363017 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-19 6:30AM
2024/08/09 18:40:07.340283 [DVR]   indexed 1235 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:08.129168 [DVR]   indexed 55 movies (17 channels) [609ms fetch, 178ms index]
2024/08/09 18:40:08.166288 [DVR]   pruned 16 replaced airings in 36ms.
2024/08/09 18:40:08.193237 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-19 12:30PM
2024/08/09 18:40:11.562946 [DVR]   indexed 1186 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:12.691304 [DVR]   indexed 66 movies (21 channels) [925ms fetch, 202ms index]
2024/08/09 18:40:12.716603 [DVR]   pruned 12 replaced airings in 25ms.
2024/08/09 18:40:12.734376 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-19 6:30PM
2024/08/09 18:40:15.646743 [DVR]   indexed 1231 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:16.671956 [DVR]   indexed 60 movies (20 channels) [827ms fetch, 197ms index]
2024/08/09 18:40:16.690170 [DVR]   pruned 6 replaced airings in 17ms.
2024/08/09 18:40:16.704941 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-20 12:30AM
2024/08/09 18:40:19.947764 [DVR]   indexed 1314 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:20.502183 [DVR]   indexed 47 movies (14 channels) [459ms fetch, 94ms index]
2024/08/09 18:40:20.520275 [DVR]   pruned 2 replaced airings in 17ms.
2024/08/09 18:40:20.532249 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-20 6:30AM
2024/08/09 18:40:23.612607 [DVR]   indexed 1266 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:24.188375 [DVR]   indexed 50 movies (15 channels) [490ms fetch, 85ms index]
2024/08/09 18:40:24.207410 [DVR]   pruned 3 replaced airings in 18ms.
2024/08/09 18:40:24.218665 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-20 12:30PM
2024/08/09 18:40:27.639425 [DVR]   indexed 1228 airings (167 channels) [1s fetch, 1s index]
2024/08/09 18:40:28.352261 [DVR]   indexed 59 movies (19 channels) [535ms fetch, 176ms index]
2024/08/09 18:40:28.372946 [DVR]   pruned 2 replaced airings in 20ms.
2024/08/09 18:40:28.389930 [DVR] Fetching guide data for 167 stations in X-M3U @ 2024-08-20 6:30PM
2024/08/09 18:40:32.097483 [DVR]   indexed 1261 airings (167 channels) [2s fetch, 1s index]

Weird right? I was reasonably confident this issue was something specific to Windows Docker hosts, which of course shouldn't happen with containers -- but I now have the E-Mail Log Alert Action running fine on a Windows host, so that theory is at least partially debunked. :frowning:

Anyway, I just pushed a small update that'll capture any error messages from tail in a log file called: <cdvr_host>-<cdvr_port>_logalerter_tail.log. So, @Edwin_Perez and @skipt , if you could each pull bnhf/olivetin:latest (aka bnhf/olivetin:2024.08.10) and setup an e-mail log alert, I'd appreciate it.

After the first time you should have gotten an e-mail but didn't, please check this special tail.log file, and post any errors here.

@bnhf I will update and test in a bit ...

@bnhf did not work and your log is blank.

image

Same results here I believe, but I kept trying thinking I did something wrong.

EDIT:

.msmtp.log:

Aug 10 12:00:12 host=smtp.gmail.com tls=on auth=on [email protected] [email protected] recipients=skip@xxxxx errormsg='cannot connect to smtp.gmail.com, port 587: Connection refused' exitcode=EX_TEMPFAIL

I have a question regarding the E-Mail Log Alerts action in Olivetin. If I have the process running with a single filter, and want to add a second filter, should I stop the process and re-launch with two filters? Or, can I initiate a second instance with the additional filter while the original action is still running?

Yes, kill the current Action and reinitiate it with two filters.

1 Like

I spent some time looking at this and it appears that although this line of logalerter.sh

cdvrLogFile=/mnt/"$channelsHost"-"$channelsPort"_logs/data/channels-dvr.log

properly mounts the CDVR log so Olive Tin can see it, updates to the log on the Windows side are not seen by the Olive Tin (WSL side) after the initial mount. I thought earlier you remarked that there was something wrong with WSL on Win 10, is that what you were alluding to?

2 Likes

Actually, here we're only assigning the already bound directory to a variable for easy-of-use in the script. The directory binding itself is done at the Docker level, through the volumes: section(s) of the Docker Compose.

Can you expand a bit on what you're seeing?

At a high level what I'm seeing looks like once I have started the OliveTin container, its view of the CDVR logfile never updates. In other words, it looks like starting the container takes a snapshot of the CDVR server log file (xxx.xxx.xxx.xxx:8089/admin/log) but after that the container's view of the logfile never updates, even though I can easily force new log entries as seen via the CDVR admin web UI at xxx.xxx.xxx.xxx:8089/admin/log.

During these tests I am getting the OliveTin container's view of the log both through the files as visible via docker desktop and via a root console session.

I have also done some testing of the OliveTin E-mail Log Alerts script and confirmed that the following test:

 if [ -s $logFile ]; then {

for my installation is only true after script initiation but never thereafter. I have also confirmed that if I force the test to be true using various artificial means, multiple emails come through, confirming my email setup is fine and it is the test that is keeping things from working as they should.

The are possible related reports on the web that depending on the platform, containers sometimes fail to update when editing a mounted file because of the way i-nodes versus filenames work. Assessing these reports against what's going on with OliveTin is difficult for me because I don't know behind the scenes how CDVR server is updating the log. If however this truly is the root cause, it is consistent with the fact that the script works for some people but not others.

Now that @maddox has help me figure out how to use wget to get the CDVR logs

https://community.getchannels.com/t/can-i-wget-the-cdvr-log-file-using-wsl/40879

...I'm going to try wget as an alternate way of tracking logfile changes in the log alerter.sh script, as opposed to

tail -f $cdvrLogFile | grep --line-buffered -E "$grepFilters" >> $logFile &

Hopefully @mjitkop, who I think wrote the original e-mail alerter script, is keeping an eye on this discussion because as a novice I wouldn't trust me to do anything that gets officially sent anywhere.

Actually, no, not exactly.

I wrote the script for channel lineup changes that has a feature to get notified by email but it's all written in Python.

The alert script is not from me. I believe @bnhf implemented it all and I think it is a shell script.

Unfortunately, your issue is beyond my expertise and I have no clue how to even investigate it.

I hope with @bnhf's lead and help from other forum members your issue will be solved soon. :crossed_fingers:

Thanks, right. I stand corrected.

2 Likes

I think this is very likely the issue, as the original problem with this script (which was cross-platform), had to do with the i-node changing for the temporary file I was using. This would cause tail to fail after the first e-mail on all platforms.

I'll continue to investigate if there's another way to get tail-like functionality without using tail...

Thanks for the update.

I think tail -f is working it's just that it's input is always the same. I plan to try something like this:

wget log (time 1)  | filter | tail > snapshot1
....
wget log (time 2)  | filter |tail > snapshot2

 [if snapshot2 entries newer that snapshot 1] generate and email report

As part of this exercise I learned about the watch command, maybe that could be useful.