AWS EC2
Getting started with Akita is as simple as dropping our Agent into your stack. Below are instructions for installing the Akita Agent on AWS EC2 instances.
To set up the Akita Agent you will:
- Create an Akita Project
- Generate an API key for the Akita Agent
- Install the Akita Agent
- Log in to the Akita Agent
- Start the Akita Agent
- Verify that the Akita Agent is working
You can also configure the Akita Agent to start when the system boots, which is helpful if you have EC2 instances that start and stop frequently.
Akita Account Required
You must have an Akita account to use Akita. You can create an account here.
Create a project
Log-in to the Akita App, and go to the Settings page.
Enter a project name and click "Create Project". We suggest naming the project after your app or deployment stack.
Give your project a name that's easy to remember – you'll need it later, when you start the Akita Agent on the CLI.
Generate API key
On the same Settings page, locate and click the “API Keys” tab. Click the “Set up the Akita client” button. Copy your API key secret into your favorite password manager or somewhere else you can easily access it. Also note your API key, as you will need it later.
Install Agent
To install the Akita Agent, run the following:
bash -c "$(curl -L https://releases.akita.software/scripts/install_akita.sh)"
Agent login
To log into the Akita Agent, run the following and enter your Akita API key ID and key secret when prompted:
akita login
Start Agent
Then start the Akita Agent by running the below command. If you know the port where most of your data comes through, set it explicitly using the --filter “port ${SERVICE_PORT}”
flag. This command will set up the Akita Agent to run continuously.
akita apidump\
--project <your_project_name> \
--filter "port ${SERVICE_PORT}"
Verify
In the Akita web console, check out the incoming data on the Model page. You should see a map of your API being generated as the Akita Agent gathers data.
Then check out the Metrics and Errors page to get real-time information on the health of your app or service.
Starting Agent on system boot
This section applies to Ubuntu and other Debian-based Linux distributions only.
The APT package that you installed above has a systemd service file for integrating Akita Agent into systemd. To start the Akita Agent on system boot:
- Edit
/etc/default/akita-client
to configure the service. This file should be self-explanatory. You will need to configure the API key and any command-line arguments for the CLI. An example is given below. The existing comments in the file are elided for brevity.
AKITA_API_KEY_ID=apk_XXXXXXXXXXXXXXXXXXXXXX
AKITA_API_KEY_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PROJECT_NAME=my-project
INTERFACES=lo,eth0,eth1
FILTER="port 80 or port 8080"
EXTRA_APIDUMP_ARGS="--rate-libit 100"
- Once configured, have systemd read the new configuration:
3. You can then start and enable the `akita-client` service in the usual manner:
- `systemctl start akita-client` will start the Akita Client running as a service.
- `systemctl enable akita-client` enables the service to start on boot.
- `systemctl status akita-client` checks the status of the service.
- `systemctl restart akita-client` restarts the service.
Updated over 1 year ago