Select to view content in your preferred language

How to get value from Check Service Observer

191
2
06-30-2025 05:22 PM
Timothy
Occasional Contributor

Using the Check Service Observer can I record the matched regex value as the monitor metric?

e.g: Obtaining how many surveys have been submitted in last 7 days - Check Service Observer Settings
Interval
1 hour

Enabled
Yes

Request URL
https://<server>/server/rest/services/Hosted/survey123_64fc8266b5ec47388f40eac47f863f3a/FeatureServer/0/query

request_data
[ { "key": "where", "value": "<DateField> >= CURRENT_TIMESTAMP -+ INTERVAL '7' DAY" }, { "key": "format", "value": "json" }, { "key": "returnIdsOnly", "value": "true" } ]

Request Method
get

Response Check
\d+

 

I would prefer to use 'returnCountOnly' and then separately be able to ingest a value from the FC attributes for other alerting purposes.

2 Replies
EsriEvan
Esri Contributor

Hi @Timothy ,

This is great use case - however I don't believe this is possible in the latest release (2025.0).

Can I ask the use case behind counting the number of features in a layer? I think I can guess but would like to understand your specific case so we can add details!

I suspect the general enhancement would be to parse the JSON response and access a specific value from there (in your case, the count property). I will take this back to the team but would also encourage you to submit an enhancement request through support, if possible. 

Thanks!

Timothy
Occasional Contributor

Hi @EsriEvan,

  1.  A data workflow updates a imagery service and it isn't actively monitored but new imagery is expected to be added weekly.
  2. A single FC row value needs to stay above a specific level. 
  3. Amount of FC features that haven't been edit in X days.

ArcGIS Monitor to provide email alerts and metrics across time.

Cheers
Tim