Jump to content

Monitoring External System through Pulseway API


Recommended Posts

Posted

Our admins use Pulseway to monitor several of our systems.  We also use 3rd party cloud based systems that will send us notifications via API.  When we receive notifications from our 3rd party systems, our admins would like for me to forward them to Pulseway. 

I've read quite a bit of the documentation and perhaps it's because I'm unfamiliar with Pulseway nomenclature, but I'm unsure if this can be done.  This thread had several questions in it that I have, but a lot of the content is still unclear for me.  And at one point it was stated that what they were trying to accomplish wasn't possible, and that Pulseway was considering allowing to add notifications for other monitored systems in the future.

So, can this request be accomplished?

Thanks!

  • Administrators
Posted

Hi there,

The best course of action would be to have an adapter software that sits in the middle, receives notifications from the 3rd party cloud systems and then forwards them back to Pulseway using the .NET or Java Cloud API (link). Basically you'd register an application with Pulseway, you'd be able to offer information to the Pulseway clients when it's requested, receive commands and also be able to send notifications.

-Paul

Posted

Hello,

This sounds great.  I would be writing the adapter software.  I'm completely new to Pulseway, so I'm afraid I don't understand some of the language used.

You mentioned, "register an Application".  I'm not seeing how to do that in the my.pulseway.com/main UI.  How do I do that?

After I register an application, is that when I establish the "Application Name" and the "Group"?  What is a Group?  Does it correspond to the Agent Group in the Configuration?

I'll just be sending a notification out, so will the code look something like this:

	Service.Instance.Configure("Application Name", "Group Name", "Running on whatever...", false);
	Service.Instance.Start("username", "password", "apikey");
	Service.Instance.SendNotificationToAllDevices("The Message", NotificationPriority.ELEVATED);
	Service.Instance.Stop();

Thanks for your help.

  • Administrators
Posted

Hi there,

14 hours ago, mcfly said:

You mentioned, "register an Application".  I'm not seeing how to do that in the my.pulseway.com/main UI.  How do I do that?

By calling the first two lines you've quoted you're registering the application with Pulseway and it will start showing up as online on my.pulseway.com until you close the application or call the .Stop method.

14 hours ago, mcfly said:

After I register an application, is that when I establish the "Application Name" and the "Group"?  What is a Group?  Does it correspond to the Agent Group in the Configuration?

Group is a legacy feature, just send a value there and the system will register under the Legacy Agent Group (gets created automatically). Then you'd be able to move the system from the Configuration page into the group you desire.

14 hours ago, mcfly said:

I'll just be sending a notification out, so will the code look something like this:

That looks good but I would also display some information about the application so I'd subscribe to the OnDetailsRequest event and in that method I'd call Service.Instance.SetDetails(groups); to send the information back to the server. I'd also avoid calling Stop unless the application is stopping as this will only keep the application marked as "online" in Pulseway when you send notifications.

-Paul

Posted

Hey, this is coming together.  Thank you so much for your help.

In my scenario, we have a 3rd party application that is in the cloud.  I will be writing an API.  When the 3rd party app encounters an issue, it will let us know by calling my API.  When my API receives the post from the 3rd party, it will make a post to the Pulseway API and create the notification for our administrators.

I'm able register my app now and post the notification, so things are looking good. Since my API will only run for short bits at a time I'm thinking the online/offline status really isn't applicable here.  Unless there's some way for Pulseway to intermittently ping my API to see if it responds. Does that sound correct to you?  I'm definitely open to any tips/suggestions!

  • Administrators
Posted

Personally, I'd keep the Pulseway integration active for the whole lifetime of your API. This way you'd also be able to post metrics for the API like how many requests you're getting per day and receive commands straight from the Pulseway app. The possibilities are endless.

-Paul

Posted (edited)

I'm integrating my adapter software.  The solution I'd like to host the software in is targeting .net core.  The PulsewayCloud.dll is written for the .net framework.  Does Pulseway have a dll that targets .net core?

Or, alternatively, I got the example in this documentation to work, but I had to provide the instance id of one of our existing systems.  Is there a way to set up an instance id for my cloud app, or is there another option?

Thanks!

Edited by mcfly

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