CloudWatch Log Analytics
Analyzing Network Monitor Service
1. Filter for CreateMonitor API Calls
Returns all CreateMonitor events with key details including the monitor name, source IP, and IAM identity. Useful for auditing when new network monitors were provisioned and by whom.
SQL
SELECT eventTime,
eventName,
`requestParameters.monitorName`,
sourceIPAddress,
`userIdentity.arn`
FROM `LogGroup`
WHERE eventSource LIKE '%networkmonitor.amazonaws.com%'
AND eventName LIKE '%CreateMonitor%'
ORDER BY eventTime DESC
2. Summarize Network Monitor API Calls
Aggregates all Network Monitor API calls by event name, ordered by frequency. Provides a high-level view of which APIs are being called most — useful for understanding usage patterns and identifying unexpected activity.
SQL
SELECT eventName AS API,
COUNT(*) AS CallCount
FROM `LogGroup`
WHERE eventSource LIKE '%networkmonitor.amazonaws.com%'
GROUP BY eventName
ORDER BY CallCount DESC
Usage Notes
- Replace
`LogGroup`with the name of your CloudTrail log group. - The CloudTrail event source for Network Monitor is
networkmonitor.amazonaws.com. - These queries use the SQL query language — ensure your Log Insights console is set to SQL mode.
- Results can be visualized directly in a CloudWatch Dashboard using Log Insights widgets.