Administrators Paul Posted October 25, 2013 Administrators 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 TorW, Jeremy, Edd and 1 other 4
JHimmelbauer Posted October 26, 2013 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
Administrators Paul Posted February 4, 2014 Author Administrators 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?
JHimmelbauer Posted February 4, 2014 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)
sgarriques Posted February 11, 2014 Posted February 11, 2014 Any update on this? This would be very cool
Administrators Paul Posted February 11, 2014 Author Administrators Posted February 11, 2014 I am currently working on an updated version of the plugin. I will let you know when it's finished.
Martin Stevnhoved Posted December 4, 2014 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.
Administrators Paul Posted December 4, 2014 Author Administrators Posted December 4, 2014 (edited) Hi Martin, Thanks, I'll add this feature soon. Paul Edited December 4, 2014 by Paul
Administrators Paul Posted December 6, 2014 Author Administrators Posted December 6, 2014 I've updated the plugin, check the first post for updated usage.
itzen Posted October 10, 2015 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.
Administrators Paul Posted October 23, 2015 Author Administrators 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
p1r473 Posted November 10, 2015 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.
Administrators Paul Posted November 10, 2015 Author Administrators 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
p1r473 Posted November 11, 2015 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
Administrators Paul Posted November 11, 2015 Author Administrators 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
qsoftsys Posted January 14, 2016 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
Staff Chris Posted January 15, 2016 Staff 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
qsoftsys Posted January 19, 2016 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
Staff Chris Posted January 19, 2016 Staff 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
Przemyslaw Klys Posted April 12, 2018 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.
BiofilmIT Posted May 17, 2018 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
Administrators Paul Posted May 23, 2018 Author Administrators 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
Mario Posted July 17, 2018 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!
Customer333 Posted March 25, 2019 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
Administrators Paul Posted March 25, 2019 Author Administrators 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
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