|
POST
|
In the end we created a notebook script that runs as a scheduled task. The script uses the AGOL rest api to check velocity status and errors. It then emails group members if it finds an issue. Setting it to run at 15 minute intervals consumes approx 2.5 credits a day. Here's a copy of the script in case someone finds it useful. from arcgis.gis import GIS
gis = GIS("home")
import requests
import json
def emailWarning(errormessage):
emengencyMapGroupID = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' # Replace with your actual group ID
# Get the group object using the group ID
emengencyMapGroup = gis.groups.get(emengencyMapGroupID)
emailSubject = 'Test Errors recorded in the Genasys Velocity Feeds Test'
# Users have to be in the group to receive the email
emengencyMapGroup.notify(users=['OES_Dev'], subject=emailSubject, message=errormessage)
# Check that the source data wfs endpoint is up and running
url='https://source.feed.com/geoserver/z/wfs'
payload={'authkey':'mykey',
'SERVICE':'WFS',
'REQUEST':'GetFeature',
'VERSION':'2.0.0',
'TYPENAMES':'z:evacuation_zone',
'srsName':'EPSG:4326',
'outputFormat':'application/json',
'CQL_FILTER': 'zone_status<>\'Normal\''}
r = requests.get(url, params=payload)
print(r.status_code)
# Check if the request was successful
if (r.status_code != 200):
emailWarning('Failed to connect to the source WFS endpoint. Confirm source is up and running')
# Check the status of the Velocity feeds
# Get the Velocity feeds
velocity = gis.velocity
# velocity
feeds = gis.velocity.feeds
# feeds
Sample_feed = feeds.get("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
status = Sample_feed.status
# print(status)
print(status['status'])
# Check if the feed is started
if(status['status'] != 'started'):
emailWarning('MY poller ingest feed is not started. Please log in to Velocity and restart it.')
sample_metric = Sample_feed.metrics
# print(sample_metric)
print(sample_metric['numErrors'])
# Check if there are any errors in the feed metrics
if sample_metric['numErrors'] > 0:
emailWarning('MY poller ingest feed is recording errors. Please log in and investigate.')
# Check the status of the real-time analytics
# Get the real-time analytics
real_time_analyitics= gis.velocity.realtime_analytics
real_time_analyitics
event_inget_analytic =real_time_analyitics.get('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
event_inget_analytic.status
print( event_inget_analytic.status['status'])
# Check if the real-time analytics process is started
if event_inget_analytic.status['status'] != 'started':
emailWarning('My Real time Analytic processes is not started. Please log in to Velocity and check the status. ')
# Check if there are any errors in the real-time analytics metrics
for value in event_inget_analytic.metrics.items():
# metrics are in a list of dictionaries
if( type(value[1])==list):
if(len(value[1])> 0):
for dic in value[1]:
# Check if the dictionary has an 'errorCount' key
if 'errorCount' in dic:
if dic['errorCount'] > 0:
emailWarning('One of the My Real time Analytic processes had an error. Please log in to Velocity and check the logs. ')
print('we have a problem')
... View more
06-05-2025
10:38 AM
|
2
|
4
|
617
|
|
POST
|
The feed we are pulling from is a 3rd party feed we have no control over, does this mean the approach won't work? I'm unfamiliar with WatchDog transactions but it's an approach I'd like to know more about if you think it will help in my situation.
... View more
06-02-2025
02:04 PM
|
0
|
0
|
691
|
|
POST
|
Thank you Michael. The link is very informative but unfortunately unhelpful in our case. The detect gaps tool doesn't work on polygon data 99% of the time there is no data to pull, the source has no current active polygons. One user suggested using scripts to test the source. I will look into using a notebook script to test the response of the feed source, but then the question becomes: how do I get a warning if the notebook script fails to run? So the ideal solution would be a warning from the feed itself.
... View more
06-02-2025
11:43 AM
|
0
|
0
|
718
|
|
POST
|
Is there any way to configure email warnings when a Velocity feed fails? We have a HTTP poller feed and would like email warnings if the source becomes unavailable. Is this something we can configure? The email warnings we get when a feed exceeds it 25KB limit is helpful. We would ideally like something like this if the HTTP poller get request fails.
... View more
06-02-2025
09:57 AM
|
0
|
12
|
903
|
|
POST
|
Thanks Jeff. Yes I was using realtime analytics. Your suggestion of using a time filter was correct. I learned from as Esri expert to use a field calculation of the data and then filter off of 'Date within last X minutes' where the date field is calculated to Now() every time the Analytic is run. This would hide the features in the map. They also suggested a scheduled Notebook script to delete the older features from the hosted feature service.
... View more
04-21-2025
08:36 AM
|
1
|
0
|
492
|
|
POST
|
I misread your post Jeff. I'm doing a real time analytic, not a Big Data one. That is why I don't see the option to replace all features every time the analytic runs.
... View more
04-18-2025
09:27 AM
|
0
|
1
|
526
|
|
POST
|
I'm probably missing something obvious here but I don't see how to get that option. The closest I can get is Each time the analytic starts Replace existing features and schema When I'm setting up an output these are the options I see
... View more
04-18-2025
09:09 AM
|
0
|
0
|
529
|
|
POST
|
Since GAP analysis does not work on polygon feeds, is there a way to configure an output so that only the latest features from a feed are kept? I don't just mean the latest feature for a trackID, I mean just features from the latest run of the analytic. I have a problem where the source polygons are being split and merged. Without GAP analysis the parent polygons stay in the output hosted feature service and have to be manually deleted. They essentially stay as overlapping polygons. Maybe one of the other output types support keeping just active features from a feed?
... View more
04-17-2025
09:57 AM
|
0
|
6
|
580
|
|
POST
|
I'm trying to use the detect gaps tool to detect changes in a polygon feed. But when I try to connect the feed to the tool I get an error Geometry type mismatch. Data must match the supported input geometry types: esriGeometryPoint I don't see anywhere in the documentation that only points can be used as an input. The Gap tool works on track_id so I wouldn't have thought the geometry type matters?
... View more
04-07-2025
10:32 AM
|
0
|
2
|
372
|
|
POST
|
Just came across this issue today. Here is the code I used to get it working. I'm on Pro 3.2.3 import pandas as pd
from arcgis.features import GeoAccessor, GeoSeriesAccessor
import arcpy
LeaseOut = pd.read_csv(filepath_or_buffer=f"Z:\\Work\\xyzx")
#do pandas manipulation
LeaseOut_sp =LeaseOut.spatial.to_table('in_memory/processed_table')
LeaseOutCSV = arcpy.CopyRows_management(LeaseOut_sp, 'LeaseOutCSV')
... View more
02-20-2025
01:38 PM
|
0
|
0
|
868
|
|
POST
|
Getting this error using 3.2.4 so it didn't persist. A bug has been filed https://support.esri.com/en-us/bug/the-import-xml-workspace-document-geoprocessing-tool-fa-bug-000168009
... View more
01-21-2025
01:39 PM
|
1
|
0
|
670
|
|
POST
|
Thanks @TimoT . That was it. I've had this same problem in the past but with a totally different error. Maybe this new error is due to migrating to a new release.
... View more
12-04-2024
08:52 AM
|
0
|
0
|
513
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-21-2025 01:39 PM | |
| 1 | 07-29-2025 10:45 AM | |
| 1 | 07-17-2025 03:33 PM | |
| 1 | 07-10-2025 10:30 AM | |
| 1 | 06-30-2025 12:07 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|