summaryrefslogtreecommitdiffstats
path: root/system
AgeCommit message (Collapse)Author
2020-10-14Fix systemd comment syntax (#10066)Holger Hees
* Fix systemd comment syntax comments for systemd service files are only allowed in the beginning of a new line https://www.freedesktop.org/software/systemd/man/systemd.syntax.html otherwise you get error messages like ``` /usr/lib/systemd/system/netdata.service:48: Failed to parse capability in bounding/ambient set, ignoring: # ``` * remove trailing whitespaces
2020-09-28Added improved auto-update support. (#9966)Austin S. Hemmelgarn
* Add systemd timer unit to handle auto updates. This adds a systemd timer unit and associated service for running the updaterscript. This allows better support for auto-updates on systems that use systemd, removing the need for cron or special shims to handle periodic tasks. This will be used in preference to our existing auto-update support on systems running systemd unless the user overrides this behavior. * Add an option to the installer to override auto-updater type detection. This allows users to specify what auto-updater scheduling mechanism to use. This wil persist the selection to updates as well. Supported values are: * systemd': Uses a systemd timer unit and service to handle automatic updates. * 'interval': Uses a script in /etc/cron.daily or /etc/periodic/daily. * `crontab`: Uses a crontab file in /etc/cron.d. * Change priority of systemd support. This way existing users won't get converted, and by default you'll still get emails on failures. * Case-normalize the value passed to --auto-update-type. * Fix incorrect naming of crontab file. * Fixed function naming.
2020-09-15Added support for using `/etc/cron.d` for auto-updates. (#9598)Austin S. Hemmelgarn
* Add crontab fragment for netdata updater. This adds a crontab fragment to be put in `/etc/cron.d` on system swhich do not support either `/etc/cron.daily` or `/etc/periodic/daily`, allowing for proper auto-updater support on such systems. The crontab will run upates at 02:57, which was chosen arbitrarily because it does not conflict with th erun times for any major distribution's daily scheduled tasks. * Utilize the crontab fragment for updates on systems that need it. This adds logic to utilize the crontab fragment added by the previous commit on systems which need it for auto-updates to work. The installer will preferentially use `/etc/cron.daily` or `/etc/periodic/daily` instead if they exist, so this should result in no changes for most users. * Remove systemd scheduler detection. We're not actually using it right now, and it breaks handling of auto-updates on systemd systems.
2020-08-25Remove PrivateMounts (#9619)Steve8291
Since commit #9234 the following has been showing up in my journal logs: > /lib/systemd/system/netdata.service:63: Unknown lvalue 'PrivateMounts' in section 'Service' Running `systemd-analyze verify netdata.service` > /lib/systemd/system/netdata.service:63: Unknown lvalue 'PrivateMounts' in section 'Service' > Attempted to remove disk file system, and we can't allow that. It would appear that the `Attempted to remove disk file system, and we can't allow that.` message is due to a [bug](https://github.com/systemd/systemd/issues/8592) in version 237 of systemd, which is what my Ubuntu 18.04 is currently running. But that doesn't explain the "PrivateMounts" issue. Looking at the [systemd man page](https://www.freedesktop.org/software/systemd/man/systemd.exec.html) for PrivateMounts it would seem that we do not need the `PrivateMounts=true` setting because the service file has `ProtectSystem=full` set: > Other file system namespace unit settings — PrivateMounts=, PrivateTmp=, PrivateDevices=, ProtectSystem=, ProtectHome=, ReadOnlyPaths=, InaccessiblePaths=, ReadWritePaths=, … — also enable file system namespacing in a fashion equivalent to this option. Hence it is primarily useful to explicitly request this behaviour if none of the other settings are used. I have tested this on Ubuntu 18.04 and everything seems to be working fine.
2020-08-13Add CAP_SYS_CHROOT for netdata service (#9726)Vladimir Kobal
2020-07-27Addd sandboxing exception for `/run/netdata`. (#9613)Austin S. Hemmelgarn
This marks `/run/netdata` as writable in our systemd unit files so that users who are listening on a UNIX socket in the 'standard' location can do so witout the sandboxing getting in their way.
2020-07-21Add CAP_SYS_RESOURCE to capability bounding set. (#9569)Austin S. Hemmelgarn
This mitigates failures in the eBPF plugin. The issue is a `setrlimi()` call we're making to allow us to call `memlock()`. The proper fix here is dependent on whether we can prove that we actually need to call `memlock()` or not (I suspect we do not _need_ to but it improves measurement accuracy, in which case it should be optional). If we can, then this is also a fix and not a mitigation. If we can't, then the fix is to get rid of those calls in the eBPF plugin and remove this othewise unneeded capability from our bounding set.
2020-07-20enable simple sandboxing on systemd service (#9234)Yurii Izorkin
2020-07-14Fix potential memory leak in ebpf.plugin (#9484)thiagoftsm
Fix reported bugs with ebpf.plugin.
2020-04-27bind to should be in [web] section and update netdata.service.v235.in too ↵Amish
(#8454) * Update netdata.service.v235.in too Increase timeout for systemd service shutdown to give time to flush the db. When changes are made to netdata.service.in similar changes should be made to netdata.service.v235.in too. * bind to should be in [web] section See documentation: https://docs.netdata.cloud/web/server/
2020-03-30Fix our Debian/Ubuntu packages to actually package the SystemD Unit files we ↵James Mills
expect. (#8468) * update netdata.conf for debian build * Fix Debian Ubuntu SystemD Unit packaging * avoid duplicate netdata.conf files violates single source of truth principle, use schema from #8468 instead * Fixed *DirectoryMode octets and bad ExecStart * Fix dpkg-statoverride warnings * Move the copy of debian/netdata.conf into the correct target (override_dh_install) Co-authored-by: and0x000 <justanpc@gmail.com>
2020-03-16Fix streaming scaling (#8375)Markos Fountoulakis
* Disallow multiple streaming connections to the same master agent * Reject multiple streaming connections quickly without blocking * Increase timeout for systemd service shutdown to give time to flush the db. * Optimize page correlation ID to use atomic counter instead of locks * Reduce contention in global configuration mutex * Optimize complexity of inserting configuration sections from O(N) to O(1) * Reduce overhead of clockgettime() by utilizing CLOCK_MONOTONIC_COARSE when applicable. * Fix unit test compile errors
2020-02-05Fixes support for editing configuration when NetData is installed to a ↵James Mills
symlinked /opt (#7933) * Re-formated ./system/edit-config.in with shfmt -w -i 2 -ci -sr * Fixed and cleaned up ./system/edit-config to work correctly with symlinks
2020-02-05Re-formated ./system/edit-config.in with shfmt -w -i 2 -ci -sr (#7932)James Mills
2020-01-30Better systemd service file (#7790)Amish
* Provide a new service file for systemd v235+ Let systemd create directories, instead of via ExecStartPre. * Do not set global options in service file via -W option. The default set by service file are anyway the defaults used by netdata. Better place is to mention them in netdata.conf and allow user to change those options via netdata.conf file instead of changing in service file.
2019-11-11Ownership and permissions of /etc/netdata (#7244)Konstantinos Natsakis
* make install takes care of ownership and permissions of /etc/netdata Instead of netdata-installer.sh * Fix identation in Makefile.am files * netdata-installer.sh: Clearer variable assignment * netdata-installer.sh: Set /etc/netdata/netdata.conf ownership to root:root and permissions to 0644 * netdata-installer.sh: Set /etc/netdata/.environment permissions to 0644 * install-or-update.sh: Set permissions for /opt/netdata/etc/netdata.conf to 0644 * install-or-update.sh: Use ${NETDATA_PREFIX} more * install-or-update.sh: Improve indentation * install-or-update.sh: Do not create /opt/netdata/etc/netdata directories * debian/rules: /etc/netdata files and directories are now installed by make install * debian/rules: Properly copy files across directories When destination directory exists * netdata.spec.in: /etc/netdata ownership and permissions * Revert "Fix identation in Makefile.am files" This reverts commit 63fdb299b69152fda6984f81b0fef02f364c5efe. * Remove uninstall-local recipes from Makefile.am files * Removed superfluous whitespace and hash
2019-11-11Makefile.am files indentation (#7252)Konstantinos Natsakis
* Use 4 spaces for indentation of non-recipe lines in Makefile.am files * Be more consistent in the use of space before = in Makefile.am files
2019-07-23Revert "netdata/packaging: Do not deliver edit-config as part of the ↵Pavlos Emm. Katsoulakis
distribution tarball (#6507)" This reverts commit 4a1c750a0c467eda9b77e31bfbcc75c92fcdd010. This causing problems, reverting and reworking the solution
2019-07-22netdata/packaging: Do not deliver edit-config as part of the distribution ↵Paul Emm. Katsoulakis
tarball (#6507) As part of #6165, we faced an issue with mac OS installation where edit-config file was havint the wrong variables setup. After deep investigation on the way Formulae was building netdata, we realized that generated edit-config was delivered together with the generated edit-conf, thus resulting on not re-creating it with the right variables. So the fix here is to not deliver edit-config with the distribution tarball, so that it gets generated as it should
2019-06-13Fix devuan support for initd (#6275)Paul Emm. Katsoulakis
* netdata/packaging: Support Devuan OS release - allow init.d installation for this distro * netdata/packaging: Cleanup netdata-lsb scriptlet 1) Dont depend on services we may or may NOT have available for monitoring 2) Fix comments 3) Use a more standard shebang, that will provide the right bash version
2019-03-18Fix path to pidfile in FreeBSD rc.d file (#5657)Honza Hommer
2018-12-18remove cross-directory dependency in build system (#5012)Paweł Krupa
* remove cross-directory dependency in build system * remove unused pythondir_POST replace sysconfdir/netdata with configdir
2018-11-08netdata-openrc: Move check from depends() function to start_pre() (#4575)Aaditya Bagga
check should be in start_pre() as its only needed when starting the service as opposed to depends() which can be called anytime to evaluate service dependencies
2018-11-02edit-config: Better support for custom editors. (#4551)Austin S. Hemmelgarn
* edit-config: Better support for custom editors. Some systems (Debian for example) don't use the `$EDITOR` environment variable to specify the preferred default editor. On most such systems, there is instead a symbolic link (or a shell script) called `editor` located somewhere in `$PATH` which will invoke the appropriate command. This updates the `edit-config` script to use this command if present in preference to just invoking `vi` as the editor. * Add missing quotes.
2018-10-16Fix make dist (#4401)Costa Tsaousis
* fix make dist; fixes #4400 * added daemon dir * fix edit-config in dist * removed config.h from file dependencies * do not attempt to detect stock files on vanilla installations * add missing files to dist * another fix for missing dist files * modular plugins are now self-configured for automake * updated lgtm * fix cncf urls
2018-10-15modularized all source code (#4391)Costa Tsaousis
* modularized all external plugins * added README.md in plugins * fixed title * fixed typo * relative link to external plugins * external plugins configuration README * added plugins link * remove plugins link * plugin names are links * added links to external plugins * removed unecessary spacing * list to table * added language * fixed typo * list to table on internal plugins * added more documentation to internal plugins * moved python, node, and bash code and configs into the external plugins * added statsd README * fix bug with corrupting config.h every 2nd compilation * moved all config files together with their code * more documentation * diskspace info * fixed broken links in apps.plugin * added backends docs * updated plugins readme * move nc-backend.sh to backends * created daemon directory * moved all code outside src/ * fixed readme identation * renamed plugins.d.plugin to plugins.d * updated readme * removed linux- from linux plugins * updated readme * updated readme * updated readme * updated readme * updated readme * updated readme * fixed README.md links * fixed netdata tree links * updated codacy, codeclimate and lgtm excluded paths * update CMakeLists.txt * updated automake options at top directory * libnetdata slit into directories * updated READMEs * updated READMEs * updated ARL docs * updated ARL docs * moved /plugins to /collectors * moved all external plugins outside plugins.d * updated codacy, codeclimate, lgtm * updated README * updated url * updated readme * updated readme * updated readme * updated readme * moved api and web into webserver * web/api web/gui web/server * modularized webserver * removed web/gui/version.txt
2018-09-30fix spdx (#4327)Paweł Krupa
2018-09-13 create pid directory, if not present (#4181)Costa Tsaousis
* create pid directory, if not present
2018-09-12remove condition from netdata.serviceCosta Tsaousis (ktsaou)
2018-09-11delete pidfile only when it existsCosta Tsaousis (ktsaou)
2018-09-11all startup files use the same pid file; all startup files remove pid file ↵Costa Tsaousis (ktsaou)
on exit
2018-09-11netdata pid is in run/netdata/netdata.pidCosta Tsaousis (ktsaou)
2018-09-11use pidfile to send HUP to netdata via logrotate; fixes #4103; fixes #4020Costa Tsaousis (ktsaou)
2018-09-10added info for giving netdata max priorityCosta Tsaousis (ktsaou)
2018-09-09when running under systemd, keep the scheduling parameters set by systemd, ↵Costa Tsaousis (ktsaou)
but report them to error.log
2018-05-31Add SPDX-License-Identifier headers to most files.Austin S. Hemmelgarn
This tags all the files that I can clearly identify as being part of Netdata and not a local copy of a third party package that we're redistributing.
2018-05-08install startup script on MacOS; fixes #3684Costa Tsaousis (ktsaou)
2018-04-03update openrc init scriptMatthew Thode
Quote variables where able. Switch to a more posix double 'and'. Remove unused variables. The exit timeout was fixed. We also remove fetching the configuration from the init script (it should not live in it). Further we define reload rotate and save commands to prevent the need to restart all the time.
2018-01-20more informative signals on freebsdCosta Tsaousis (ktsaou)
2018-01-20added freebsd init fileCosta Tsaousis (ktsaou)
2018-01-12fix permissions in spec fileCosta Tsaousis (ktsaou)
2017-10-04proper AND at openrc shellCosta Tsaousis (ktsaou)
2017-10-03Create the var/cache/netdata directory if it doesn't already exist in the ↵Craig Andrews
systemd script
2017-10-03Fix the path to the netdata executable in the openrc scriptCraig Andrews
Fixes #2826
2017-10-03Eliminate bashisms in openrc scriptCraig Andrews
2017-09-13start netdata after chronydCosta Tsaousis (ktsaou)
2017-08-30added comments about common netdata tweaksCosta Tsaousis (ktsaou)
2017-08-22properly set negative out-of-memory (OOM) scores; #2549Costa Tsaousis (ktsaou)
2017-08-22restart netdata on-failure; fixes #2617Costa Tsaousis (ktsaou)
2017-08-22increase service stop timeout to 60 secondsCosta Tsaousis (ktsaou)