-
Notifications
You must be signed in to change notification settings - Fork 5
Measurement Discovery
OpenTestPoint discovery requests allow for the dynamic discovery of the measurements available from nodes running otestpointd
. The Controller
running as part of otestpointd
listens for discovery requests on the endpoint specified as part of the application configuration XML.
A discovery request is issued using a ZeroMQ REQ socket and the DiscoveryRequest
message shown below:
package OpenTestPoint;
option optimize_for = SPEED;
message DiscoveryRequest
{
enum Type
{
TYPE_DISCOVERY = 1;
}
required Type type = 1;
}
message DiscoveryResponse
{
message Error
{
required string what = 1;
}
message Discovery
{
required string publish = 1;
repeated string names = 2;
}
enum Type
{
TYPE_ERROR = 1;
TYPE_DISCOVERY = 2;
}
required Type type = 1;
optional Discovery discovery = 2;
optional Error error = 3;
}
DiscoveryResponse
messages are subdivided into one of two types: DISCOVERY
and ERROR
.
DiscoveryResponse
messages with type
set to TYPE_DISCOVERY
will have a Discovery
message present in the response discovery
member.
The Discovery
message has the following fields:
Field | Description |
---|---|
publish |
The ZeroMQ PUB socket endpoint used for publishing probe reports |
names |
The total listing of all the names of the probes published by the probe being managed. |
DiscoveryResponse
messages with type
set to TYPE_ERROR
will have an Error
message present in the response error
member.
The Error
message has the following field:
Field | Description |
---|---|
description |
The description of the error. |
The otestpoint-discover
application can be used to issue a DiscoveryRequest
message. Each probe registers the names of the measurement messages they are capable of publishing when initially loaded by the Controller
. Each probe message name is appended with the id
specified as part of the application configuration XML.
The below listing shows the output from using otestpoint-discover
to query an otestpointd
instance. More information on otestpoint-discover
can be found using the --help
option.
[me@host 1]$ otestpoint-discover node-1:8881
tcp://10.99.0.1:8882
EMANE.RFPipe.Counters.General.node-1
EMANE.RFPipe.Tables.Events.node-1
EMANE.RFPipe.Tables.Neighbor.node-1
EMANE.RFPipe.Tables.Status.node-1
EMANE.VirtualTransport.Counters.General.node-1
EMANE.VirtualTransport.Tables.Events.node-1
EMANE.VirtualTransport.Tables.Status.node-1
Although not required by the framework, it is a best practice for the id
value to be directly mapable to the node running the respective otestpointd
instance. Using the node hostname works well.
Copyright (c) 2014-2016 - Adjacent Link LLC, Bridgewater, New Jersey
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 4.0 International License.