Administrators Paul Posted October 25, 2013 Administrators Share Posted October 25, 2013 (edited) Hi everyone, Use this plugin to open up a local WCF using net pipes so that a console application can use it to sent notifications to Pulseway. Using this solution you can easily send Pulseway notifications from your scripts. Version 1.3 =Installation= Add the NotificationBridgePlugin.dll plugin into Pulseway Manager -> Plugins. Configure your scripts to call NotificationBridge console application. =Usage= -p (Priority: 0=Low, 1=Normal, 2=Elevated, 3=Critical) -t (Text message, use double quotes if the message includes a space) -f (Include the text from a file) -r (Allow repeating notifications) Exit Codes: 0 - Notification was successfully forwarded to Pulseway 1 - Notification was rejected by Pulseway (Maintenance mode, Old notification was not deleted, Pulseway is stopped. As always my plugin is open-source bound by no license. You may claim it your own. Source Code: https://bitbucket.org/paulcsiki/notification-bridge-plugin/src Download Link: Click Paul. Edited September 10, 2019 by Paul release 1.3 Jeremy, Edd, JHimmelbauer and 1 other 4 Link to comment Share on other sites More sharing options...
JHimmelbauer Posted October 26, 2013 Share Posted October 26, 2013 Great plugin Paul! It would be perfect if you can add in one of the next versions the options <message priority>, <message subject> <message text> optional <message file> like: NotificationBridge.exe -p 1 -s "Backupjob Success" -t "1248 MB saved" or NotificationBridge.exe -p 3 -s "Backupjob Error" -f "c:\batch\backup.log" (-p 0=Low, 1=Normal, 2=Elevated, 3= Critical). Repeating notifications should be possible. This Syntax will give script or batchfiles in combination with variables a optimal notification System! I do this currently via EventCreate command and PCM Event Log notification but your NotificationBridge plugin would be more sexy ;-) Lg. Sepp Paul 1 Link to comment Share on other sites More sharing options...
Administrators Paul Posted February 4, 2014 Author Administrators Share Posted February 4, 2014 Great plugin Paul! It would be perfect if you can add in one of the next versions the options <message priority>, <message subject> <message text> optional <message file> like: NotificationBridge.exe -p 1 -s "Backupjob Success" -t "1248 MB saved" or NotificationBridge.exe -p 3 -s "Backupjob Error" -f "c:\batch\backup.log" (-p 0=Low, 1=Normal, 2=Elevated, 3= Critical). Repeating notifications should be possible. This Syntax will give script or batchfiles in combination with variables a optimal notification System! I do this currently via EventCreate command and PCM Event Log notification but your NotificationBridge plugin would be more sexy ;-) Lg. Sepp Sorry about the late reply. What do you mean about the message file. Would you like me to open the file and append it's contents to the notification? Link to comment Share on other sites More sharing options...
JHimmelbauer Posted February 4, 2014 Share Posted February 4, 2014 correct,, eg. to send the result of a command in a script to the notification queue like netstat > c:\temp\netstat.log notificationbridge.exe -p 0 -s "Netstat resut" -f "c:\temp\netstat.log" (date, time, computer and group should be includet in the notification) Link to comment Share on other sites More sharing options...
sgarriques Posted February 11, 2014 Share Posted February 11, 2014 Any update on this? This would be very cool Link to comment Share on other sites More sharing options...
Administrators Paul Posted February 11, 2014 Author Administrators Share Posted February 11, 2014 I am currently working on an updated version of the plugin. I will let you know when it's finished. Link to comment Share on other sites More sharing options...
Martin Stevnhoved Posted December 4, 2014 Share Posted December 4, 2014 Just stumpled upon this plugin. It has great potentials! I would be nice it were possible to set the notifigation level, so it could be anything else than normal. If I send an notification, all other notifications are ignores until the first notification has been removed. It would be better if it was possible to group them, so it was only the same notifications that was ignored. Br, Martin. Link to comment Share on other sites More sharing options...
Administrators Paul Posted December 4, 2014 Author Administrators Share Posted December 4, 2014 (edited) Hi Martin, Thanks, I'll add this feature soon. Paul Edited December 4, 2014 by Paul Link to comment Share on other sites More sharing options...
Administrators Paul Posted December 6, 2014 Author Administrators Share Posted December 6, 2014 I've updated the plugin, check the first post for updated usage. Link to comment Share on other sites More sharing options...
itzen Posted October 10, 2015 Share Posted October 10, 2015 What an awesome idea Paul. Being able to have applications that aren't natively supported by Pulseway send notifications through it is a great idea to keep all monitoring consolidated in the one app.I've given it a try and it hasn't worked for me. I just get the message "Pulseway refused the notification". The command I ran was 'notifictionbridge.exe -p 1 -t "message"', and Windows version is Server 2008 (6.0.6002).Any tips for fixing this would be appreciated. Link to comment Share on other sites More sharing options...
Administrators Paul Posted October 23, 2015 Author Administrators Share Posted October 23, 2015 Hi,Thank you for using my plugin. I think that the plugin worked once and then it stopped working because you didn't delete the first notification you've triggered. When I wrote the plugin I didn't mark the notification as repeatable to prevent scripts from spamming the Pulseway service.One could always modify the following line:https://bitbucket.org/paulcsiki/notification-bridge-plugin/src/860e9fb9c857a0b7f7164062e72c3c9f323b8356/Source/NotificationBridgePlugin/NotificationBridgeService.cs?at=master&fileviewer=file-view-default#NotificationBridgeService.cs-45Here is the full method signature that Pulseway exposes for plugins:bool SendNotificationToAllDevices(string message, NotificationPriority priority, bool allowMultipleNotifications = false)As you may have guessed, the last parameter if set to true, Pulseway will allow repeated notifications for the NotificationBridge plugin.Paul Link to comment Share on other sites More sharing options...
p1r473 Posted November 10, 2015 Share Posted November 10, 2015 I'm getting an error when trying to invoke this plugin. C:\Program Files\Pulseway>NotificationBridge.exe -p 1 -t "test" There was no endpoint listening at net.pipe://localhost/NotificationBridge that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. Link to comment Share on other sites More sharing options...
Administrators Paul Posted November 10, 2015 Author Administrators Share Posted November 10, 2015 Hi, Have you installed the plugin in Pulseway Manager -> Plugins ? Is the Pulseway service started? Try restarting the Pulseway service. Paul Link to comment Share on other sites More sharing options...
p1r473 Posted November 11, 2015 Share Posted November 11, 2015 Hi, the plugin is installed, yet same problem! The service would not let me restart it, but I did restart the whole computer, same problem. Also, could you release the file with the multiple notifications allowed to be sent? bool allowMultipleNotifications = false Recompiling the code with those changes is beyond my skills Thanks Link to comment Share on other sites More sharing options...
Administrators Paul Posted November 11, 2015 Author Administrators Share Posted November 11, 2015 (edited) Hi, I still believe that the plugin is not correctly installed. I will update the plugin tonight to support repeating notifications. Edit: I've updated the first post with a new version of the plugin that supports repeating notifications, try again with the version 1.2 and see if you still get connection errors. Paul Edited November 11, 2015 by Paul Link to comment Share on other sites More sharing options...
qsoftsys Posted January 14, 2016 Share Posted January 14, 2016 Hi Paul, Any chance of a Linux version of this excellent plugin ? I'm working with more and more Linux based systems now and find the Linux agent lacking when compared to the Windows version. There are a number of ways we could create custom notifications on Windows but cannot find any way to do it on Linux systems. Thanks. Kelvin Link to comment Share on other sites More sharing options...
Staff Chris Posted January 15, 2016 Staff Share Posted January 15, 2016 Hi Kelvin, Thank you for your feedback. We do plan on having support for sending notifications from the command line on Linux too. Chris Link to comment Share on other sites More sharing options...
qsoftsys Posted January 19, 2016 Share Posted January 19, 2016 Hi Chris, Thanks for the reply. Any timeline on this ? Might save me the effort of looking at alternatives in the interim because realistically, the current limitation is a big issue for us. Regards, Kelvin Link to comment Share on other sites More sharing options...
Staff Chris Posted January 19, 2016 Staff Share Posted January 19, 2016 Hi Kelvin, Unfortunately we don't have any ETA for the Linux port of the notification bridge plugin. We apologize for the inconvenience. Chris Link to comment Share on other sites More sharing options...
Przemyslaw Klys Posted April 12, 2018 Share Posted April 12, 2018 Hello Paul, i know it's been a while but I tried to use your notification plugin but it sends multiple notifications. So I've jumped into the code and modified it with "false" and tried to use "notification id" so that it's always the same ... and it still allows multiple notifications. I've added -m -i parameters to your notifications.exe to support this and added nessecary changes to plugin itself but fort some reason it just displays all that is coming. Did something change? Could you update your code to support "choice"? it used to be do not allow multiple notifications but now it's different. Link to comment Share on other sites More sharing options...
BiofilmIT Posted May 17, 2018 Share Posted May 17, 2018 (edited) In the web interface I can run this command in powershell and I will get a message: & "C:\Scripts\Pulseway\Addin\NotificationBridge.exe" @('-p', 1, '-t', "message") If I save that exact line as a script and run the script on the server through the web interface I get this error: There was no endpoint listening at net.pipe://localhost/NotificationBridge that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. How can I use the Notification Bridge with a script saved in Pulseway? Thanks Edited May 17, 2018 by BiofilmIT Link to comment Share on other sites More sharing options...
Administrators Paul Posted May 23, 2018 Author Administrators Share Posted May 23, 2018 It's possible that you've setup powershell impersonation in the Pulseway Manager -> Settings -> Runtime and the user you're impersonating the scripts is not part of the local Administrators group. -Paul Link to comment Share on other sites More sharing options...
Mario Posted July 17, 2018 Share Posted July 17, 2018 (edited) Thanks for this thread. It's been pretty insightful and we've been working hard to implement it in our enterprise. A couple questions to make sure we're taking the right approach for optimal execution. We're copying the dll and .exe file from our network repo to the local machines across the enterprise We're going to elevate the Powershell permissions under the Pulseway Manager running locally from under the Settings tab and then under runtime at the bottom, the part titled PowerShell User Agent and we're filling the necessary fields there (user, pass and domain) We're then executing a powershell script to push the registry entries and referencing where we copied the executable and dll, in this case, ""C:\scripts\Notification Bridge 1.2\Release\NotificationBridgePlugin.dll" Set-ItemProperty -Path "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\Plugins" -Name Count -Value "1" New-Item -Path "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\Plugins" -Name Plugin0 New-ItemProperty -Path "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\Plugins\Plugin0" -Name ClassName -Value "NotificationBridgePlugin.NotificationBridgePlugin" New-ItemProperty -Path "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\Plugins\Plugin0" -Name Description -Value "A bridge between Pulseway notification system and scripts." New-ItemProperty -Path "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\Plugins\Plugin0" -Name FileName -Value "C:\scripts\Notification Bridge 1.2\Release\NotificationBridgePlugin.dll" New-ItemProperty -Path "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\Plugins\Plugin0" -Name Name -Value "Notification Bridge" And then restarting all our machines for the registry addition to take effect. At that point, we think all the machines running Pulseway will then be able to fire off the NotificationBridge commands and have the mothership detect them and put them in the alerts area. Does that sound about right? I hope we're not over thinking this. Appreciate any input, and I included the above for posterity in the hopes it might help someone attempting to do the same thing. Thanks! Mario Edited July 18, 2018 by Mario Was looking for subscribe to response button! Link to comment Share on other sites More sharing options...
Customer333 Posted March 25, 2019 Share Posted March 25, 2019 Hello. Why is the PCMonitorClient.dll in the NotificationBridge1.2.zip file? I guess pulseway must be installed on the system and it has a newer PCMonitorClient.dll. Or can i use NotificationBridge without install pulseway? Many thanks Link to comment Share on other sites More sharing options...
Administrators Paul Posted March 25, 2019 Author Administrators Share Posted March 25, 2019 I'd just copy the NotificationBridge.dll file from the archive into the Pulseway installation folder and use it from there. You cannot use the notification bridge application without Pulseway installed (including the plugin configured) on the local machine. -Paul Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now