Select to view content in your preferred language

Collection Notifications Only Triggering on Update

227
2
Jump to solution
09-05-2024 06:42 AM
Justin_Greco
Frequent Contributor

It could be that I am not understanding how notifications work, but I am trying to get a notification when a set a critical map services are stopped. 

So I gave a label of "critical" for each of these services, then set up a collection of map services that have the critical label and have a system state of started. 

I then set up a notification and subscribed to the components deleted event.  My expectation was to receive an alert anytime a component is removed from the collection. 

However when I stop one of the services and it is not longer in the collection, I am not receiving a notification.  The only way I am able to receive a notification is changing the event to updated instead of deleted.  This triggers a notification when anything is updated for the component, not just when the system state changes.

0 Kudos
1 Solution

Accepted Solutions
GeoJosh
Esri Regular Contributor

Hi @Justin_Greco,

The components deleted event, in this scenario, would only fire if the component was actually removed from the system (a.k.a. the service is deleted from ArcGIS Server). In the current release of ArcGIS Monitor, there is not a straightforward way of receiving a notification when a service enters the stopped state. I discussed this use case with the development team at length and I think there are a few features that will meet this need.

In the near term, ArcGIS Monitor will have the ability to monitor HTTP endpoints. One of the metrics that Monitor will collect for HTTP endpoints is whether a connection can be made to the target URL. Failure to do so may indicate that a service is in the STOPPED state or is otherwise unusable. This feature will also allow you to specify a regex pattern that will be used against the response body to look for matches. This means you could choose to monitor the HTTP endpoint that reports the system state of a critical service and search for the string "STARTED" in the response body. If this string is not found, an alert will be opened and you will be notified.

In the longer term, the development team will add the ability to open alerts based on attribute changes. System state is one example of an attribute on an ArcGIS Server service.

Please let me know your thoughts on these features and if there are any other questions I can help answer.

Josh

 

View solution in original post

2 Replies
GeoJosh
Esri Regular Contributor

Hi @Justin_Greco,

The components deleted event, in this scenario, would only fire if the component was actually removed from the system (a.k.a. the service is deleted from ArcGIS Server). In the current release of ArcGIS Monitor, there is not a straightforward way of receiving a notification when a service enters the stopped state. I discussed this use case with the development team at length and I think there are a few features that will meet this need.

In the near term, ArcGIS Monitor will have the ability to monitor HTTP endpoints. One of the metrics that Monitor will collect for HTTP endpoints is whether a connection can be made to the target URL. Failure to do so may indicate that a service is in the STOPPED state or is otherwise unusable. This feature will also allow you to specify a regex pattern that will be used against the response body to look for matches. This means you could choose to monitor the HTTP endpoint that reports the system state of a critical service and search for the string "STARTED" in the response body. If this string is not found, an alert will be opened and you will be notified.

In the longer term, the development team will add the ability to open alerts based on attribute changes. System state is one example of an attribute on an ArcGIS Server service.

Please let me know your thoughts on these features and if there are any other questions I can help answer.

Josh

 

Justin_Greco
Frequent Contributor

This makes sense to me now, I was thinking it meant when a component is removed from the collection, not removed from Monitor all together.  Back in the old pre-2023 version that is how we monitored service availability was through the HTTP monitoring, excited to hear that that ability is coming!  Thank you for the detailed explanation.

0 Kudos