-
Notifications
You must be signed in to change notification settings - Fork 587
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
Avoid e-mail spam on NUT communication errors #359
Conversation
With many UPS models (especially some APC models like RS800), sometimes NUT misinterprets the communication link status, it changes from COMMOK to COMMBAD and vice-versa multiple times a second, and this can continue for several seconds. When one has e-mail notifications enabled, spam occurs, about a dozen of e-mails are thorwn to the user at once. This change removes COMMOK and COMMBAD notification flags from the e-mail notification command. These flags will still cause them to be logged, they are only removed from the e-mailing command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to bump the package version in the Makefile as well.
Suppressing emails for communication errors across the board is not the way to handle flakey UPS or USB connections. Before you do anything else, please look at the NUT tunables. |
Thanks jim-p, done. |
@dennypage, I agree with your comments, though there's no such "tunable" in NUT configuration, as far as I could see. There is "upssched", but that is not really implemented yet in this package, and that won't supress these message, it would only make the system send you one message instead of many, and with a configurable delay, but you'd still get them. The best option would be, IMHO, to expose all the NOTIFYFLAG options in the web interface to the user, and allow custom selections via checkboxes for each flag. But that's a whole different story. Another option maybe to parse the contents of "Additional configuration lines for upsmon.conf" from the web interface and match them with the contents of nut.inc, so that double configuration items would not appear - but that's not how it works now. Currently all the configs entered here are added to what's in nut.inc - which is pretty wrong, since nut.inc already contains most of what upsmon.conf can ever contain. Any config line entered here in the web interface is just simply added to upsmon.conf - resulting in duplicate config items. This is just a "quick and dirty fix" for now, until proper web interface configuration will be created either way. It's not just me affected. |
This is not a quick and dirty fix. For most users this change would introduce a serious defect.
You have a flakey ups or a flakey USB connection. If you are unable to fix this core issue, please explore the common NUT work-arounds. Look at the polling interval.
… On May 27, 2017, at 01:06, nagyrobi ***@***.***> wrote:
@dennypage, I agree with your comments, though there's no such "tunable" in NUT configuration, as far as I could see. There is "upssched", but that is not really implemented yet in this package, and that won't supress these message, it would only make the system send you one message instead of many, and with a configurable delay, but you'd still get them.
The best option would be, IMHO, to expose all the NOTIFYFLAG options in the web interface to the user, and allow custom selections via checkboxes for each flag. But that's a whole different story.
Another option maybe to parse the contents of "Additional configuration lines for upsmon.conf" from the web interface and match them with the contents of nut.inc, so that double configuration items would not appear - but that's not how it works now. Currently all the configs entered here are added to what's in nut.inc - which is pretty wrong, since nut.inc already contains most of what upsmon.conf can ever contain. Any config line entered here in the web interface is just simply added to upsmon.conf - resulting in duplicate config items.
This is just a "quick and dirty fix" for now, until proper web interface configuration will be created either way. It's not just me affected.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sorry but pollinterval is not something that could be effective here. |
Have you tried it? It's commonly used to help flakey connections.
… On May 27, 2017, at 23:55, nagyrobi ***@***.***> wrote:
Sorry but pollinterval is not something that could be effective here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
While we're at it, some things you should try to address your core issue:
- Try a different USB port. Pay attention to whether the port is native 1.1 or bridged. Native ports generally works better than bridged. If bridged, see if you have ports on a different bridge chip.
- USB hubs usually cause problems with UPS units. However, if the problem is a flakey motherboard bridge chip, they can actually help by introducing a different bridge chip. You can also buy cables with built-in bridge chips, but a hub is usually cheaper. Be sure to use a powered one.
- Try a different USB cable. Higher quality.
… On May 27, 2017, at 23:55, nagyrobi ***@***.***> wrote:
Sorry but pollinterval is not something that could be effective here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Fwiw, I looked around and didn't find people complaining about issues using the rs-800 with nut, so I would assume that the problem is with the cable, motherboard or USB driver.
… On May 28, 2017, at 10:52, Denny Page ***@***.***> wrote:
While we're at it, some things you should try to address your core issue:
- Try a different USB port. Pay attention to whether the port is native 1.1 or bridged. Native ports generally works better than bridged. If bridged, see if you have ports on a different bridge chip.
- USB hubs usually cause problems with UPS units. However, if the problem is a flakey motherboard bridge chip, they can actually help by introducing a different bridge chip. You can also buy cables with built-in bridge chips, but a hub is usually cheaper. Be sure to use a powered one.
- Try a different USB cable. Higher quality.
> On May 27, 2017, at 23:55, nagyrobi ***@***.***> wrote:
>
> Sorry but pollinterval is not something that could be effective here.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking at the comments, this change should probably not be made as-is. If you make a GUI option to change the behavior, and the behavior defaults to the existing behavior, then that could be accepted.
In an effort to improve the tracking of changes and bug/feature requests, we have decided to require an entry on the pfSense Redmine issue tracker associated with every pull request, and likewise the Redmine entry should also have a link back to the pull request. If you could, please associate this PR to a Redmine issue either by locating an existing issue at https://redmine.pfsense.org or by creating a new issue. Add a link to the Redmine issue that points to this PR, and also add a link on the PR to the Redmine issue. For more information, see https://doc.pfsense.org/index.php/Submitting_a_Pull_Request_via_Github Thanks! |
No answers from submitter since last @jim-p comment on last July. If you decide to work on it again please re-open or re-submit |
* The cp1252 encoding is used when charset is "latin1". (#390) * The auth_plugin option is added. (#389) * charset option is passed to mysql_options(mysql, MYSQL_SET_CHARSET_NAME, charset) before mysql_real_connect is called. This avoid extra SET NAMES <charset> query when creating connection. * --static build supports libmariadbclient.a * Try mariadb_config when mysql_config is not found * Fixed warning happend in Python 3.8 (#359) * Fixed SEGV MySQLdb.escape_string("1") when libmariadb is used and no connection is created. (#367) * Fixed many circular references are created in Cursor.executemany(). (#375) PR: 243076 Submitted by: fluffy Approved by: maintainer timeout (>1w)
Recent changes since MooseFS 3.0.112: * MooseFS 3.0.113-1 (2020-05-04) - (master) removed unnecessary debug syslog messages - (check) increased usleep tolerance due to some operating systems (issue #351) - (master) changed condition that decides if master should wait for more chunks during I/O - (mount) delayed setting channel for fuse notifications (very rare segfault in libfuse2 during init) - (client+master) changed conditions for ancestor test in getattr (issue #350) - (cs) added parameter for number of chunks to be send in single register packet - (cs) fixed reporting damaged chunks in testing function (issue #352) - (cs) removed some unnecessary damaged chunk notifications - (client) changed open test in setattr (related to issue #350) - (master) fixed handling truncate for open files (related to issue #350) - (master) added uid mapping in setfacl function - (master+client) added support for atomic truncate with open - (master+client) fixed keep cache conditions - (cs) introduced official label format defined in chunkserver configuration - (nbd) added readonly mode and locking - (cs) fixed condition in choosing disks for internal rebalance - (mount) added workaround in access for a bug in FreeBSD kernel (issue #354) - (cs) fixed master reconnection conditions (reload usually shouldn't cause reconnection) - (freebsd) fixed FreeBSD port (makeports.sh) - (master) changed disk removal detection algorithm (issue #356) - (cs) fixed calculating size limits - (cs) added handling inode limits in local filesystems on chunkservers (issue #358) - (master) added topology grouping when new chunks are about to be created (prefer closer servers) - (master) added more error messages to bgsaver - (cs) added changing subfolder during internal rebalance (related to issue #326) - (master+cs) added optional logging of long function execution times - (all) fixes of small errors found by static code analysers - (mount) turn off dentry invalidator for Linux kernels >= 4.19 (related to issue #357) - (master) changed condition that checks timestamp in changelogs (less prone to small clock differences) - (daemons) added time refresh function (for future use) - (cgi+cli) changed mark for removal state name UNKNOWN->PENDING (related to issue #359) - (client) decreased max IDLE time in writer module from 1s to 0.1s - (client) update inode in dentry invalidator - (tools) fixed mfscopyeattr, mfsseteattr and mfs*arch tools - (master+client) added support for new eattrs: immutable, appendonly, undeletable (setting new undeletable extra attribute appropriately can help with issues like #357) - (client) silenced "kern.proc.filedesc" syslog messages on FreeBSD (issue #360) PR: 246416 Submitted by: MooseFS FreeBSD Team <[email protected]> (maintainer)
Changelog: * Fixed: Version `Qt_5.15' not found (required by /usr/bin/ksnip). (#712) * Fixed: CI packages show continuous suffix for tagged build. (#710) * Fixed: kImageAnnotator not translated with deb package. (#359) * Fixed: Windows packages increased in size. (#713) * Fixed: The string 'Actions' is not available for translation. (#729) * Fixed: HiDPI issue with multiple screen on Windows. (#668) * Fixed: Snipping Area not closing when pressing ESC. (#735) * Fixed: Sometimes "Snipping Area Rulers" not shown after starting rectangular selection. (#684) * Fixed: Cursor not positioned correctly when snipping area opens. (#736) * Fixed: Mouse cursor not captured when triggered via global shortcut. (#737) * Fixed: Dual 4K screens get scrambled on X11. (#734) * Fixed: VCRUNTIME140_1.dll was not found. (#743) * Fixed: Screenshot area issue when monitor count changes on Windows. (#722) * Fixed: Wayland does not support QWindow::requestActivate(). (#656) * Fixed: Wrong area is captured on a Wayland screen scaling. (#691) * Changed: Enforce xdg-desktop-portal screenshots for Gnome >= 41. (#727) * Fixed kImageAnnotator: Crash while typing text on wayland. (#256) * Changed kImageAnnotator: Show scrollbar when not all tools visible. (#258)
Changes since 0.3.0: We reached v1.0.0 - fix!: Replace limit flag with paginate by @ankitpokhrel in #359 - fix!: Append components on edit instead of overriding by @ankitpokhrel in #368 - feat!: Append label to an issue, show labels at issue list view by @stchar in #300 - refactor!: Move boards and project list to subcommand by @ankitpokhrel in #314 - feat: Support custom fields on issue create by @ankitpokhrel in #319 - feat: Add support to read from .netrc by @adolsalamanca in #329 - feat: Add support for OS keyrings/-chains by @boyvanamstel in #348 - feat: Support auth with personal access tokens by @marek-veber / @ankitpokhrel in #327 - feat: Allow to set fixVersions on issue creation by @ankitpokhrel in #276 - feat: Allow insecure TLS by @ankitpokhrel in #305 - feat: Add --no-browser option to open cmd by @ankitpokhrel in #308 - feat: Add search option for boards on jira init by @ankitpokhrel in #322 - feat: Add issues unlink command by @sushilkg in #347 - feat: Support refresh for issues list by @GZLiew in #325 - feat: Ability to delete issue by @ankitpokhrel in #336 - feat: Allow to set custom fields on epic create by @ankitpokhrel in #364 - feat: Allow to edit release-info/fixVersions by @ankitpokhrel in #365 - feat: Allow removing labels on edit by @ankitpokhrel in #371 - feat: Support creating issues with custom subtask type by @danobi in #372 - feat: Allow removing component on edit by @ankitpokhrel in #374 - feat: Allow removing fixVersions on edit by @ankitpokhrel in #376 - feat: Support custom fields on issue edit by @ankitpokhrel in #377 - feat: Jira init non-interactive by @ankitpokhrel in #381 - feat: Show subtasks in issue view by @ankitpokhrel in #382 - feat: Allow project filter in raw jql by @ankitpokhrel in #395 - fix: Makefile compatiblity with Make 3.81 by @danmichaelo in #252 - fix: Config generation issue by @ankitpokhrel in #275 - fix(cfg): Strip trailing slash on server name by @ankitpokhrel in #295 - fix: Jira client should respect timeout opt by @ankitpokhrel in #304 - fix: Respect GLAMOUR_STYLE env on issue view by @ankitpokhrel in #317 - fix: Get subtask handle from config by @ankitpokhrel in #296 - fix: Jira wiki parser by @ankitpokhrel in #326 - fix: Display correctly columns in list sprint command help by @adolsalamanca in #320 - fix: Panic on empty sub-list by @ankitpokhrel in #330 - fix: Issue with assigning user by @ankitpokhrel in #321 - fix: OOM bug on issue view by @ankitpokhrel in #350 - fix: Assign parent key as is on edit by @ankitpokhrel in #351 - fix: Add additional check for total boards returned by @ankitpokhrel in #360 - fix: Issue with query param in user assignment by @ankitpokhrel in #380 - fix: Subtask clone by @ankitpokhrel in #383 - fix: editing issue with custom field in non interactive mode by @DrudgeRajen in #391 - dep: Upgrade charmbracelet/glamour to 0.5.0 by @ankitpokhrel in #309 - dep: Upgrade rivo/tview to latest by @ankitpokhrel in #310 - dep: Upgrade outdated packages by @ankitpokhrel in #311 - dep: Upgrade cobra to 1.4.0 by @ankitpokhrel in #373 - Use md ext for tmp file to trigger vim syntax by @ElementalWarrior in #318 Full Changelog: ankitpokhrel/jira-cli@v0.3.0...v1.0.0
With many UPS models (especially some APC models like RS800), sometimes NUT misinterprets the communication link status, it changes from COMMOK to COMMBAD and vice-versa multiple times a second, and this can continue for several seconds. When one has e-mail notifications enabled, spam occurs, about a dozen of e-mails are thorwn to the user at once. This change removes COMMOK and COMMBAD notification flags from the e-mail notification command. These flags will still cause them to be logged, they are only removed from the e-mailing command.