Alpha feature

Install Postman Insights Agent on EC2

The Postman Insights Agent listens to the traffic arriving at the service you want to monitor and automatically populates your Insights Projects with endpoints.

To use the Insights Agent with a standalone Linux instance of Amazon EC2, complete the following steps. Then, you'll be automatically directed to the Endpoints tab.

Requirements

  • Your server's OS supports systemd.
  • Root user privileges in order to edit systemd files.

Install Insights Agent on EC2

To install the Insights Agent, do the following:

  1. Select Insights in the sidebar and select + to create a new Insights Project.

    Create an Insights Project

    The onboarding workflow displays, listing the installation instructions and supported deployments.

  2. Select AWS EC2.

    Install and configure Insights Agent
  3. Log in to the EC2 instance. For more information, see Connect to your EC2 Instance.

  4. As shown on the Insights onboarding screen, run the install script on that instance.

    bash -c "$(curl -L https://releases.observability.postman.com/scripts/install-postman-insights-agent.sh)"
    
  5. On the Insights onboarding screen, select Add API key, and then copy and paste the command in your shell.

    The command below is just an example. Your API key and project ID will be autopopulated.

    sudo POSTMAN_API_KEY=<add-your-api-key-here> postman-insights-agent ec2 setup --project <projectId>
    

    In the resulting output, the server checks for user permissions and the presence of systemd, configures systemd files, and enables Postman Insights Agent as a systemd service.

  6. Check the status or logs. Run the journalctl command:

    sudo journalctl -fu postman-insights-agent
    
  7. In Postman, check out the incoming data on the Insight Project's Endpoints tab. You should see a list of your endpoints being generated as the Insights Agent gathers data.

Run the help command for other configuration parameters.

postman-insights-agent ec2 --help

Your Insights Project can take a few minutes to populate.

You are ready to customize your insights and debug your endpoints. You can also review any traffic errors if your endpoints aren't populating.

Uninstall the Insights Agent

To stop the systemd service, run the following:

sudo systemctl disable postman-insight-agent.service

Last modified: 2024/08/26