Machines - List Ports
Returns a collection of live ports on the specified machine during the specified time interval.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machines/{machineName}/ports?api-version=2015-11-01-preview
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machines/{machineName}/ports?api-version=2015-11-01-preview&startTime={startTime}&endTime={endTime}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
machine
|
path | True |
string |
Machine resource name. |
resource
|
path | True |
string |
Resource group name within the specified subscriptionId. Regex pattern: |
subscription
|
path | True |
string |
Azure subscription identifier. |
workspace
|
path | True |
string |
OMS workspace containing the resources of interest. Regex pattern: |
api-version
|
query | True |
string |
API version. |
end
|
query |
string date-time |
UTC date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow |
|
start
|
query |
string date-time |
UTC date and time specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The operation completed successfully. |
|
Other Status Codes |
An error occurred while processing the request. See the error.code parameter to identify the specific error. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
SMMachinesListPortsGet
Sample Request
GET https://management.azure.com/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/features/serviceMap/machines/m-999066c5-38c5-4f2f-9ce0-51d738cdc432/ports?api-version=2015-11-01-preview&startTime=2018-01-07T08:01:48.525Z&endTime=2018-01-07T08:01:48.525Z
Sample Response
{
"value": [
{
"kind": "port",
"properties": {
"monitoringState": "monitored",
"machine": {
"kind": "ref:machine",
"id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-999066c5-38c5-4f2f-9ce0-51d738cdc432",
"type": "Microsoft.OperationalInsights/workspaces/features/machines",
"name": "m-999066c5-38c5-4f2f-9ce0-51d738cdc432"
},
"displayName": ":8000",
"ipAddress": "192.168.1.1",
"portNumber": 8000
},
"id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-999066c5-38c5-4f2f-9ce0-51d738cdc432/ports/b-c0a80101_8000",
"type": "Microsoft.OperationalInsights/workspaces/features/machines/ports",
"name": "b-c0a80101_8000"
},
{
"kind": "port",
"properties": {
"monitoringState": "monitored",
"machine": {
"kind": "ref:machine",
"id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-999066c5-38c5-4f2f-9ce0-51d738cdc432",
"type": "Microsoft.OperationalInsights/workspaces/features/machines",
"name": "m-999066c5-38c5-4f2f-9ce0-51d738cdc432"
},
"displayName": ":8001",
"ipAddress": "192.168.1.1",
"portNumber": 8001
},
"id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-999066c5-38c5-4f2f-9ce0-51d738cdc432/ports/b-c0a80101_8001",
"type": "Microsoft.OperationalInsights/workspaces/features/machines/ports",
"name": "b-c0a80101_8001"
},
{
"kind": "port",
"properties": {
"monitoringState": "monitored",
"machine": {
"kind": "ref:machine",
"id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-999066c5-38c5-4f2f-9ce0-51d738cdc432",
"type": "Microsoft.OperationalInsights/workspaces/features/machines",
"name": "m-999066c5-38c5-4f2f-9ce0-51d738cdc432"
},
"displayName": ":8002",
"ipAddress": "192.168.1.1",
"portNumber": 8002
},
"id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-999066c5-38c5-4f2f-9ce0-51d738cdc432/ports/b-c0a80101_8002",
"type": "Microsoft.OperationalInsights/workspaces/features/machines/ports",
"name": "b-c0a80101_8002"
}
]
}
Definitions
Name | Description |
---|---|
Client |
Reference to a client group. |
Error |
Error details. |
Error |
An error response from the API. |
Machine |
Reference to a machine. |
Machine |
A machine reference with a hint of the machine's name and operating system. |
Monitoring |
Used to specify if a resources is monitored or discovered. |
Operating |
Specifies the operating system family, e.g., Linux, Windows, etc. |
Port |
A port resource represents a server port on a machine. The port may be actively monitored, i.e., a Dependency Agent is running on its machine, or discovered, i.e., its existence was inferred by observing the data stream from monitored machines. A port is live during an interval of time, if that port had associated activity during (parts) of that interval. |
Port |
Collection of Port resources. |
Port |
Reference to a port. |
Process |
Reference to a process. |
ClientGroupReference
Reference to a client group.
Name | Type | Description |
---|---|---|
id |
string |
Resource URI. |
kind |
string:
ref:clientgroup |
Specifies the sub-class of the reference. |
name |
string |
Resource name. |
type |
string |
Resource type qualifier. |
Error
Error details.
Name | Type | Description |
---|---|---|
code |
string |
Error code identifying the specific error. |
message |
string |
Error message in the caller's locale. |
ErrorResponse
An error response from the API.
Name | Type | Description |
---|---|---|
error |
Error information. |
MachineReference
Reference to a machine.
Name | Type | Description |
---|---|---|
id |
string |
Resource URI. |
kind |
string:
ref:machine |
Specifies the sub-class of the reference. |
name |
string |
Resource name. |
type |
string |
Resource type qualifier. |
MachineReferenceWithHints
A machine reference with a hint of the machine's name and operating system.
Name | Type | Description |
---|---|---|
id |
string |
Resource URI. |
kind |
string:
ref:machinewithhints |
Specifies the sub-class of the reference. |
name |
string |
Resource name. |
properties.displayNameHint |
string |
Last known display name. |
properties.osFamilyHint |
Last known operating system family. |
|
type |
string |
Resource type qualifier. |
MonitoringState
Used to specify if a resources is monitored or discovered.
Name | Type | Description |
---|---|---|
discovered |
string |
|
monitored |
string |
OperatingSystemFamily
Specifies the operating system family, e.g., Linux, Windows, etc.
Name | Type | Description |
---|---|---|
aix |
string |
|
linux |
string |
|
solaris |
string |
|
unknown |
string |
|
windows |
string |
Port
A port resource represents a server port on a machine. The port may be actively monitored, i.e., a Dependency Agent is running on its machine, or discovered, i.e., its existence was inferred by observing the data stream from monitored machines. A port is live during an interval of time, if that port had associated activity during (parts) of that interval.
Name | Type | Description |
---|---|---|
etag |
string |
Resource ETAG. |
id |
string |
Resource identifier. |
kind |
string:
port |
Additional resource type qualifier. |
name |
string |
Resource name. |
properties.displayName |
string |
Name to use for display purposes. |
properties.ipAddress |
string |
IP address associated with the port. At present only IPv4 addresses are supported. |
properties.machine | ResourceReference: |
Machine hosting this port. |
properties.monitoringState |
Specifies whether the port is actively monitored or discovered. |
|
properties.portNumber |
integer |
Port number. |
type |
string |
Resource type. |
PortCollection
Collection of Port resources.
Name | Type | Description |
---|---|---|
nextLink |
string |
The URL to the next set of resources. |
value |
Port[] |
Collection of Port resources. |
PortReference
Reference to a port.
Name | Type | Description |
---|---|---|
id |
string |
Resource URI. |
kind |
string:
ref:port |
Specifies the sub-class of the reference. |
name |
string |
Resource name. |
properties.ipAddress |
string |
IP address of the port. |
properties.machine |
Machine hosting the port. |
|
properties.portNumber |
integer |
Port number. |
type |
string |
Resource type qualifier. |
ProcessReference
Reference to a process.
Name | Type | Description |
---|---|---|
id |
string |
Resource URI. |
kind |
string:
ref:process |
Specifies the sub-class of the reference. |
name |
string |
Resource name. |
properties.machine |
Machine hosting the process. |
|
type |
string |
Resource type qualifier. |