Is there a way to monitor Subscription health?

For requests or help with our API
Post Reply
rinse-dental
Posts: 144
Joined: Wed Apr 06, 2022 12:04 pm

Is there a way to monitor Subscription health?

Post by rinse-dental »

At 11:21am PST, I ran into an issue where Subscription events stopped firing. All services, including the API service, were running during the outage. The issue was resolved when I restarted the Open Dental server.

Two questions:
1. Is there a log specific to Subscriptions that can give me some indication of what happened?
2. Is there a way to monitor the health of Subscriptions in the event they fail or otherwise stop firing?
JTS
Posts: 60
Joined: Thu Aug 18, 2022 12:56 pm

Re: Is there a way to monitor Subscription health?

Post by JTS »

Good afternoon rinse-dental,

As of 26.2.1, API Subscriptions were given error logging and updated to accurately tell whether their EndPointUrl successfully received any sent API Event data or not. The error logging that was added can be found in the last four columns of an ApiSubscription row, as seen here: https://www.opendental.com/OpenDentalDo ... bscription

To answer your questions specifically,
1. The FailureReason column should detail the reason why your Subscription stopped firing.
2. On top of FailureReason, the DateTimeLastFailure, SubsequentFailures, and DateTimeNextRetry columns will show you when that Subscription last failed to successfully transfer Event data, how many times in a row it has failed, and the time it will try next. Do note that some failures, such as an EndpointUrl not leading to a destination that exists, or leading to a destination that does not accept HTTP POST requests, will cause the Subscription to halt itself by setting DateTimeStop as the time of failure. In this situation, Subscriptions PUT can be used to set DateTimeStop to '01-01-0001' or a future date in order to put it back into consideration.

Let us know if you have any further questions. Thanks!
rinse-dental
Posts: 144
Joined: Wed Apr 06, 2022 12:04 pm

Re: Is there a way to monitor Subscription health?

Post by rinse-dental »

Cool, thank you. When will 26.2.n be available for beta?

Is there a solution or work around for 26.1.n? It's the first material issue I've faced with Subscriptions in ~4 years of use and it was completely invisible.
JTS
Posts: 60
Joined: Thu Aug 18, 2022 12:56 pm

Re: Is there a way to monitor Subscription health?

Post by JTS »

Good morning,

26.2 should be available for beta within the next couple of weeks. Unfortunately, there isn't a workaround for 26.1.x. All error logging and failure tracking for API Subscriptions were introduced in 26.2, so there isn't any other built-in way to determine why a Subscription stopped firing or to monitor its health in 26.1.x.

Thanks, and let us know if you have any further questions!
Post Reply