Pushover Notification Setup? / Real-Time Alerts

I was thinking that too.
A Standalone questionnaire (web based) that asks the questions and provides the env vars.
Would also help to list the env vars in ascending order so easy to spot the one you want.
It's hard jumping back and forth between the compose and the env vars in Portainer.
That's why many users just put the values in the compose statement.

@Jean0987654321 In addition to the above, you can test the pattern used by grep in this Action, in the Generate Filtered Channels DVR Log Action. For example, when I search the last 10000 lines for [DVR] Error here's what I get:

2025/03/09 08:30:15.000715 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2025/03/09 08:30:31.014563 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2025/03/09 08:30:48.033634 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2025/03/09 08:31:07.043011 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": context deadline exceeded
2025/03/09 08:31:30.053257 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2025/03/09 08:32:01.068388 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2025/03/09 08:32:48.078199 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": context deadline exceeded
2025/03/09 08:34:07.102301 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2025/03/09 08:35:26.118209 [DVR] Error running job 1741530600-3 Face the Nation: could not start stream on channels=[1004]: M3U: Could not fetch playlist from utheater-pc:8089 (Timeout): Get "http://utheater-pc:8089/devices/ANY/channels/1004/hls/master.m3u8?": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

And there are lots of those [HTTP] lines in my actual log, based on me turning on HTTP logging ever so briefly.

Try entering it without the quote marks
[DVR] Error
OliveTin for Channels will format it correctly (escaping special characters) for grep

logalerts.sh 192.168.1.72:8089 2m "[DVR] Error" "none" "none" "" "" "channels:// olivetin:// discord://bla"

This is not the correct state -- and I'm not sure how that happened. But, you should be able to fix it by setting frequency=0 to kill everything.

Browser refresh after any time you click Start on Actions that run continuously.

Then set your values again. Any unused filters should be set to none (which is the default for 2 thru 5). When you're done, look at the .running file again, and you should see more like:

logalerts.sh media-server8:8089 2m "[DVR] Error" "none" "none" "none" "none" "channels:// olivetin:// pover://[Redacted] 

The missing none values are likely the issue...

1 Like

Same thing happens even when I got this in the file

logalerts.sh 192.168.1.72:8089 2m "[DVR] Error" "none" "none" "none" "none" "olivetin:// discord://bla"

This came from my email

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

