---
title: "Updating the Netprobe"
description: "Learn how to update the Netprobe on EC2 instances using the `UpdateNetprobe.yaml` CloudFormation template with detailed steps and requirements."
url: "https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/cloud-native-deployments/deploying-via-aws-cloudformation/update-netprobe/index.html"
---
The `UpdateNetprobe.yaml` CloudFormation template updates the Netprobe on existing EC2 instances using the AWS Systems Manager (SSM). It follows the sequence:

- Stop the existing service.
- Back up the current `netprobe` directory.
- Remove the current `netprobe` directory.
- Download the new Netprobe package and setup file from S3.
- Restore ownership.
- Restart the `netprobe.service`.

## Prerequisites

- The target EC2 instances must have an [SSM Agent](https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html) installed and running.
- Target instances must have an IAM instance profile attached with the following permissions:
  - `AmazonSSMManagedInstanceCore` (for SSM communication)
  - S3 `read` access to the Netprobe artifacts bucket, as well as KMS `decrypt` if applicable.
- The `netprobe.service` systemd unit must exist on the instances.
- An existing Netprobe installation directory at `<NetprobeInstallDirectory>/netprobe`. The update operation verifies this directory exists and aborts if the directory is missing.
- The Netprobe package and setup file must be available in S3 at the provided URLs.

## Input parameters

### Target EC2 configuration

| Parameter | Description | Default | Required |
|-----------|-------------|---------|----------|
| `InstanceIds` | Comma-separated list of existing EC2 Instance IDs |  | Yes |

### Netprobe configuration

| Parameter | Description | Default | Required |
|-----------|-------------|---------|----------|
| `NetprobeInstallDirectory` | Directory where Netprobe will be installed | ~/geneos | No |
| `S3NetprobeURL` | S3 URL to the Netprobe tar.gz file |  | Yes |
| `S3NetprobeSetupURL` | S3 URL to the Netprobe setup XML file |  | Yes |

## Verification and debugging

Run the following commands if you need to verify or debug your deployment.

### View template execution logs

```bash
ssh -i <privatekey> <user>@<host> "sudo cat /var/log/amazon/ssm/amazon-ssm-agent.log"
```

### Check the service status

```bash
ssh -i <privatekey> <user>@<host> "systemctl is-active <service>.service"
```

### Download the logs

```bash
ssh -i <privatekey> <user>@<host> "sudo tar -cvz -C "cd <install_dir> && find <service> -type f -name '*.log' -print0 | sudo tar --null -czf - --files-from -" > <service>-logs.tar.gz
```

