Jump to content

Notification Bridge


Paul

Recommended Posts

This is awesome.  This is likely to be an interim plan for me while I write something more custom tailored for me.  

I would suggest you return a unique value for maintenance mode, rather than the same as a failure to run.   The reason for this is many people will need to error on a failed polling the same as if the script returned bad stuff, but we would not want to do the same if its in maintenance mode.     

Looking at the code it doesn't look to hard to change since you already checking separately, but if i'm understanding the code correctly you would only need to return something other than false, and then change your if/else logic and maybe internal documentation.  (And then we could use pulseway alerting for say a scheduled task more easily to alert on a poll failure)

One question, is there a way (this could be more pulseway app 101) to make it so that if we failed to receive data within a period of time, that an alert will be sent?  (say the machine is removed from the network and the pulseway client is not operable)

Another question, when sent alerts this way, what do we really have for historical record keeping?  

Link to comment
Share on other sites

  • Administrators
Quote

One question, is there a way (this could be more pulseway app 101) to make it so that if we failed to receive data within a period of time, that an alert will be sent?  (say the machine is removed from the network and the pulseway client is not operable)

Yes, just enable the offline notification from the Pulseway Manager -> Notifications -> Status and you will receive a notification if the agent stops *pinging* the server for a period of time (configurable from the Server Admin -> Settings page on the WebApp).

Quote

Another question, when sent alerts this way, what do we really have for historical record keeping?  

All notifications are archived for historical record keeping and can be accessed from the Server Admin -> Notification History page on the WebApp.

Quote

Looking at the code it doesn't look to hard to change since you already checking separately, but if i'm understanding the code correctly you would only need to return something other than false, and then change your if/else logic and maybe internal documentation.  (And then we could use pulseway alerting for say a scheduled task more easily to alert on a poll failure)

This could be done :lol:...

-Paul

Link to comment
Share on other sites

Hello Paul,

It seems the plugin doesn't respect existing notifications anymore:

NotificationBridge.exe -p 1 -t "message"

Sending it like that multiple times always return Notifcation was succesfully sent

image.png.d66bd535716e97706ab58fe570a18d17.png

What I have seen in Pulseway that while 2 notifications won't be shown next to each other if you delete other notifications so that those notification will show up on top, it will accept new notifications so you can have 5 or more identical notifications. 

Is there hope for a fix? I tried playing with C# code of yours but I don't think problem is in there.

Przemek

Link to comment
Share on other sites

  • Administrators

Hi Przemek,

I've updated the plugin to include Ermins's changes which allow you to control whether or not the notification should be repeating (using the -r CLI argument). Check the first post for the latest version.

-Paul

Link to comment
Share on other sites

  • 5 months later...

Hi @Paul

Do you have any plans on implementing a similar feature into Pulseway itself?

Either as a command line feature, or a component that can be called from PowerShell.

It would be a nice way of getting feedback from various scripts running on servers.

(I know it is possible to run tasks from Pulseway, but it is not quite the same.)

 

Best Regards, Martin.

Link to comment
Share on other sites

  • Staff

Hi @Martin Stevnhoved,

We will consider the possibility to add this to the core functionality of Pulseway.

However in a mean time you may use Pulseway automation and receive responses from a scripts. For more details check out this link.

Also, if you want to deploy this Plugin to all systems, then you can do it by placing required files in shared folder which is accessible from all folders and then configure it on one of your monitored systems. Once that is done, then you will need to recreate the following registry key on other systems:

HKEY_LOCAL_MACHINE\SOFTWARE\MMSOFT Design\PC Monitor\Plugins

If you have added more than one Plugin, then find the sub-key which is for this Plugin.

Link to comment
Share on other sites

Hi @Chris.

We are not gonna use the plugin (4. party compiled code) in our customers environments.
If you does not implement any similar directly in Pulseway, we could implement something like it via out own plugin.

I really like the approach of using using Automations, but we see these limitations:

1. Notifications will be consolidated for the entire task. Not for every single system with error.

2. Script for all systems will be executed at the same time - independant of the systems local time zone.

Br, Martin.

 

 

Link to comment
Share on other sites

  • 1 year later...

Is this plugin broken?
I have just implemented this, first two tests with my free (test) account worked fine, now it says "Pulseway refused the notification."

On our licensed server this does not work at all:

"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."

I have confirmed that the plugin is installed correctly and the 3 workstations have Pulseway running. (I have also tried adding the plugin manually via manager, systems have had the service restarted which did not work, and the systems have been fully restarted which also does not work)
The reg keys looks exactly the same. 
Link to comment
Share on other sites

45 minutes ago, TimStark said:

Is this plugin broken?
I have just implemented this, first two tests with my free (test) account worked fine, now it says "Pulseway refused the notification."

On our licensed server this does not work at all:

"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."

I have confirmed that the plugin is installed correctly and the 3 workstations have Pulseway running. (I have also tried adding the plugin manually via manager, systems have had the service restarted which did not work, and the systems have been fully restarted which also does not work)
The reg keys looks exactly the same. 

Update, during install we have added a taskkill of the service just before adding the reg entries this has now worked fine on automated installations.
I suspect the 3 workstations may have a corrupt pulseway installation as no matter what we do we cannot get the manager to see the plugins.

Also for anyone that sees the refusal message, this is due to the lack of -r in the arguments, it seems to treat every notification as identical even thought the text is different.

 

Link to comment
Share on other sites

58 minutes ago, TimStark said:

Update, during install we have added a taskkill of the service just before adding the reg entries this has now worked fine on automated installations.
I suspect the 3 workstations may have a corrupt pulseway installation as no matter what we do we cannot get the manager to see the plugins.

Also for anyone that sees the refusal message, this is due to the lack of -r in the arguments, it seems to treat every notification as identical even thought the text is different.

 

Update, I don't get it, it just seems to throw the same error sporadically:

C:\IT\System\Additional\Plugins\Pulseway>NotificationBridge.exe -p 2 -t "hello" -r
Pulseway refused the notification.

I have cleared all notifications and tried again, same deal.

 

Paul, could you weigh in as to what is happening, is there a limit? 

Link to comment
Share on other sites

  • 5 months later...
  • 2 years later...

My windows monitoring service written in C# was sending alerts properly until this morning where two sites had the same error.

I tried sending a test command using command line and it is working. The time in below log is NZST.

Was it due to an outage?

 

03/04/2024 03:09:57 ERROR: Pulseway notification failed. Response: This request operation sent to net.pipe://localhost/NotificationBridge did not receive a reply within the configured timeout (00:01:00).  The time allotted to this operation may have been a portion of a longer timeout.  This may be because the service is still processing the operation or because the service was unable to send a reply message.  Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.

 

03/04/2024 03:17:01 ERROR: Pulseway notification failed. Response: This request operation sent to net.pipe://localhost/NotificationBridge did not receive a reply within the configured timeout (00:01:00).  The time allotted to this operation may have been a portion of a longer timeout.  This may be because the service is still processing the operation or because the service was unable to send a reply message.  Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.

 

Edited by JpBIT
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...