Hi DOJO,
Is there a way to monitor DMS Cloud Connection Status without accessing https://dataminer.services/.
Based on Dataminer logs or log files? We want to automate this check to be notified as soon as the connection is down.
Thanks!
Hi Adel,
It depends on what you want.
The DMS Cloud Connection status you see in dataminer.services is retrieved via an API call: GET dms-connection-info. This checks the cloud side of things.
You could send these API calls directly, instead of through the app. You can try it out via https://orchcont-prod.cca-prod.aks.westeurope.dataminer.services/swagger/index.html?urls.primaryName=User%20OrchestratorController%20API%20v1.0
Those calls require three ingredients: an organizationId, a coordinationId and authentication.
The first two can easily be found if you go to the admin app of your system (admin.dataminer.services) - in the URL you'll see something like: https://admin.dataminer.services/{organizationId}/dms/{coordinationId)/overview
Within the dataminer.services app, we already have your user authentication context.
If you want to send these calls via your own integration you'll also need to take care of that authentication.
Eventually this would give you a result containing an epoch timestamp & connection status values like:
<code class="language-json">{
<span class="hljs-attr">"hasValidConnection"</span>: true,
<span class="hljs-attr">"hasTunnelConnection"</span>: true,
<span class="hljs-attr">"hasWebApiConnection"</span>: true,
<span class="hljs-attr">"lastSeen"</span>: 1779779815
}</code>
The second part of your request mentions "via local log files", so this sits at the other side of the cloud connection.
For this, the CloudGateway logs (C:\ProgramData\Skyline Communications\DataMiner CloudGateway\Logs) could give you what you need. Though also here there's a lot that will depend on the context or what it is exactly that you want to monitor.
Are we dealing with a single-node DMS, are there multiple nodes with redundancy (= multiple CloudGateway services installed) etc.
Furthermore, it's not exactly the same status as what you'd get from the cloud side. As it's log-files, it would also take more interpretation.
Maybe better to create a support ticket so we can help you further, depending on which option you want to pursue.
Hi Adel,
Great, this means you've decided to go for monitoring via API integration instead of monitoring using local logs.
The API I shared before will be what you need.
There's no public documentation yet as it's primarily used for our dataminer.services apps. Afaik no customers made a request yet to set up their own data integration.
With that, there's still a big caveat: currently, the authorization for this call is only supported in a user, DMS or service context.
In theory you could already do integration using your user context too, but I imagine you'll want to use an organization key to get the system's health statuses instead. => We'll still need to add support for that.
I've created user stories to expand the organization keys with an additional permission and to support key authentication for the API, and will get back to you when it's available. Will also ensure that there'll be documentation available.
I can't promise any delivery date yet, but expect that this can be picked up pretty short-term.
Hi Adel,
I still owed you an update here.
We've since added support for key authentication to our OrchestratorController API.
You can try it out via:
https://global.dataminer.services/swagger/?urls.primaryName=Key+OrchestratorController+API+v1.0
Go to the Admin app of your organization (https://admin.dataminer.services/) and click Keys.
Create a new key with the "Retrieve DMS status" permission.
Copy the key.
Go to the system you want to monitor and copy the organizationId and coordinationId from the URL:
https://admin.dataminer.services/{organizationId}/dms/{coordinationId}
Go to the Swagger that I linked above, and expand the example call for /api/key-dxm/v1-0/organization/{organizationId}/coordination/{coordinationId}/dms-connection-info
In the sample request, fill in the organizationId, coordinationId and the key that you created.
If you click Execute, you should get the connection status back, something like:
{
"hasValidConnection": true,
"hasTunnelConnection": true,
"hasWebApiConnection": true,
"lastSeen": 1792493314
}
where lastSeen is the Unix timestamp (Epoch time).
Hope this helps!
Hello Brecht,
Thank you very much for the update.
We just tested it, and it works exactly as we were hoping!
There is one thing we noticed. Our DMS is cloud-connected using a DMZ Proxy setup. https://docs.dataminer.services/dataminer/dataminer_services/Connecting_to_cloud/Connect_to_cloud_with_DMZ.html
We expected the DataMiner Agent to be able to reach global.dataminer.services, but currently it is unable to do so.
Not sure this is a limitation of the DMZ Proxy setup, or this behavior is by design.
The reason we need this connectivity is that we would like to access global.dataminer.services from within DMS, for example through the Data API or Automation scripts, so that we can monitor the service directly from DataMiner.
Thanks again for sharing this update.
Hello Brecht,
Thank you for the update.
Great to know that there is an API for this, we will be using an external application to get the status. Could you please share the link for the full documentation if available? It is still not clear for me how to form the request.
Thanks!