Bug 493028 - Satellite Monitoring: Redirecting Notifications do not work
Summary: Satellite Monitoring: Redirecting Notifications do not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Monitoring
Version: 520
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks: sat54-errata
TreeView+ depends on / blocked
 
Reported: 2009-03-31 11:42 UTC by Miroslav Suchý
Modified: 2018-11-14 20:28 UTC (History)
12 users (show)

Fixed In Version: NPalert-1.126.15-2 nocpulse-common-2.1.19-3 perl-NOCpulse-Gritch-1.27.8-2
Doc Type: Bug Fix
Doc Text:
The Red Hat Network Satellite documentation provides information on how to redirect incoming notifications by including advanced notification rules in an acknowledgment email. Previously, this functionality was not reliable. With this update, the underlying source code has been modified to address this issue, and the notification redirects now work as expected.
Clone Of:
Environment:
Last Closed: 2011-03-28 13:35:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0389 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2011-03-28 13:35:17 UTC

Description Miroslav Suchý 2009-03-31 11:42:49 UTC
Description of problem:
We have in Satellite documentation:
http://www.redhat.com/docs/manuals/satellite/Red_Hat_Network_Satellite-5.2.0/html/Reference_Guide/s2-mon-notifs-redirs.html
But this notif redirs IMO never works (at least since 4.x what I remember)

We should either remove it from documentation of make the notif-redir working.

Version-Release number of selected component (if applicable):
sat530

How reproducible:
always

Comment 1 Miroslav Suchý 2009-03-31 11:47:04 UTC
I find that on one existing machine inherited from NOCpulse team, there is in aliases:
rogerthat:  "| /etc/smrsh/ack_enqueuer.pl"
So if we add to aliases:
rogerthat:  "| /usr/bin/ack_enqueuer.pl"
It may work, but we should test it.

Comment 35 Michael Mráka 2011-03-02 14:23:43 UTC
Fixed in spacewalk master by
commit e062e0bcee69781b420c32dfae89323911880ed3
    493028 - ack_enqueuer.pl must be linked from /etc/smrsh    
    to properly work in sendmail environment
commit 713b4fb4999e2577935b04aff1a6b1c3daae8b7c
    LWP::UserAgent is required by tesl.pl (tests run in buildtime)
commit 0c823501e1cb05fe3af887cfac908fd72cc1b92d
    493028 - directory for notifications should be created
commit 4cc3615ea27abbeaed70ba9137c6db180613ba7f
    493028 - select all but expired redirects
commit ded741a392d3a66215087833b104207e7d892add
    493028 - empty TZ is interpreted as GMT not local timezone; it must be unset
commit 1f78ede001e3a7d6964cb220f5facad3d123bed9
    493028 - dates in db are in localtime not GMT
commit 80f658595a320fd2bdcad867bba5a9801015919f
    493028 - get_sendmail() has been removed in ae8275b5435a56e322387c060ca5d91c5dc79ab1
commit 614d78e76f70047117a7cb5a54e6f2dc1dcb590b
    493028 - fixed active redirects query condition
commit a1416bfc15c1165c3f8a072402647aa102be8bd8
    493028 - simplified email check regexp
    original one tried to be so smart that didn't even allow root@localhost :-/

Fixed spacewalk packages NPalert-1.126.20-1, nocpulse-common-2.1.21-1, perl-NOCpulse-Gritch-1.27.9-1.

Comment 37 Michael Mráka 2011-03-07 11:04:34 UTC
Changes has been backported to SATELLITE-5.4:
commit 84ce2de64950bdf3934f8bfea9e5d906e47f671c
    493028 - ack_enqueuer.pl must be linked from /etc/smrsh   
    to properly work in sendmail environment
    (cherry picked from commit e062e0bcee69781b420c32dfae89323911880ed3)
commit ef9200959f081c94de096baec20b449ef5aece7d
    LWP::UserAgent is required by tesl.pl (tests run in buildtime)
    (cherry picked from commit 713b4fb4999e2577935b04aff1a6b1c3daae8b7c)
commit 9a341c0b0c179c70c02ed2896e41fc92e3dc9d9f
    493028 - directory for notifications should be created
    (cherry picked from commit 0c823501e1cb05fe3af887cfac908fd72cc1b92d)
commit be3ae1a328282a05b45561bb93fcaf6cf2f876af
    493028 - select all but expired redirects
    (cherry picked from commit 4cc3615ea27abbeaed70ba9137c6db180613ba7f)
commit 7a85289dbf5caca8343aad4096d9b6c63f0f0e49
    493028 - empty TZ is interpreted as GMT not local timezone; it must be unset
    (cherry picked from commit ded741a392d3a66215087833b104207e7d892add)