2025/03/15 21:44:28.902371 [HTTP] | 200 |    9.903272ms |   100.79.153.20 | GET      "/dvr/rules"
2025/03/15 21:44:28.902371 [HTTP] | 200 |    9.903272ms |   100.79.153.20 | GET      "/dvr/rules"
2025/03/15 21:44:28.942120 [HTTP] | 200 |   13.486215ms |   100.79.153.20 | GET      "/dvr/jobs"
2025/03/15 21:44:28.942120 [HTTP] | 200 |   13.486215ms |   100.79.153.20 | GET      "/dvr/jobs"
2025/03/15 21:44:29.262906 [HTTP] | 200 |  348.170868ms |   100.79.153.20 | GET      "/dvr/programs"
2025/03/15 21:44:29.262906 [HTTP] | 200 |  348.170868ms |   100.79.153.20 | GET      "/dvr/programs"
2025/03/15 21:44:29.384544 [HTTP] | 200 |  477.063689ms |   100.79.153.20 | GET      "/dvr/groups"
2025/03/15 21:44:29.384544 [HTTP] | 200 |  477.063689ms |   100.79.153.20 | GET      "/dvr/groups"
2025/03/15 21:44:30.138326 [HTTP] | 200 |  1.250731294s |   100.79.153.20 | GET      "/dvr"
2025/03/15 21:44:30.138326 [HTTP] | 200 |  1.250731294s |   100.79.153.20 | GET      "/dvr"
2025/03/15 21:44:30.153739 [HTTP] | 200 |    1.077198ms |   100.79.153.20 | GET      "/dvr"
2025/03/15 21:44:30.153739 [HTTP] | 200 |    1.077198ms |   100.79.153.20 | GET      "/dvr"
2025/03/15 21:44:34.001248 [HTTP] | 200 |   31.943322ms |   100.79.153.20 | PUT      "/dvr/lineups/XMLTV-EPlusTV"
2025/03/15 21:44:34.001248 [HTTP] | 200 |   31.943322ms |   100.79.153.20 | PUT      "/dvr/lineups/XMLTV-EPlusTV"
2025/03/15 21:44:34.109484 [HTTP] | 200 |  5.194744955s |   100.79.153.20 | GET      "/dvr/files?all=true&raw=false"
2025/03/15 21:44:34.109484 [HTTP] | 200 |  5.194744955s |   100.79.153.20 | GET      "/dvr/files?all=true&raw=false"
2025/03/15 21:44:34.224835 [HTTP] | 200 |  140.838291ms |   100.79.153.20 | GET      "/devices?all=true"
2025/03/15 21:44:34.224835 [HTTP] | 200 |  140.838291ms |   100.79.153.20 | GET      "/devices?all=true"
2025/03/15 21:44:34.303597 [HTTP] | 200 |    3.597779ms |   100.79.153.20 | GET      "/providers/playon/auth"
2025/03/15 21:44:34.303597 [HTTP] | 200 |    3.597779ms |   100.79.153.20 | GET      "/providers/playon/auth"
2025/03/15 21:44:34.371353 [HTTP] | 200 |   14.571496ms |   100.79.153.20 | GET      "/dvr"
2025/03/15 21:44:34.371353 [HTTP] | 200 |   14.571496ms |   100.79.153.20 | GET      "/dvr"
2025/03/15 21:44:34.418556 [HTTP] | 200 |   18.952962ms |   100.79.153.20 | GET      "/troubleshoot"
2025/03/15 21:44:34.418556 [HTTP] | 200 |   18.952962ms |   100.79.153.20 | GET      "/troubleshoot"
2025/03/15 21:44:34.444218 [HTTP] | 200 |     6.79436ms |   100.79.153.20 | GET      "/remote/nat"
2025/03/15 21:44:34.444218 [HTTP] | 200 |     6.79436ms |   100.79.153.20 | GET      "/remote/nat"
2025/03/15 21:44:34.510597 [HTTP] | 200 |   45.235552ms |   100.79.153.20 | GET      "/settings"
2025/03/15 21:44:34.510597 [HTTP] | 200 |   45.235552ms |   100.79.153.20 | GET      "/settings"
2025/03/15 21:44:34.533229 [HTTP] | 200 |  232.726606ms |   100.79.153.20 | GET      "/dvr/recordings/upnext"
2025/03/15 21:44:34.533229 [HTTP] | 200 |  232.726606ms |   100.79.153.20 | GET      "/dvr/recordings/upnext"
2025/03/15 21:44:34.555500 [HTTP] | 200 |      63.636µs |   100.79.153.20 | GET      "/remote/tailscale"
2025/03/15 21:44:34.555500 [HTTP] | 200 |      63.636µs |   100.79.153.20 | GET      "/remote/tailscale"
2025/03/15 21:44:34.633972 [HTTP] | 200 |   238.97427ms |   100.79.153.20 | GET      "/remote"
2025/03/15 21:44:34.633972 [HTTP] | 200 |   238.97427ms |   100.79.153.20 | GET      "/remote"
2025/03/15 21:44:34.636418 [HTTP] | 200 |   89.714851ms |   100.79.153.20 | GET      "/bonjour"
2025/03/15 21:44:34.636418 [HTTP] | 200 |   89.714851ms |   100.79.153.20 | GET      "/bonjour"
2025/03/15 21:44:34.642671 [HTTP] | 200 |  267.184821ms |   100.79.153.20 | GET      "/system"
2025/03/15 21:44:34.642671 [HTTP] | 200 |  267.184821ms |   100.79.153.20 | GET      "/system"
2025/03/15 21:44:34.882754 [HTTP] | 200 |  171.194301ms |   100.79.153.20 | GET      "/status"
2025/03/15 21:44:34.882754 [HTTP] | 200 |  171.194301ms |   100.79.153.20 | GET      "/status"
2025/03/15 21:44:34.917174 [HTTP] | 200 |    1.714327ms |   100.79.153.20 | GET      "/auth"
2025/03/15 21:44:34.917174 [HTTP] | 200 |    1.714327ms |   100.79.153.20 | GET      "/auth"
2025/03/15 21:44:36.015304 [HTTP] | 200 |  1.718730956s |   100.79.153.20 | GET      "/dvr/recordings/summary"
2025/03/15 21:44:36.015304 [HTTP] | 200 |  1.718730956s |   100.79.153.20 | GET      "/dvr/recordings/summary"
2025/03/15 21:44:36.316344 [HTTP] | 200 |  7.467238094s |   100.79.153.20 | GET      "/dvr/events/subscribe"
2025/03/15 21:44:36.316344 [HTTP] | 200 |  7.467238094s |   100.79.153.20 | GET      "/dvr/events/subscribe"
2025/03/15 21:44:38.495490 [DVR] Reindexed 868 airings into XMLTV-PLMHLSEPGOnly (15 channels over 169h4m0s) + 39 skipped [4s index]
2025/03/15 21:44:38.495490 [DVR] Reindexed 868 airings into XMLTV-PLMHLSEPGOnly (15 channels over 169h4m0s) + 39 skipped [4s index]
2025/03/15 21:44:38.547048 [DVR]   pruned 8 replaced airings in 51ms.
2025/03/15 21:44:38.547048 [DVR]   pruned 8 replaced airings in 51ms.
2025/03/15 21:44:38.803439 [DVR] Fetched guide data for XMLTV-EPlusTV in 248ms
2025/03/15 21:44:38.803439 [DVR] Fetched guide data for XMLTV-EPlusTV in 248ms
2025/03/15 21:45:01.042834 [HTTP] | 200 |   36.398384ms |      172.19.0.3 | GET      "/api/v1/jobs"
2025/03/15 21:45:01.042834 [HTTP] | 200 |   36.398384ms |      172.19.0.3 | GET      "/api/v1/jobs"
2025/03/15 21:45:01.183912 [HTTP] | 200 |    2.687495ms |      172.19.0.3 | GET      "/api/v1/jobs"
2025/03/15 21:45:01.183912 [HTTP] | 200 |    2.687495ms |      172.19.0.3 | GET      "/api/v1/jobs"
2025/03/15 21:46:03.285906 [DVR] Indexed 127 airings into XMLTV-EPlusTV (42 channels over 77h25m0s) + 0 skipped [1m23s index]
2025/03/15 21:46:03.285906 [DVR] Indexed 127 airings into XMLTV-EPlusTV (42 channels over 77h25m0s) + 0 skipped [1m23s index]
2025/03/15 21:46:03.325394 [DVR]   pruned 32 replaced airings in 39ms.
2025/03/15 21:46:03.325394 [DVR]   pruned 32 replaced airings in 39ms.
2025/03/15 21:46:03.340951 [DVR] Reindexed 0 airings into XMLTV-PLMNonGracenoteMPEGTS01 (0 channels over 0s) + 0 skipped [12ms index]
2025/03/15 21:46:03.340951 [DVR] Reindexed 0 airings into XMLTV-PLMNonGracenoteMPEGTS01 (0 channels over 0s) + 0 skipped [12ms index]
2025/03/15 21:46:03.713291 [IDX] Pruned 46 expired groups from XMLTV-EPlusTV in 13ms.
2025/03/15 21:46:03.713291 [IDX] Pruned 46 expired groups from XMLTV-EPlusTV in 13ms.
2025/03/15 21:46:03.838787 [DVR] Rule 'New York Knicks' (7) found 1 new airings (10 matching)
2025/03/15 21:46:03.838787 [DVR] Rule 'New York Knicks' (7) found 1 new airings (10 matching)
2025/03/15 21:46:03.844956 [DVR]   queued recording job for 'NBA Basketball' EP051853721041 @ Sat Mar 15 8:29:30PM on ch=[10] (1742084970-7)
2025/03/15 21:46:03.844956 [DVR]   queued recording job for 'NBA Basketball' EP051853721041 @ Sat Mar 15 8:29:30PM on ch=[10] (1742084970-7)
2025/03/15 21:46:03.922750 [DVR] Rule 'New York Rangers' (8) found 1 new airings (9 matching)
2025/03/15 21:46:03.922750 [DVR] Rule 'New York Rangers' (8) found 1 new airings (9 matching)
2025/03/15 21:46:03.929695 [DVR]   queued recording job for 'NHL Hockey' EP051892151196 @ Thu Mar 20 6:59:30PM on ch=[1160] (1742511570-8)
2025/03/15 21:46:03.929695 [DVR]   queued recording job for 'NHL Hockey' EP051892151196 @ Thu Mar 20 6:59:30PM on ch=[1160] (1742511570-8)
2025/03/15 21:46:03.988534 [DVR] Starting job 1742084970-7 NBA Basketball on ch=[10]
2025/03/15 21:46:03.988534 [DVR] Starting job 1742084970-7 NBA Basketball on ch=[10]
2025/03/15 21:46:03.990807 [DVR] Waiting 17h13m26.009193229s until next job 1742151570-9 Premier League Soccer
2025/03/15 21:46:03.990807 [DVR] Waiting 17h13m26.009193229s until next job 1742151570-9 Premier League Soccer
2025/03/15 21:46:14.002334 [ERR] Failed to start stream on channel 10 via M3U-PLMGracenoteMPEG: M3U: No Video Data
2025/03/15 21:46:14.002334 [ERR] Failed to start stream on channel 10 via M3U-PLMGracenoteMPEG: M3U: No Video Data
2025/03/15 21:46:14.004607 [DVR] Error running job 1742084970-7 NBA Basketball: could not start stream on channels=[10]: M3U: No Video Data
2025/03/15 21:46:14.004607 [DVR] Error running job 1742084970-7 NBA Basketball: could not start stream on channels=[10]: M3U: No Video Data
2025/03/15 21:46:14.004607 [DVR] Error running job 1742084970-7 NBA Basketball: could not start stream on channels=[10]: M3U: No Video Data
2025/03/15 21:46:15.020140 [DVR] Starting job 1742084970-7 NBA Basketball on ch=[10]
2025/03/15 21:46:15.020140 [DVR] Starting job 1742084970-7 NBA Basketball on ch=[10]
2025/03/15 21:46:15.020638 [DVR] Waiting 17h13m14.979362586s until next job 1742151570-9 Premier League Soccer
2025/03/15 21:46:15.020638 [DVR] Waiting 17h13m14.979362586s until next job 1742151570-9 Premier League Soccer

