Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

health_alarm_notify Being Overwritten #5669

Closed
Salad360 opened this issue Mar 19, 2019 · 5 comments
Closed

health_alarm_notify Being Overwritten #5669

Salad360 opened this issue Mar 19, 2019 · 5 comments
Assignees
Labels
area/packaging Packaging and operating systems support feature request New features

Comments

@Salad360
Copy link

Salad360 commented Mar 19, 2019

Bug report summary
OS / Environment

Ubuntu Server 18.04 / Raspbian 9.8

Netdata version (ouput of netdata -V)

1.13.0-8-nightly

Component Name
Steps To Reproduce

Install Netdata, edit notification file and let is sit two weeks

Expected behavior

Not having the file revert to default settings.

@Salad360
Copy link
Author

I run netdata on two servers running Ubuntu Server 18.04 and one Raspberry Pi running raspbian 9.8. After not receiving one notification from any of these devices for over two weeks I ran the alarm-notify test script to see what was going on only to discover that notifications weren't getting out because the titular file got reverted to default, presumably due to an update.

This is really annoying, how can I avoid having this happen?

@netdatabot netdatabot added bug needs triage Issues which need to be manually labelled labels Mar 19, 2019
@cakrit
Copy link
Contributor

cakrit commented Mar 20, 2019

You should use /etc/netdata/edit-config, or copy the stock config file to /etc/netdata first and then edit it.

We keep seeing these types of issues and I'm sure we can do better here. @ktsaou, @paulkatsoulakis and @Ferroin, how about making the stock config files read only? Since the installer, updater and uninstaller all run as root, we shouldn't have a problem replacing them anyway.

@cakrit cakrit added feature request New features area/packaging Packaging and operating systems support and removed bug needs triage Issues which need to be manually labelled labels Mar 20, 2019
@nyetwurk
Copy link

nyetwurk commented Apr 9, 2019

Is there a way to only include a subset of the items in an /etc/netdata config that overrides default, or does the entire config file have to be copied?

e.g. create a file /etc/netdata/health.d/local.conf
that contains only

   alarm:  1m_tcp_syn_queue_drops
   warn: $this > 1

or even

   alarm:  1m_tcp_syn_queue_drops
   warn: 

or

   alarm:  1m_tcp_syn_queue_drops
   to: silent

to disable the warning entirely?

This way, if upstream changes the defaults, copying the file around and modifying it AGAIN isn't necessary, and all upstream defaults follow whatever happens upstream, and only the local customizations get applied.

This problem has been solved in many other software packages; namely, they have defaults built in, and a place to put files that only override behavior/settings, without having to completely copy/paste the original settings. In a normal system daemon (e.g. not containerized), the configuration IS read only, both in /etc and in /usr/lib or what have you. Defaults are in /usr/lib (which can be safely replaced by an installer) and root adds customizations in /etc, which DO NOT GET TOUCHED on install/upgrade/etc.

I don't pretend to understand why netdata takes the approach it does; it seems naive and unaware of normal best practices about keeping upstream defaults distinct from local customizations, unless I'm missing something.

@cakrit
Copy link
Contributor

cakrit commented Apr 12, 2019

You're right @nyetwurk and it is something that we'd like to change, but it won't be done with small patches. We have discussed the needs of proper, modern configuration management processes, so it's one of the big initiatives on our roadmap. We just haven't prioritized it yet, based on user feedback (our survey).

@paulkatsoulakis paulkatsoulakis added this to Not Started - User issues in Paul's backlog Apr 23, 2019
@paulkatsoulakis paulkatsoulakis moved this from Not Started - User issues to Not Started - Development in Paul's backlog May 2, 2019
@paulkatsoulakis paulkatsoulakis removed this from Not Started - Development in Paul's backlog Jun 18, 2019
@cakrit
Copy link
Contributor

cakrit commented Jul 18, 2019

Closing in favor of #6432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support feature request New features
Projects
None yet
Development

No branches or pull requests

5 participants