Non-email notifications

  • Hi,


    I was wondering, if it's possible to extend the existing email notification system with something a little more "modern", like Pushbullet, for instance?
    AFAIK it should be pretty simple to use their API, so it's just a question of how the current notification system has been implemented - is it open for "overloading", ie is it event-based or something similar, which could be handled by a plugin?

    Atom 330 @ 1.6GHz, 4GB RAM
    2x3TB Data, 1x3TB Parity, SnapRAID + AUFS pool
    Latest OMV running on custom Debain Wheezy, 3.14 Backports kernel

  • To suggest another service, I use pushover for sickbeard. ;)


    @nslr it may be better to put this in the bugtracker as a feature request.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • One thing to consider with this type of feature is where it fits on the stack.


    My initial inclination is that while useful, things that depend on external services might not fit into the core server. This feel like plugin. However, as a pure plugin it can not send core notifications.


    This might be an interesting place to explore the relationship between core and plugins. Could volker add an abstraction layer to notifications while would enable a plugin developer to create a plugin which uses the service of their choice to push notifications?


    I haven't looked at the code enough to see if individual services send their own notifications of if they are sent centrally.

  • http://forums.openmediavault.o…s/?postID=48580#post48580']My initial inclination is that while useful, things that depend on external services might not fit into the core server. This feel like plugin. However, as a pure plugin it can not send core notifications.


    This might be an interesting place to explore the relationship between core and plugins. Could volker add an abstraction layer to notifications while would enable a plugin developer to create a plugin which uses the service of their choice to push notifications?


    This is exactly what I was aiming for.


    I like Pushbullet, @davidh2k likes Pushover, someone else prefers Growl - I don't expect any developer to support all of these services out-of-the-box, if only a handful of users actually use them.
    But it would be very nice to at least have to opportunity to install a simple plugin, to enable one of these services.
    Enabling these services through plugins would probably also make it a lot easier to fix stuff when API's change and what not.


    Now, I'm still pretty new to OMV (I've had it installed for a month or so), so I've no idea what's possible, and what's not, in regards to plugins.

    Atom 330 @ 1.6GHz, 4GB RAM
    2x3TB Data, 1x3TB Parity, SnapRAID + AUFS pool
    Latest OMV running on custom Debain Wheezy, 3.14 Backports kernel

    • Offizieller Beitrag

    Notifications are all emails, regardless if they are sent from cron, mdadm, monit, rsync, cron-apt, ... If you want to have them send a different way you NEED to implement something that is able to convert an email to something else. To do this i assume that this must be done in postfix which processes these emails and sends them to the configured SMTP server. I searched the net some times ago if there exists a plugin or something else that is able to do this transformation, but i did not find anything else.

  • Thanks a lot for the reply, I'll look into that when I get some free time ;)

    Atom 330 @ 1.6GHz, 4GB RAM
    2x3TB Data, 1x3TB Parity, SnapRAID + AUFS pool
    Latest OMV running on custom Debain Wheezy, 3.14 Backports kernel

  • So, for anyone interested, here's what I've done:


    Set up a local postfix-alias (in /etc/aliases), like this:

    Code
    pushbullet: |/var/spool/postfix/email2pushbullet.sh


    This will redirect all mail to "pushbullet@??" into the email2pushbullet.sh script.


    Here's the content of the script:



    <api-url-here> = https://api.pushbullet.com/v2/pushes (Right-click, copy link)


    I'm no postfix expert, so this info might not be enough, but as always: google is your friend :D


    I suspect this could easily be changed to support other API's out there @davidh2k


    Update 03-09-14: Added a for-loop to read every line of the provided message. Otherwise, only the first line would be sent.


    Update 08-09-14: There's an upper limit as the what can be sent using Pushbullet. I'm not sure what the actual limit is, but a semi-large Snapraid sync could not fit ;)

    Atom 330 @ 1.6GHz, 4GB RAM
    2x3TB Data, 1x3TB Parity, SnapRAID + AUFS pool
    Latest OMV running on custom Debain Wheezy, 3.14 Backports kernel

    9 Mal editiert, zuletzt von nslr ()

  • Nslr,


    Thanks for your heads up and the script. I was getting crazy trying to receive email notifications through a VPN that blocks 25, 465 and 587 ports. No whitelists available, and couldn't get the packet marking using iptables work.


    This solutions works and it takes 5 minutes to setup.

  • Would you mind explaining how to configure this. I like getting the email notification but would also like to have the pushbullet.
    Currently i have notification going through smtp.gmail.com and when i add in "pushbullet@??" to the secondary email it does not allow me to save the configuration. If i need to remove the smtp.gmail.com then what are the new settings.
    Thank you

  • Hello everuone!


    I've just tried to implement that so to get notifications via PushOver.


    I have created a Python script as follows.



    Unfortunately the variables does not seem to exist.
    I did try to run python PushOver.py and I get the following error.



    Code
    Traceback (most recent call last):
      File "PushOver.py", line 8, in <module>
        "subject": os.environ["OMV_NOTIFICATION_SUBJECT"],
      File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
        raise KeyError(key)
    KeyError: 'OMV_NOTIFICATION_SUBJECT'


    Would anyone have any suggestion?


    Thanks,
    Tommy

    HP MicroServer Gen 8
    HP DL360e Gen 8 + HP StorageWorks D2700

    HP DL380e Gen 8 + HP StorageWorks D2600

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!