Commit Graph
77 Commits
Author SHA1 Message Date
Jash e24b3e0bcc fix: treat an empty telemetry last upload time as 0 refs #6590 2026-11-17 12:14:31 +05:30
Jash 17515199d4 fix: validate ZM_TELEMETRY_INTERVAL and fall back to a day instead of sleeping undef refs #6035 2026-11-16 00:46:57 +05:30
Jash ec96bd2927 fix: reject a zmtelemetry --interval that does not evaluate to a positive number refs #5959 2026-11-15 09:21:56 +05:30
Jash 9ab1d0119d fix: stop zmtelemetry dying when the geoip reply is not valid JSON refs #5728 2026-11-14 17:53:08 +05:30
Jash 445738e2c2 fix: only advance zmtelemetry last check time after a successful upload refs #5728 2026-11-14 17:53:07 +05:30
Jash 3518758bcd fix: make zmtelemetry --interval take a value refs #5728 2026-11-14 17:53:07 +05:30
Isaac ConnorandClaude Opus 5.5 68298351ab feat: report which streaming services each monitor uses in telemetry
Add JanusEnabled, Go2RTCEnabled, RTSP2WebEnabled and RTSPServer to the
per-monitor telemetry, so we can tell whether Janus and RTSP2Web are still
in use before deciding whether to deprecate them. Nothing in the existing
payload says.

Bring the privacy statement's list of collected monitor fields up to date
too. It listed Function, which no longer exists, and left out Capturing,
Analysing and Recording, and the source path, which is sent with its user
name, password and host replaced. Only en_gb is updated; the other
translations keep their own lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:27:13 -04:00
Steve GilvarryandClaude Opus 5 ba49bbb33c fix: make the Perl scripts' taint-safe PATH configurable
The scripts run under -T, so they cannot trust the caller's PATH and set
their own. Sixteen of them hardcoded /bin:/usr/bin:/usr/local/bin, which
assumes everything they shell out to lives under /usr or /usr/local.

ZoneMinder::General::findDbCommand looks for a database client on that
PATH, and zmupdate.pl and zmcamtool.pl run what it finds. So an install
whose client sits anywhere else cannot apply schema changes:

  sh: mysql: command not found
  Command 'mysql -u'zmuser' ... ' exited with status: 127

even with the client on the caller's PATH. Homebrew on Apple Silicon is
the case that surfaced it - the client is in /opt/homebrew/bin - but a
--prefix=/opt install on Linux has the same shape, as does anything that
keeps its database client outside the FHS locations.

Replaced the literal with @ZM_SCRIPT_PATH@, defaulting to the same three
directories plus wherever cmake actually found a client, and overridable
for packagers who want to pin it. Warn at configure time when no client
is found at all, since that failure otherwise appears much later and
says something unrelated.

Nothing changes for an install whose client is already under /usr/bin:
the directory is only appended when it is not in the list, so the
default stays exactly as it was.

Memory.pm is deliberately left alone. It has a narrower PATH of
/bin:/usr/bin, and the only command it runs is uname through an absolute
path from ZM_PATH_UNAME, so it does not need widening.

