Enhancement #2291

NUT: add option to enable mail notification

Added by Giacomo Sanchietti almost 8 years ago. Updated over 7 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-nut
Target version:v6.5-beta3
Resolution: NEEDINFO:No

Description

Add an option to enable/disabled notification about changes on ups status.

See NOTIFYCMD in /etc/ups/upsmon.conf.

Script from SME:

#! /bin/sh
# UPS notify script.

/bin/mail -s "$UPSNAME: $NOTIFYTYPE" admin <<END
$*
END


Related issues

Related to NethServer 6 - Feature #2492: Move admin user in LDAP DB CLOSED 12/17/2013 12/19/2013

Associated revisions

Revision 1553586b
Added by Giacomo Sanchietti over 7 years ago

upsmon.conf template, db defaults: add notification support. Refs #2291

Revision d23c2a1b
Added by Davide Principi over 7 years ago

Send UPS/nut messages to root account. Refs #2492

History

#1 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20
  • Estimated time set to 1.00

#2 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#3 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#4 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Packages in nethserver-testing:
  • nethserver-nut-1.0.5-2.0git1553586b.ns6.noarch.rpm
Test case
  • Install the new package
  • Enable the notification:
    config setprop ups Notify enabled
    signal-event nethserver-nut-update
    
  • Configure a dummy ups
    cat <<EOF > /etc/ups/auto 
    ups.status: OL
    TIMER 10
    ups.status: OB
    TIMER 10
    EOF
    config setprop ups Model dummy-ups
    signal-event nethserver-nut-update
    upsdrvctl start UPS
    
  • Check notifications are sent to admin user

#5 Updated by Davide Principi over 7 years ago

  • Assignee set to Davide Principi

#6 Updated by Davide Principi over 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

VERIFIED

NOTE:
nethserver-nut|d23c2a1b8e56
I've pushed a patch that sends notifications to root, instead of admin (see #2492).

#7 Updated by Davide Principi over 7 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

Released in nethserver/6.5/base repository.

Also available in: Atom PDF