Skip to main content

monitors

Creates, updates, deletes, gets or lists a monitors resource.

Overview

Namemonitors
TypeResource
Idaws.networkflowmonitor.monitors

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time when the monitor was created.
local_resourcesarrayThe local resources to monitor. A local resource in a workload is the location of the hosts where the Network Flow Monitor agent is installed.
modified_atstring (date-time)The date and time when the monitor was last modified.
monitor_arnstringThe Amazon Resource Name (ARN) of the monitor. (pattern: <code>arn:.*</code>)
monitor_namestringThe name of the monitor. (pattern: <code>[a-zA-Z0-9_.-]+</code>)
monitor_statusstringThe status of a monitor. The status can be one of the following PENDING: The monitor is in the process of being created. ACTIVE: The monitor is active. INACTIVE: The monitor is inactive. ERROR: Monitor creation failed due to an error. DELETING: The monitor is in the process of being deleted. (PENDING, ACTIVE, INACTIVE, ERROR, DELETING)
remote_resourcesarrayThe remote resources to monitor. A remote resource is the other endpoint specified for the network flow of a workload, with a local resource. For example, Amazon Dynamo DB can be a remote resource.
tagsobjectThe tags for a monitor.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_monitorselectmonitor_name, regionGets information about a monitor in Network Flow Monitor based on a monitor name. The information returned includes the Amazon Resource Name (ARN), create time, modified time, resources included in the monitor, and status information.
list_monitorsselectregionnextToken, maxResults, monitorStatusList all monitors in an account. Optionally, you can list only monitors that have a specific status, by using the STATUS parameter.
create_monitorinsertregion, monitorName, localResources, scopeArnCreate a monitor for specific network flows between local and remote resources, so that you can monitor network performance for one or several of your workloads. For each monitor, Network Flow Monitor publishes detailed end-to-end performance metrics and a network health indicator (NHI) that informs you whether there were Amazon Web Services network issues for one or more of the network flows tracked by a monitor, during a time period that you choose.
update_monitorupdatemonitor_name, regionUpdate a monitor to add or remove local or remote resources.
delete_monitordeletemonitor_name, regionDeletes a monitor in Network Flow Monitor.
start_query_monitor_top_contributorsexecmonitor_name, region, startTime, endTime, metricName, destinationCategoryCreate a query that you can use with the Network Flow Monitor query interface to return the top contributors for a monitor. Specify the monitor that you want to create the query for. The call returns a query ID that you can use with GetQueryResultsMonitorTopContributors to run the query and return the top contributors for a specific monitor. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable APIs for the top contributors that you want to be returned.
stop_query_monitor_top_contributorsexecmonitor_name, query_id, regionStop a top contributors query for a monitor. Specify the query that you want to stop by providing a query ID and a monitor name. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
monitor_namestringThe name of the monitor.
query_idstringThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to create a query.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe number of query results that you want to return with this call.
monitorStatusstringThe status of a monitor. The status can be one of the following PENDING: The monitor is in the process of being created. ACTIVE: The monitor is active. INACTIVE: The monitor is inactive. ERROR: Monitor creation failed due to an error. DELETING: The monitor is in the process of being deleted.
nextTokenstringThe token for the next set of results. You receive this token from a previous call.

SELECT examples

Gets information about a monitor in Network Flow Monitor based on a monitor name. The information returned includes the Amazon Resource Name (ARN), create time, modified time, resources included in the monitor, and status information.

SELECT
created_at,
local_resources,
modified_at,
monitor_arn,
monitor_name,
monitor_status,
remote_resources,
tags
FROM aws.networkflowmonitor.monitors
WHERE monitor_name = '{{ monitor_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Create a monitor for specific network flows between local and remote resources, so that you can monitor network performance for one or several of your workloads. For each monitor, Network Flow Monitor publishes detailed end-to-end performance metrics and a network health indicator (NHI) that informs you whether there were Amazon Web Services network issues for one or more of the network flows tracked by a monitor, during a time period that you choose.

INSERT INTO aws.networkflowmonitor.monitors (
monitorName,
localResources,
remoteResources,
scopeArn,
clientToken,
tags,
region
)
SELECT
'{{ monitorName }}' /* required */,
'{{ localResources }}' /* required */,
'{{ remoteResources }}',
'{{ scopeArn }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
created_at,
local_resources,
modified_at,
monitor_arn,
monitor_name,
monitor_status,
remote_resources,
tags
;

UPDATE examples

Update a monitor to add or remove local or remote resources.

UPDATE aws.networkflowmonitor.monitors
SET
localResourcesToAdd = '{{ localResourcesToAdd }}',
localResourcesToRemove = '{{ localResourcesToRemove }}',
remoteResourcesToAdd = '{{ remoteResourcesToAdd }}',
remoteResourcesToRemove = '{{ remoteResourcesToRemove }}',
clientToken = '{{ clientToken }}'
WHERE
monitor_name = '{{ monitor_name }}' --required
AND region = '{{ region }}' --required
RETURNING
created_at,
local_resources,
modified_at,
monitor_arn,
monitor_name,
monitor_status,
remote_resources,
tags;

DELETE examples

Deletes a monitor in Network Flow Monitor.

DELETE FROM aws.networkflowmonitor.monitors
WHERE monitor_name = '{{ monitor_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Create a query that you can use with the Network Flow Monitor query interface to return the top contributors for a monitor. Specify the monitor that you want to create the query for. The call returns a query ID that you can use with GetQueryResultsMonitorTopContributors to run the query and return the top contributors for a specific monitor. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable APIs for the top contributors that you want to be returned.

EXEC aws.networkflowmonitor.monitors.start_query_monitor_top_contributors
@monitor_name='{{ monitor_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"startTime": "{{ startTime }}",
"endTime": "{{ endTime }}",
"metricName": "{{ metricName }}",
"destinationCategory": "{{ destinationCategory }}",
"limit": {{ limit }}
}'
;