commit 94b3cbadbedf1a59ba2470e2a9fc8cbd5b0e64f0
    493028 - dates in db are in localtime not GMT
    (cherry picked from commit 1f78ede001e3a7d6964cb220f5facad3d123bed9)
commit eb2fd322d0ea91f5111552133f8cf272b0a88e00
    493028 - get_sendmail() has been removed in ae8275b5435a56e322387c060ca5d91c5dc79ab1
    (cherry picked from commit 80f658595a320fd2bdcad867bba5a9801015919f)
commit af5788e45ccef7fe36d8e385259ac56955655020
    493028 - fixed active redirects query condition
    (cherry picked from commit 614d78e76f70047117a7cb5a54e6f2dc1dcb590b)
commit 2b086a89f034203896b02674d510844cd346b288
    493028 - simplified email check regexp
    original one tried to be so smart that didn't even allow root@localhost :-/
    (cherry picked from commit a1416bfc15c1165c3f8a072402647aa102be8bd8)

Comment 39 Michael Mráka 2011-03-07 12:49:04 UTC
Test plan:
* enable monitoring
* create a failing probe (e.g. networking > http on host without web server)
* check that satellite sends monitoring notifications to admin
* create notification filter in webUI (Monitoring > Notifications > Filters) and check it works
* enable email acknowledgement of notifications:
  echo 'rogerthat01:    "| /etc/smrsh/ack_enqueuer.pl"' >>/etc/aliases
  newaliases
* create notification redirect via email - replay to monitoring notification email with a message matching regexp
  (ack|nack) (autoack|metoo|redir|suspend)\s+(host|check)\s+(\d+[hmd])(\s+(\S*))?
Eg. ack metoo host 1h some
* check that email redirects are visible among notification filters
* check that email redirects work

Comment 40 Florian Nadge 2011-03-09 09:55:47 UTC
Please be so kind and try to add a few key words to the technical note of this
bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:


For details, see:
https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Thanks

Comment 41 Florian Nadge 2011-03-09 09:55:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    What actions or circumstances induced the feature request.
Consequence
    What action was inhibited by the feature’s absence.
Change
    What was done to implement the feature.
    Note: backported from upstream is not an explanation.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the feature request was fulfilled.

Comment 42 Michael Mráka 2011-03-10 09:12:22 UTC
Monitoring redirects via email are disabled by default. To enable them add
following line to /etc/aliases:
 rogerthat01:    "| /etc/smrsh/ack_enqueuer.pl"

The format of ack message is:
[ack|nack] [autoack|metoo|redir|suspend] [host|check] [hmd])(\s+(\S*))?
Eg. ack metoo host 1h some

For the full Monitoring Notification Documentation see
http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/5.4/html/Reference_Guide/s1-mon-notifs.html

Comment 52 Jaromir Hradilek 2011-03-16 10:21:05 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,3 +1 @@
-CCFR:
+The Red Hat Network Satellite documentation provides information on how to redirect incoming notifications by including advanced notification rules in an acknowledgment email. Previously, this functionality was not reliable. With this update, the underlying source code has been modified to address this issue, and the notification redirects now work as expected.-* notif redirs IMO never works (at least since 4.x what I remember)
-* now, redirections are processed correctly

Comment 53 Michael Mráka 2011-03-18 14:52:45 UTC
Restart issue has been fixed in spacewalk git by 
commit 89f98593cd632a077f9f25201b707d021e281f19
    fixed ownership of NOCpulse/tmp directory

Comment 54 Michael Mráka 2011-03-18 14:57:11 UTC
The last change backported int SATELLITE-5.4 as
commit 9010aa24cae96566dcf03c6e07812f26fa06acc2
    fixed ownership of NOCpulse/tmp directory
    (cherry picked from commit 89f98593cd632a077f9f25201b707d021e281f19)

Comment 56 Pavel Novotny 2011-03-22 16:00:16 UTC
Taking the QA contact of this bug.

Comment 57 Pavel Novotny 2011-03-25 14:48:34 UTC
Verified.

Old packages:

NPalert-1.126.15-1.el5sat
perl-NOCpulse-Gritch-1.27.8-1.el5sat
nocpulse-common-2.1.19-1.el5sat

I have created a notification filter via WebUI and/or by mail reply (according to comment #39), but no email was redirected to the new email address. 


New packages:

NPalert-1.126.15-2.el5sat
perl-NOCpulse-Gritch-1.27.8-2.el5sat
nocpulse-common-2.1.19-3.el5sat

Redirection of mail notifications works fine.
I tried both methods for creating a notification filter with redirection (WebUI, mail reply) and both procedures were successful.
Also the need to restart monitoring services has been fixed.

Comment 58 errata-xmlrpc 2011-03-28 13:35:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0389.html


Note You need to log in before you can comment on or make changes to this bug.