Verified on macOS across the three cases: with the client in
/opt/homebrew/bin the directory is appended; -DZM_SCRIPT_PATH= is
respected verbatim; and pointing detection at /usr/bin/mariadb leaves
the default untouched. Build clean, suite 146 cases.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5KL9Xbi7K5aGsauLtd8tG
2026-09-13 13:04:59 +10:00
Isaac Connor a925de0ac1 Add Deleted=false for Monitors count 2026-02-01 14:42:38 -05:00
Isaac Connor 43f2525fdf Fix setting authority clearing host 2025-12-22 09:49:37 -05:00
Isaac Connor 641e785f4c Add Path, with sanitization to telemetry 2025-12-17 18:52:26 -05:00
Isaac Connor 2d75e7cafd Only report non-deleted monitors 2025-12-17 17:00:45 -05:00
Isaac Connor 559008c074 Fix inclusion of Manufacturer and Model in telemetry data. Add timezone. 2025-10-21 06:55:44 -04:00
Isaac Connor ecf6d7a797 Add verbose and dry_run options 2025-10-21 05:40:52 -04:00
Isaac Connor e26d108da5 Add use warnings 2024-11-24 13:00:15 -05:00
Isaac Connor c42179ffa7 Handle db reconnects, don't disconnect db because it rug pulls from under logging functions 2024-11-24 12:57:56 -05:00
IP2Location a4f70ebab3 Added IP2Location.io API as failover for geolocation 2024-09-06 16:05:39 +08:00
Isaac Connor 86e1959378 Use new ZM_PATH_UNAME instead of uname on PATH 2023-09-28 12:59:39 -04:00
Alejandro Criado-Pérez 871bf1772f fix: messages 2023-07-05 01:03:48 +02:00
Isaac Connor a32b77510d Fix logic on error reporting of failure to connect to db 2022-02-28 09:38:54 -05:00
Isaac Connor e33b41745d Merge branch 'master' into replace_function_concept 2022-02-27 14:04:01 -05:00
Isaac Connor 0bcb9d276f code style. 2022-02-26 18:25:51 -05:00
Isaac Connor 86f393565e Remove Function references and swap with appropriate Capturing, Analysing, Recording 2022-01-27 13:42:31 -05:00
Isaac Connor 20629fdf5a Include Manufacturer and Model in telemetry 2021-11-16 09:20:14 -05:00
Isaac Connor 576e3149d6 escape table columns for mysql8 2020-04-23 10:43:01 -04:00
Pliable Pixels cf6b24b432 add ES status to telemetry and --show option to display what is being sent to ZM 2020-03-26 12:11:00 -04:00
Isaac Connor 971d62f60d encode the telemetry to utf-8 before sending. Fixes #2800 2020-01-07 12:09:34 -05:00
Isaac Connor a3ea0c224e detaint cmd in runSysCmd. code style fixes. Return unknown for Longitude as well 2019-10-16 10:13:18 -04:00
Isaac Connor 766a59884d Don't hard code perl path. Use PERL_EXECUTABLE cmake var 2019-09-23 12:54:27 -04:00
Andrew Bauer 6ad732e419 retrieve greip data rather than the ip (#2173) 2018-07-31 14:01:01 -04:00
Isaac Connor 124d2b20eb remove version control marker 2018-03-21 10:51:47 -04:00
Isaac Connor f682e1da9e Merge branch 'zmtelemetry_improvements' into storageareas 2018-03-21 10:40:32 -04:00
Isaac Connor c34ab7c172 fix merge and sleep for interval instead of 1 hour 2018-03-21 09:28:39 -04:00
Isaac Connor 0d3957611a Merge branch 'zmtelemetry_improvements' of github.com:ConnorTechnology/ZoneMinder into zmtelemetry_improvements 2018-03-21 09:26:54 -04:00
Isaac Connor b50fd690dc exit if not enabled, hence reducing code nesting. Must update lastCheck 2018-03-21 09:22:29 -04:00
Isaac Connor ba7b2447a2 Merge branch 'master' into zmtelemetry_improvements 2018-03-21 09:07:43 -04:00
Isaac Connor c3c6459052 Merge branch 'montagereview_rework' into storageareas 2017-07-05 15:34:02 -04:00
Isaac Connor d7950bd732 Merge branch 'master' into knnniggett-configfiles 2017-07-03 21:53:47 -04:00
Isaac Connor 1ef25ae1f3 switch to single quotes where possible 2017-06-28 11:03:35 -04:00
Isaac Connor 52d5099677 fix quotes 2017-06-28 11:01:57 -04:00
Isaac Connor e7de8e6d7b use variable instead of recalculating 2017-06-28 10:59:50 -04:00
Isaac Connor e831740dc5 Merge branch 'master' into zmtelemetry_improvements 2017-06-28 10:58:46 -04:00
Isaac Connor 9ba9495ae0 whitespace, braces, move pod doc to bottom. No functional changes 2017-06-28 10:53:35 -04:00
Isaac Connor 27760ffce2 move pod below __END__ and improve it to include options. Add help option. 2017-01-08 10:12:25 -05:00
Isaac Connor b3a07c27b8 Add test for lastCheck being in the future. print out a notice when we are sleeping and are being run from a terminal. 2017-01-08 09:40:09 -05:00
Isaac Connor 03b19bc1fd when run from terminal, output a line that says that we are sleeping 2017-01-06 18:40:39 -05:00
Isaac Connor 7f2fcddc03 revert print to Info 2017-01-06 18:39:08 -05:00
Isaac Connor 09783a1a39 add some command line options and use the INTERVAL and ENDPOINT from the Config hash 2017-01-04 12:22:40 -05:00
Andy Bauer 254fcbcef7 update gpl 2 mailing address in source files 2016-12-26 09:23:16 -06:00
Andrew Bauer 8bbb443c67 fix invalid key name in config hash 2016-05-20 10:35:03 -05:00