bizarre

Go ahead and kill the Action for now, and I'll add some logging tomorrow. That should give us a better idea of what's happening.

1 Like

E-mail Log Alerts errors out when default frequency once is used

STD OUT is filled with these
sleep: invalid time interval 'once'
Try 'sleep --help' for more information.

OK, thanks. I'll address that with the logging additions I'm pushing out tomorrow.

1 Like

OK, I'll test using 24h for now.

It's not working. Tried both 24h and 2m for frequency.
What I'm searching for is in the log.

2025/03/10 11:17:27.386388 [SYS] Shutting down for upgrade from v2025.03.06.2119 to v2025.03.10.0659

/volume1/docker/olivetin/192.168.1.4-8489_logalerts.running

logalerts.sh 192.168.1.4:8489 2m "[SYS] Shutting down for upgrade" "none" "none" "none" "none" "pover://[REDACTED"

/volume1/docker/olivetin/192.168.1.4-8489_logalerts_latest.log is empty

OliveTin Post-Install Healthcheck
Checking your OliveTin-for-Channels installation...
(extended_check=false)

Version 2025.03.15

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

Checking that your selected Channels DVR server (192.168.1.4:8489) 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  1246k      0 --:--:-- --:--:-- --:--:-- 1246k
HTTP Status: 200
Effective URL: http://192.168.1.4:8489/

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

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

