How to reconnect the primary ArcGIS Monitor agent to server

888
6
04-04-2024 02:42 PM
TristanMcHardie
Regular Contributor

After a string of issues, our distributor and Esri support recommended we reinstall ArcGIS Monitor and reconnect it to the existing Postgres database, which we've done.

However, because it was offline for several weeks, all the ArcGIS Monitor Agents were disconnected, including the "primary" one running with ArcGIS Monitor Server. I've reconnected the satellite agents but there appears to be no mechanism to reconnect the primary agent.

How should I go about reconnecting the primary agent?

0 Kudos
6 Replies
GeoJosh
Esri Regular Contributor

@TristanMcHardie

A couple questions for you:

  • After reinstalling Monitor, is the OS service running under the same account as before?
  • Was the configuration store deleted or moved before you reinstalled?

Josh

TristanMcHardie
Regular Contributor

Hi @GeoJosh,

Yes, it's running as the same account as before.

Our config store was corrupted so it was easier to reinstall. I do have a copy of that, though.

0 Kudos
TristanMcHardie
Regular Contributor

Hi @GeoJosh, any ideas? I'm guessing I need to manually fix the agent's API key somewhere in the config store and/or Postgres DB.

0 Kudos
GeoJosh
Esri Regular Contributor

@TristanMcHardie,


Our config store was corrupted so it was easier to reinstall. I do have a copy of that, though.


If you have a copy of the config-store, you should be able to restore it to "C:\Users\<MonitorServiceUser>\AppData\Local\ESRI\ArcGISMonitor\config-store-server". The important piece in the config store that needs to be restored in this situation is the AGENT_TOKEN, which is used to authenticate the agent with server.

Josh

TristanMcHardie
Regular Contributor

Thanks @GeoJosh.

I'd already attempted to copy the AGENT_* lines from the old .env (as below) but, after restarts, this hasn't worked.

AGENT_DESCRIPTION=
AGENT_ID=1
AGENT_NAME=ARCGISMONITOR
AGENT_TOKEN=xxxxxxxxxxxxxxxx
AGENT_URL=http://localhost:30082/arcgis

What can I try next?

0 Kudos
GeoJosh
Esri Regular Contributor

@TristanMcHardie,

It appears that this issue requires deeper troubleshooting than what we can do over the forums. Can you please open a support ticket for this issue?

Josh