Monitoring

The current state of the Bridge can be monitored by using the GET /admin/forwarder REST API.

The API returns the state and statistics for a single forwarder or for a selection of forwarders.

If you use the /admin/forwarder API, then the state of all forwarders is returned.

If you use /admin/forwarder/name, then the state of the named forwarder is used.

If the name contains an asterisk, then the state of all matching forwarders is returned.

The following status values can be used:

  • Config: there was no attempt to start the forwarder.
  • Wait: the forwarder is waiting for a reconnect.
  • Opening: the forwarder is in the process of opening connections.
  • Active: the forwarder is actively receiving and sending messages.
  • Failed: the connection is not restarted until a configuration change is made.
For example, run the following command and replace the status value as required:

{ 
"m2w": {
    "Status": "Active",
    "Enabled": 1,
    "Source": "MyServer",
    "Destination": "WIoTP",
    "SourceBytes": 115944,
    "SourceMsgs": 614,
    "DestBytes": 125768,
    "DestMsgs": 614
}
}

If the Bridge is not able to connect successfully, it provides a human-readable reason string and a reason code (SourceRC or Destruct, or both). The reason code corresponds to a message from the product. For example, destRC=92 corresponds to message ID CWLNA0092. Search the documentation for the message ID for more information.