Guides and automates setup, onboarding, synthetic monitoring operations, and cleanup for Cloud Network Insights in Google Cloud and Broadcom AppNeta. Use when enabling Cloud Network Insights, deploying or troubleshooting Monitoring Points across cloud and on-premises environments, configuring Network or Web monitoring policies and AppNeta alarm rules, configuring alert policies, querying path alarms and performance metrics, verifying synthetic path reachability, removing specific or all Monitoring Points, monitoring policies, and their hosts, or turning Cloud Network Insights off (only after warning the user and getting an explicit yes). Don't use for generic network observability, VPC Flow Logs, Cloud NAT, or VPC firewall debugging.
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
High
Do not use without reviewing
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Cloud Network Insights runs synthetic network and web tests from Monitoring Points (MPs) that report to Broadcom AppNeta. Find the user's task, run its check-first command, and follow only the linked steps.
| Task | Check first | Steps |
|---|---|---|
| Enable Cloud Network Insights or check its status | providers list | 1. Enable |
| Deploy a container (c50) MP or the Compute Engine appliance | monitoring-points list | 2. Deploy |
| Deploy an MP on Kubernetes, AWS, Azure, VMware, or KVM | monitoring-points list | Platform Summary |
| Create Network or Web monitoring policies | AppNeta reachability probe | 3. Policies |
| Verify Monitoring Points and paths | monitoring-points list | 4. Verify |
| Remove specific policies or Monitoring Points, or everything you set up | monitoring-points list; list and confirm first (Rule 4) | 5. Clean Up |
| Turn Cloud Network Insights off | providers list; warn and ask first (Rule 4) | Turning Off |
| Alert policies, alarm logs, and path metrics | gcloud monitoring policies list | 6. Alerts |
| Troubleshoot a Monitoring Point | monitoring-points describe | 7. Troubleshoot |
Check-first commands (PROVIDER_ID is external when Cloud Network Insights
was enabled in the Google Cloud console):
gcloud network-management network-monitoring-providers list --location=global --project=PROJECT_ID
gcloud network-management network-monitoring-providers monitoring-points list \
--network-monitoring-provider=PROVIDER_ID --location=global --project=PROJECT_ID--project=PROJECT_ID to every command.
Without a user preference, use region us-central1 and zone
us-central1-a (others:
Google Cloud locations).gcloud, curl, and ssh yourself whenever your
environment and the user allow them, and prefer them to console pages.
Hand a step to the user only when it needs a browser you don't have (the
Broadcom terms in the Google Cloud console, the AppNeta web UI) or an
endpoint is unreachable from your environment; give the exact URL, clicks
or commands, and success signal. Start independent long-running work
(such as VM creation) first, and put every question and console step you
need (names, approvals, terms) in one message.gcloud (the default) or Terraform has no
terms step; only the Google Cloud Marketplace page shows its listing's
terms, so use it only when the user asks for Marketplace. Unless the
user's message explicitly pre-approved accepting all Terms of Service
(general task instructions and CLI auto-approve flags don't count), stop
before accepting any terms and ask: without a browser tool, give the
console URL and clicks for the user to accept; with one, summarize the
main points of the terms shown in the console, say that the full text
there is what applies, and accept only after an explicit yes. Why:
accepting terms binds the user to a legal agreement.networkmanagement.googleapis.com: Connectivity Tests and other Network
Intelligence Center features use it. Why: --quiet skips gcloud's own
delete prompt, and an AppNeta deletion also erases its paths' history.mktemp -d once and use the printed path as
WORK_DIR for install bundles, mp-config files, and tokens. Never print,
echo, or paste tokens, device keys, bundles, or mp-config contents, not
even a few lines with head. Monitoring Point VMs hold their device key or
bundle in instance metadata, so describe them only with a --format that
leaves out metadata, such as --format="value(name,status)". Never use
curl -v, --verbose, or --trace on AppNeta calls (they print the
token), and run gcloud auth print-access-token (or its
application-default form) and generate-provider-access-token only
inside $(...), piped, or redirected to a file, as this skill shows.0.0.0.0/0 or TCP 22 without explicit approval). Never create
service accounts, impersonate accounts, change IAM, or run gcloud auth login yourself; if a permission is missing, name the role the user needs.ACTIVE,
ONLINE, OFFLINE, created, deleted) must come from a command you ran in
this session.gcloud is missing, point the user to
Install the gcloud CLI
instead of installing it yourself, and give console steps until it's
installed. The AppNeta API scripts also need curl and jq.gcloud auth login, or gcloud auth application-default login where
a command falls back to Application Default Credentials. The project needs
an active billing account; see
Network Intelligence Center pricing.roles/networkmanagement.CloudNetworkInsightsAdmin plus
roles/serviceusage.serviceUsageAdmin; managing providers, bundles, and
policies needs roles/networkmanagement.CloudNetworkInsightsEditor;
read-only queries need roles/networkmanagement.CloudNetworkInsightsViewer.
Monitoring Point VMs also need Compute Engine roles:
roles/compute.instanceAdmin.v1 for the default gcloud path (others:
Compute Engine Appliance),
and a proxy VM's firewall rule needs roles/compute.securityAdmin.Enable the API. It's idempotent, so run it even if it may be enabled:
gcloud services enable networkmanagement.googleapis.com --project=PROJECT_IDIf it fails because the Google Cloud Terms of Service aren't accepted, ask the user to sign in to the Google Cloud console once and accept them.
Run the providers list check-first command. If a provider is listed,
note its ID as PROVIDER_ID and go to step 5.
If none is listed, try to create it. This works only if the Broadcom
terms were accepted in this project before (for example, before someone
turned Cloud Network Insights off), and then PROVIDER_ID is external:
gcloud network-management network-monitoring-providers create external \
--provider-type=EXTERNAL --location=global --project=PROJECT_IDIf it fails with Terms of Service not accepted (code 9), go to step 4.
The Broadcom End User Agreement must be accepted in the console, which
gcloud can't do (Rule 3). Without a browser tool, ask the user to open
https://console.cloud.google.com/net-intelligence/cloud-network-insights/onboarding?project=PROJECT_ID,
click Enable, check the Broadcom agreement, click Accept, and
reply when the page says it's enabled, even if they told you to accept
all terms. With a browser tool, open that page, summarize the agreement's
main points, say that the console's full text is what applies, and click
Accept only after an explicit yes (or at once if the user told you in
advance to accept all terms). Accepting creates the provider external,
so don't run create afterwards; say that you'll then confirm it in
providers list and wait for ACTIVE (step 5).
Poll every 15 seconds until the state is ACTIVE, usually 30-60 seconds
after the terms are accepted (ACTIVATING means AppNeta is provisioning).
providerUri is the AppNeta host (APPNETA_HOST):
gcloud network-management network-monitoring-providers describe PROVIDER_ID \
--location=global --project=PROJECT_ID --format="value(state,providerUri)"There are 7 deployment types: container (c50), helm, gce-vm (Compute
Engine appliance), aws-ec2, azure-vm, vmware, and kvm. Never assume a
type: each one installs differently and measures from a different place, so
ask which environment the user wants to measure from. The VM or host name
becomes the Monitoring Point name (HOSTNAME).
Create WORK_DIR if needed and run the monitoring-points list
check-first command. If HOSTNAME is already listed, even as OFFLINE,
pick an unused name (ask first if the user chose it).
Follow the matching path in the Monitoring Point Deployment Reference:
| Situation | Path |
|---|---|
| Container MP on a new Compute Engine VM (default on Google Cloud; no SSH needed) | Path B: startup script |
| Container MP on an existing Linux host that you can log in to | Path A: existing host |
| Compute Engine appliance | Step 1: gcloud; Terraform or Google Cloud Marketplace only if the user asks |
| Kubernetes, AWS, Azure, VMware, or KVM | Platform Summary |
Deploy the Compute Engine appliance yourself with gcloud. Don't ask the
user to open Google Cloud Marketplace or to accept its terms: this path
has no terms step. Use the Marketplace page only when the user asks for it
(Step 3).
Wait for connectionStatus: ONLINE with the polling loop below:
| After | Poll every | Usually ONLINE |
|---|---|---|
Container setup.sh install on a host | 10 seconds | Within 30 seconds |
| Container VM created with the startup script | 30 seconds | About 2-3 minutes |
| Appliance VM created | 30 seconds | About 3 minutes |
Run each wait as this one blocking command. It prints the list every 30
seconds and stops when HOSTNAME shows STATE (ONLINE after a deployment,
OFFLINE after a host deletion), for at most 10 minutes. For several
Monitoring Points, chain one echo "$s" | grep -q ... test per HOSTNAME with
&& before break. Don't run separate sleep commands or check a background
task's status while it runs; if your tool backgrounds it, wait for its
completion message.
for i in $(seq 1 20); do
s=$(gcloud network-management network-monitoring-providers monitoring-points list \
--network-monitoring-provider=PROVIDER_ID --location=global --project=PROJECT_ID \
--format="value(displayName,connectionStatus)")
echo "$s"
echo "$s" | grep -q "^HOSTNAME[[:space:]]*STATE$" && break
sleep 30
doneMonitoring policies (/api/v4/monitoringPolicy, AppNeta REST API v4) define
the tests: Network policies measure loss, latency, and jitter to an IP or
host over TCP or UDP; Web policies run HTTP/HTTPS checks such as a GET
with a 200 assertion. Alarm rules exist only in the AppNeta web UI
(Alarms > Alarm Rules; see
Broadcom Alarm Rules),
not the REST API v4.
Probe the AppNeta API once from your environment, with a short timeout
(APPNETA_HOST is the providerUri from 1. Enable,
step 5):
curl -sS -o /dev/null -w '%{http_code}\n' --connect-timeout 10 --max-time 15 \
"https://APPNETA_HOST/api/v4/organization"401 is normal here): AppNeta is reachable. Run the
policy script
yourself.000, curl exit code 6, 7, or 28: AppNeta is unreachable from your
environment. Don't retry. Fill in the script (step 2) and give the
user three choices in one message (Rule 6): (a) create the policies in
the AppNeta web UI with the
UI steps, filled
in; (b) run the complete filled-in script, pasted as a Markdown code
block (it holds no tokens or keys; never just a path to a file in your
environment), from a machine with gcloud, curl, jq, and HTTPS
access to APPNETA_HOST; or (c) let you create a small proxy VM in the
project and run the script from it
(Proxy VM). Then
continue with the rest of the task.Fill in the script with one create_policy NAME TARGET MP_NAME network|web
line per policy. It picks this project's organization by name, skips names
that already exist there, and scopes each policy to one Monitoring Point.
For custom payloads, use the
step-by-step calls.
On HTTP 401, rerun the script once; it mints a fresh token (tokens last
about one hour). If 401 persists, stop and give the user the options:
gcloud auth application-default print-access-token as the Google Cloud
token (certificate-bound user tokens exchange into AppNeta tokens that get
401), signing in again with gcloud auth login, or a token from a
service account that has
roles/networkmanagement.CloudNetworkInsightsEditor. Never create service
accounts, impersonate, or change IAM yourself.
Confirm the new paths with network-paths list and web-paths list
(4. Verify).
Monitoring Points: connectionStatus must be ONLINE.
Network and Web Paths:
gcloud network-management network-monitoring-providers network-paths list \
--network-monitoring-provider=PROVIDER_ID --location=global --project=PROJECT_ID --format=json
gcloud network-management network-monitoring-providers web-paths list \
--network-monitoring-provider=PROVIDER_ID --location=global --project=PROJECT_ID --format=jsonFilter by Monitoring Point: Add
--filter="sourceMonitoringPointId=MONITORING_POINT_ID" (the last segment
of the Monitoring Point's name in monitoring-points list).
Expected Extra Paths: Each Web policy also creates a companion
NetworkPath to the target host (unless one already exists), and a newly
deployed Monitoring Point inherits paths from existing policies whose
monitoringPointRules match it.
Match the scope to the request, and touch nothing that this setup didn't create:
| Request | Do |
|---|---|
| Delete specific policies or Monitoring Points | Targeted Cleanup only |
| Remove everything you set up, keep Cloud Network Insights on | Full Cleanup |
| Turn Cloud Network Insights off | Turning Off, with no per-resource cleanup first |
Inventory only the named items (Full Cleanup, step 1), confirm them (step 2), and then:
network-paths list and web-paths list.OFFLINE (step 5), and delete its record (step 6). Its paths go with the
record; policies stay unless the user asks you to delete them.Cloud Network Insights stays enabled. Follow this order; each step depends on the previous one.
Inventory before deleting anything: run monitoring-points list,
network-paths list, web-paths list, gcloud compute instances list,
gcloud compute firewall-rules list, and, if anything came from Google
Cloud Marketplace, gcloud infra-manager deployments list --location=REGION (all with --project=PROJECT_ID). Then run the AppNeta
probe (3. Policies, step 1); if
AppNeta is reachable, look up the IDs of this organization's policies and
Monitoring Point records
(Delete by ID).
Confirm (Rule 4): reply with what you'll delete: the policies (name and ID), hosts (VMs with their zone, deployments, firewall rules), and Monitoring Point records (name and ID), and wait for a yes. Leave out anything this setup didn't create, or ask about it.
Delete the monitoring policies you listed, one DELETE call per ID
(Delete by ID);
404 means already deleted. If AppNeta is unreachable, give the user the
AppNeta web UI steps in the reply template below instead.
Delete the Monitoring Point hosts you listed. Delete a Marketplace
deployment with gcloud infra-manager deployments delete DEPLOYMENT --location=REGION --project=PROJECT_ID --quiet (it also removes its VM
and firewall rules), and other VMs as shown below; for Terraform, Helm,
and hosts that stay, see
Host Cleanup:
gcloud compute instances delete HOSTNAME_1 HOSTNAME_2 --zone=ZONE --project=PROJECT_ID --quietWait for OFFLINE: Monitoring Points turn OFFLINE about 4-5 minutes
after their host is deleted. Poll every 30 seconds with
the polling loop (STATE =
OFFLINE). If one is still ONLINE after 8 minutes, tell the user it will
turn OFFLINE shortly, and continue.
Delete the Monitoring Point records you listed, one DELETE call per
ID, with the AppNeta API (gcloud and the Google Cloud console can't
delete them), each only once it's OFFLINE; keep one that isn't
OFFLINE yet and delete it later. 404 means already deleted. On 401,
mint a new token once; on 403, name the role the user needs (Rule 7).
If AppNeta is unreachable, give the user the AppNeta web UI steps in the
reply template below instead (get PROJECT_NUMBER with gcloud projects describe PROJECT_ID --format="value(projectNumber)").
Verify and report: Re-run monitoring-points list and instances list, then reply with this template, filled in, in this order:
1. Monitoring policies: deleted NAME (ID), ... in AppNeta organization ORG_ID.
[If AppNeta was unreachable instead: open
https://APPNETA_HOST/pvc/monitoringPolicies.html?project=PROJECT_NUMBER and
delete NAME_1 and NAME_2 there.]
2. Hosts: deleted VM_NAMES / DEPLOYMENT / FIREWALL_RULES.
3. Monitoring Point records: deleted HOSTNAME_1 (ID), ... with the AppNeta API
[; kept HOSTNAME (not OFFLINE yet)].
[If AppNeta was unreachable instead: open
https://APPNETA_HOST/pvc/monitoringPoints.html?project=PROJECT_NUMBER, open
the menu next to each OFFLINE Monitoring Point (HOSTNAME_1, HOSTNAME_2),
click Delete, and confirm.] Check that they're gone with:
gcloud network-management network-monitoring-providers monitoring-points list --network-monitoring-provider=PROVIDER_ID --location=global --project=PROJECT_ID
4. Cloud Network Insights is still enabled. Turning it off is irreversible (it
deletes the AppNeta organization and every Monitoring Point record, policy,
path, alert policy, and their history). I can do it after you confirm, or
you can: in the Google Cloud console, open Network Intelligence Center >
Cloud Network Insights > Settings, click Disable product, type disable, and
click Confirm.Turning it off deletes every policy, path, and Monitoring Point record by
itself, so don't delete policies, wait for OFFLINE, or delete records first.
Unless the user's request already acknowledged these points, reply with them and wait for an explicit yes (Rule 4):
disable, and click
Confirm. If the project has a Cloud Network Insights subscription,
this doesn't cancel it.Ask whether you should turn it off now and then delete the Monitoring Point hosts you created, naming them.
After an explicit yes, run this (the console does the same; --force also
deletes the Monitoring Point records and paths), then confirm that
providers list is empty:
gcloud network-management network-monitoring-providers delete PROVIDER_ID \
--location=global --project=PROJECT_ID --force --quietThen delete the Monitoring Point hosts and firewall rules you named (Full Cleanup, step 4) if the user agreed; otherwise list them as still billed.
Follow Alerts, Logs, and Metrics for the alert policy file, path scoping, log queries, and metric queries. Always:
"userLabels": {"cloud-network-insights": "true"} in alert policies so
they appear in the Cloud Network Insights alert policies view.AND NOT jsonPayload.noise_conditions:* to insights_alarm alert
policy filters unless the user asks to include noisy alarms.jsonPayload.alarm_id isn't CLEARED.connectionStatus is ONLINE in
monitoring-points list (or describe).data.na1.cni.appneta.com, content.na1.cni.appneta.com,
comms.na1.cni.appneta.com, or .p. endpoints for Private Service Connect)
against Broadcom Firewall Configuration and
Add Monitoring Points.monitoring-points list
(and providers describe or instances list), and report only its states.ORG_ID; a 404 confirmed
absent) and what the user still has to do, each with its exact script,
commands, or click path.WORK_DIR when you're done.google/skills
12c78e8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.