Skip to content

Monitor IE Device

This document highlights monitor the status and statistics of IE Device from IEM, the following HTTP request you may need related API documentation:

  1. a POST request with your username and password and receive a lightweight token that will enable you as a user to authenticate future requests.
  2. a GET request to receive the ID of the IE Device that you would like to get its statistics of current state.
  3. a GET request to receive all the IE Device's statistics of current state.
  4. a GET request to receive the statistics of a specific application installed on the IE Device.
  5. a GET request to download logs with the query on IE Device.

Get authentication token for IEM API

See Authentication guide.

Get target Industrial Edge Device ID

To get the IE Device statistics, you require device IDs as unique identifier of the target devices. Use this request to list all available Industrial Edge Devices including the device ID:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/devices'

A successful response looks like this:

{
  "data": [
    {
      "userId": "c0bc43d7b7544bb9a45f2c9e3d30e525",
      "deviceId": "fbbeb5943ed244a1ab38bdd19b80a3ff",
      "deviceName": "ied-iem",
      "deviceStatus": "ACTIVE",
      "platformId": "8773f1b11586405b91828b99ad91c177",
      "swPlatformId": "26592f675aeb4427b34a72784c8983ca",
      "createdDate": 1673942712000,
      "modifiedDate": 1673946633000,
      "softwarePlatformName": "DOCKER_COMPOSE"
    }
  ],
  "pageNo": 1,
  "totalPages": 1,
  "pageSize": 5,
  "totalCount": 1
}

List IE Device statistics of current state

List all statistics of current state IE Device. For this, you require the device ID of the IE Device as unique identifier:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/devices/<your-device-id>/statistics'

A successful response looks like this:

{
  "data": {
    "1674011676000": "{\"AppCount\":{\"ApplicationCount\":1.0,\"ApplicationStatusDetail\":[{\"applicationId\":\"hI5FOxrLcRCQ7doCpoQTDLXTki8al5sI\",\"title\":\"tom-nginx\",\"appStatus\":\"running\",\"repoName\":\"tomnginx\"}],\"MaxInstalledApp\":20.0,\"MaxRunningApp\":10.0,\"RunningApplicationsCount\":1.0},\"DeviceId\":\"fbbeb5943ed244a1ab38bdd19b80a3ff\",\"InternetStatus\":{\"serialVersionUID\":0.0,\"NetworkType\":\"RelayNR\",\"RouterIP\":\"\",\"RelayServerID\":\"192.168.153.128\",\"RelayServerAddress\":\"192.168.153.128\",\"CurrentConnectedIP\":\"\",\"CurrentConnectedPort\":\"\",\"currentConnectedKeystonePort\":\"\",\"RelayServerUsername\":\"\",\"RelayServerPassword\":\"\",\"RelayServerPort\":\"\",\"RURLAddress\":\"\",\"isRelaySet\":false,\"hostName\":\"\",\"isRURLSet\":false,\"LanIPAddresses\":[\"192.168.153.177\"],\"ExternalIPaddress\":[\"ied-iem.192.168.153.128\",\"192.168.153.177\"],\"BoxID\":\"593a242b1c2e4c72b38a0d08cf323ae6\",\"TomcatPort\":\"30000\",\"RURLTomcatPort\":\"30000\"},\"OperationalQualities\":{\"maxInstalledAppCount\":20.0,\"maxRunningAppCount\":10.0,\"maxUsableRamUsage\":8192.0,\"maxUsableStorageArea\":20480.0,\"maxCPULoad\":100.0},\"StorageInfo\":{\"DataSpaceFree\":\"3.4 GB\",\"DataSpacePercentage\":\"6.66%\",\"DataSpaceTotal\":\"3.9 GB\",\"DataSpaceUsed\":\"264.4 MB\"},\"SystemInfo\":{\"CPUInfo\":\"x86_64\",\"CpuCores\":\"2\",\"CpuPercentage\":\"0.50\",\"GetUptime\":\"0 days, 18 hours, 12 minutes\",\"KubeAppliance\":\"false\",\"MemoryFree\":\"7.1 GB\",\"MemoryPercentage\":\"7.14\",\"MemoryTotal\":\"7.8 GB\",\"MemoryUsed\":\"567.9 MB\"},\"correlationID\":\"c0253e6fab8e-6896bf08-1dd3-4ab0-b728-d8bd641b0004\",\"currenttime\":1.674011675769E12,\"devicesCount\":0.0,\"interface\":[{\"interfaceName\":\"ens33\",\"macAddress\":\"00:0C:29:4E:6F:10\",\"iPAddress\":\"192.168.153.177\",\"subNetMask\":\"255.255.255.0\",\"status\":\"Enabled\",\"gateway\":\"192.168.153.2\",\"primaryDns\":\"114.114.114.114\",\"secondaryDns\":\"\",\"hostName\":\"ied-iem\",\"domainName\":\"ied-iem.192.168.153.128\",\"isEnabled\":true,\"dockerIP\":\"172.17.0.0/16\",\"gatewayInterface\":false}],\"ntpstatus\":{\"lastSyncTime\":1.674011619704E12,\"status\":\"ACTIVE\"}}"
  }
}

List all installed apps

List all installed apps on one specific IE Device or all IE Devices. if you want to get the installed apps on a specific IE Device, you should add the optional query field 'deviceId', if you want to get the installed apps on all IE Devices, then there is no need to add the query filed. Use this request to get it:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/devices/installed-apps?deviceId=<your-device-id>'

A successful response looks like this:

{
  "data": [
    {
      "applicationId": "hI5FOxrLcRCQ7doCpoQTDLXTki8al5sI",
      "icon": "https://localhost:443/pp/PortalCache/app/hI5FOxrLcRCQ7doCpoQTDLXTki8al5sI/appicon.png",
      "title": "tom-nginx",
      "deviceId": "fbbeb5943ed244a1ab38bdd19b80a3ff",
      "deviceName": "ied-iem",
      "verionId": "MyVXdONT5Mq5JBRxFl56thmZwowl6tYk",
      "versionNumber": "0.0.5",
      "status": "LIVE"
    }
  ]
}

Download IE Device logs with date range filter

Download logs with your data range on IE Device, and you can define type by syslog or applog. If you don't assign any specific type, you can get all system and app logs on IE Device. Besides this, you require the device ID of the IE Device as unique identifier, and you can define the date range for your requirements:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/devices/filtered-logs?start=<your-start-date>&stop=<your-stop-date>&type=<your-type>&deviceid=<your-device-id>'

A successful response looks like this:

you may get a file named like this: device-data-202301160338.csv