Install NGINX Amplify Agent
To use F5 NGINX Amplify to monitor your infrastructure, you need to install NGINX Amplify Agent on each system you wish to monitor.
Note: NGINX Amplify Agent will drop root privileges on startup. It will then use the user ID of the usernginx
to set its effective user ID. The package install procedure will add thenginx
user automatically unless it’s already found in the system. If the user directive appears in the NGINX configuration, NGINX Amplify Agent will pick up the user specified in the NGINX config for its effective user ID (e.g.www-data
).
Take the following steps to install NGINX Amplify Agent:
-
Download and run the install script.
curl -sS -L -O \ https://github.com/nginxinc/nginx-amplify-agent/raw/master/packages/install.sh && \ API_KEY='YOUR_API_KEY' sh ./install.sh
Where YOUR_API_KEY is a unique API key assigned to your Amplify account. You will see the API key when adding a new system in the Amplify web interface. You can also find it in the Account menu.
-
Verify that NGINX Amplify Agent has started.
ps ax | grep -i 'amplify\-' 2552 ? S 0:00 amplify-agent
-
Add the NGINX public key.
curl -fs https://nginx.org/keys/nginx_signing.key | apt-key add -
or
wget -q -O - \ https://nginx.org/keys/nginx_signing.key | apt-key add -
-
Configure the repository as follows.
codename=`lsb_release -cs` && \ os=`lsb_release -is | tr '[:upper:]' '[:lower:]'` && \ echo "deb https://packages.amplify.nginx.com/py3/${os} ${codename} amplify-agent" > \ /etc/apt/sources.list.d/nginx-amplify.list
-
Verify the repository config file (Ubuntu 22.04 example follows).
cat /etc/apt/sources.list.d/nginx-amplify.list deb https://packages.amplify.nginx.com/py3/ubuntu jammy amplify-agent
-
Update the package index files.
apt-get update
-
Install and run NGINX Amplify Agent.
apt-get install nginx-amplify-agent
-
Add the NGINX public key.
curl -sS -L -O https://nginx.org/keys/nginx_signing.key && \ rpm --import nginx_signing.key
or
wget -q -O nginx_signing.key https://nginx.org/keys/nginx_signing.key && \ rpm --import nginx_signing.key
-
Create the repository config as follows (mind the correct release number).
Use the first snippet below for CentOS and Red Hat Linux. The second one applies to Amazon Linux.
release="7" && \ printf "[nginx-amplify]\nname=nginx amplify repo\nbaseurl=https://packages.amplify.nginx.com/py3/centos/${release}/\$basearch\ngpgcheck=1\nenabled=1\n" > \ /etc/yum.repos.d/nginx-amplify.repo
release="latest" && \ printf "[nginx-amplify]\nname=nginx amplify repo\nbaseurl=https://packages.amplify.nginx.com/py3/amzn/${release}/\$basearch\ngpgcheck=1\nenabled=1\n" > \ /etc/yum.repos.d/nginx-amplify.repo
-
Verify the repository config file (RHEL 9.5 example follows).
cat /etc/yum.repos.d/nginx-amplify.repo [nginx-amplify] name=nginx repo baseurl=https://packages.amplify.nginx.com/centos/9/$basearch gpgcheck=1 enabled=1
-
Update the package metadata.
yum makecache
-
Install and run NGINX Amplify Agent.
yum install nginx-amplify-agent
api_key="YOUR_API_KEY" && \
sed "s/api_key.*$/api_key = ${api_key}/" \
/etc/amplify-agent/agent.conf.default > \
/etc/amplify-agent/agent.conf
API_KEY is a unique API key assigned to your Amplify account. You will see your API key when adding a new system using the Amplify web interface. You can also find the API key in the Account menu.
service amplify-agent start
service amplify-agent stop
service amplify-agent restart
ps ax | grep -i 'amplify\-'
2552 ? S 0:00 amplify-agent