total 76
drwxrwxrwx  2 root root   4096 Feb 13 09:26 #recycle
d--------- 11 root root   4096 Mar  8 16:40 .
drwxr-xr-x  4 root root   4096 Mar 15 19:13 ..
drwxrwxrwx  4 root root   4096 Mar  3 10:24 @eaDir
drwx------ 32 1026 users  4096 Mar 14 20:17 Database
drwx------  4 1026 users 32768 Mar 15 17:14 Images
drwx------  5 1026 users  4096 Aug 28  2023 Imports
drwx------  4 1026 users  4096 Aug 28  2023 Logs
drwx------  2 1026 users  4096 Mar  8 16:40 Movies
drwx------  4 1026 users  4096 Mar 15 17:14 Streaming
drwx------ 46 1026 users  4096 Mar 15 15:57 TV

If the listed folders are NOT visible, AND you have your Channels DVR and Docker on the same system:

Channels reports this path as...
/shares/dvr

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

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

total 36
drwxr-xr-x  9 1027 users 4096 Mar 10 11:17 .
drwxr-xr-x  4 root root  4096 Mar 15 19:13 ..
drwxr-xr-x  2 root root  4096 Feb 23 12:24 2025.02.23.1939
drwxr-xr-x  2 root root  4096 Feb 24 11:57 2025.02.24.1906
drwxr-xr-x  2 root root  4096 Feb 27 16:05 2025.02.27.2340
drwxr-xr-x  2 root root  4096 Mar  5 13:59 2025.03.02.2319
drwxr-xr-x  2 root root  4096 Mar  7 08:55 2025.03.06.2119
drwxr-xr-x  2 root root  4096 Mar 10 11:12 2025.03.10.0659
drwxr-xr-x 15 root root  4096 Mar 15 19:45 data
lrwxrwxrwx  1 root root    15 Mar 10 11:12 latest -> 2025.03.10.0659

