changing execution time of automatic nightly upgrades

I’m running Netdata nightlies installed via the one-liner bash script and I was wondering whether it was possible to configure when the updates occur each day?
I see there is a config file:

/etc/netdata/netdata-updater.conf

But neither of the two configurable options helps in this case.
I had a look for crontabs for both the netdata user and root but found nothing so far…

Failing that I could disable automatic updates via Netdata and handle the updates through an unattended-upgrades package.

By default, when enabling auto updates, we use one of the following, in descending order of preference:

  1. A symbolic link to the updater script placed in either /etc/cron.daily or /etc/periodic/daily(whichever the system actually has).
  2. A systemd timer unit called netdata-updater.timer, installed alongside the other Netdata unit files (this gets installed, but not enabled, regardless of whether it’s used for updates or not). This one is not the default on systemd systems at the moment because it does not currently support sending an email on a failed update.
  3. A crontab file placed in /etc/cron.d that has a single job which calls the updater script daily. The actual file can be found on a standard install in /usr/lib/netdata/system/cron/netdata-updater-daily (or the same location under /opt/netdata on a static build).

In the first case, the auto-update process should happen whenever your system normally runs daily cron jobs (without anacron or something similar, this is usually some time between 03:30 and 06:00 in whatever timezone the system is configured to use). In the second case, it should run whenever systemd decides to run it since we use OnCalendar=Daily for scheduling. In the third case, it should run at 02:57 in whatever time zone the system is configured to use (picked because this does not overlap with when most distros run their daily cron jobs).

The easiest approach for a custom time is likely to disable auto-updates and then create a custom timer unit that triggers the netdata-updater.service unit on the schedule you want (this unit also gets installed by default on systemd systems, it’s a one-shot (Persistent=false in systemd parlance) unit that just calls the updater script).

If you don’t have systemd as an option, the next easiest approach is probably to disable auto-updates and add a custom entry to your crontabs to call the updater.

disable automatic updates via Netdata and handle the updates through an unattended-upgrades package.

If you’re using our official native packages on Debian or Ubuntu, this is the recommended approach. It’s not what we set up by default due to some rather strong internal disagreement about how we should handle updates for native packages (I and the other packaging people feel that updates in this case should be left up to users, certain individuals who have a final say in this insist that we should auto-update by default in all cases).

Hi @Austin_Hemmelgarn and thank you for the thorough reply!

I have the link in cron.daily but I don’t have the systemd unit file on my hosts.
They have install type: binpkg-deb
OS: Ubuntu 23.04

I’d like to use systemd so let me know what I should collect to figure that out.
I’ll probably go with my unattended option but for those that might want to use the netdata systemd unit:

Assuming that the systemd unit ‘issue’ gets resolved, I presume that the best thing to do in that thereafter would be to

  1. Re-run the installer/updater script specifying the no-updates flag (for the benefit of others who may find this post):
wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --no-updates
  1. Verify that the file netdata-updater is no longer linked in cron.daily.

  2. Enable the systemd unit:

systemctl enable netdata-updater.timer

FWIW: On the topic of automatic updates, I would expect that nightlies/edge would default to automatic updates but stable would be up to the admin.

Just to note that running the script does not remove the link in “/etc/cron.daily”; I had to remove that separately.