If the listed folders are NOT visible, AND you have your Channels DVR and Docker on the same system:

Channels reports this path as...
/channels-dvr

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

Checking if your Portainer token is working on ports 9000 and/or 9443:

Portainer http response on port 9000 reports version 2.27.1
Portainer Environment ID for local is 2
Portainer https response on port 9443 reports version 2.27.1
Portainer Environment ID for local is 2

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

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

HOSTNAME=olivetin
CHANNELS_DVR=192.168.1.4:8489
CHANNELS_DVR_ALTERNATES=192.168.1.4:8089 192.168.1.4:8189 192.168.1.4:8190 192.168.1.4:8289 192.168.1.4:8389
CHANNELS_CLIENTS=
ALERT_SMTP_SERVER=
ALERT_EMAIL_FROM=[Redacted]@
ALERT_EMAIL_PASS=[Redacted]
ALERT_EMAIL_TO=[Redacted]@
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
PORTAINER_TOKEN=[Redacted]
PORTAINER_HOST=192.168.1.4
PORTAINER_PORT=9443
PORTAINER_ENV=2

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

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

search local
nameserver 127.0.0.11
options ndots:0

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

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.19.0.2	olivetin

The E-Mail Log Alerts Action is a real-time monitor of log events. No matter what frequency you choose, it only looks back in the log for very, very recent events. It's intended to be forward looking, and only ever reports a new matching log entry once while in operation.

It starts collecting new matching log events immediately, and sends all collected log lines via whatever notification you choose, at the frequency requested.

The Generate Filtered Channels DVR Log Action, on the other hand, is the one you want for looking backward in the log:

Duh! Got it.
Something to consider since you're using a docker volume for the log file is that as of 1/24/2025, the new Channels DVR docker images will rotate the DVR log file. Not sure if that will cause issues?

It might. tail is fussy about inodes changing, even if the filename stays the same.

Well, I currently run six CDVR servers in docker containers and haven't updated to the new image yet.
Only one of my servers is over the log rotation threshold of 50MB.
So most likely when I update, that one will rotate the log.
Not sure how they implement the log rotation (or when: while running or only at CDVR restarts)?

@Jean0987654321 New version pushed this morning -- with a bit of additional logging, plus I found another issue that may be the root of what you were seeing. Let me know how things look now...

@chDVRuser I removed the portion of the field descriptions referring to a "run once" mode, as it doesn't really make sense for a real time monitor. I'm also trapping if once is used, with an error suggesting use of the Generate Filtered Channels DVR Logs Action instead.

2 Likes

Excellent! Working great :+1: :+1:

Can I add a grep filter without killing/restarting it?

1 Like

Yes.

Ok...that worked

1 Like

Hey All,

Just wanted to follow up on this thread. After working with different solutions for push notifications, I ended up creating my own lightweight tool called ChannelWatch specifically for getting Pushover notifications when TV viewing begins.

@bnhf - Thanks for all your work on OliveTin! My use case was pretty specific, so I built something focused just on watching for viewing activity in the logs.

For anyone interested, ChannelWatch is a simple Docker container that:

  • Monitors the Channels DVR log file in real-time
  • Sends Pushover notifications when someone starts watching TV
  • Includes channel name, number, and resolution in the notification
  • Uses minimal resources (perfect for NAS devices)

I've made a detailed announcement post with setup instructions here:

The tool is open source and available on both GitHub and Docker Hub:

Thought this might be useful for others who want a dedicated solution for viewing notifications!