How do you currently monitor your Nginx and PHP applications? Meet – Nginx Amplify
A SaaS-based monitoring solutions for Nginx open source, Plus, PHP-FPM application and underlying operating system components. Amplify is hosted in AWS, and it communicates through agent over TLS. The agent is available for all the primary operating system.
How does it work?
You need to install the agent on the server where Nginx and PHP application is running. The agent is lightweight and once installed, it will start pushing necessary logs and monitoring data to Amplify servers. Within a few minutes, metrics are available on Nginx Amplify dashboard. Sounds easy.
Monitoring Metrics
There are some useful metrics monitored by Amplify. I am testing on my WordPress server which is running on Ubuntu, Nginx, PHP-FPM, MariaDB and could see the following. Under Nginx, some of the important ones are following.
Number of current connections and requests CPU and memory usage Nginx and upstream take time to response Requests split by protocol Count of error request – 40x, 50x Count of workers and file descriptors Traffic served by bytes
And a lot more. All the metrics are displayed in easy to understand graphs and can be filtered by the timeline.
Under PHP-FPM, you will notice the following.
Current process by active, idle and total Connection queue Slow requests Max process
Under System, a lot of OS/server metrics.
CPU, Disk, Swap and Memory utilization Network traffic Disk IO/IOPS Disk latency Average load
Pretty cool for performance monitoring and troubleshooting. Isn’t it? Amplify got a dashboard which let you add the metrics you are interested in. You can create a dashboard and add them manually or push the metrics from the graph.
Alerting
Monitoring system without alerting is incomplete. Amplify got alerting covered. You can choose the metrics and threshold to create an alert and get notified when its breached.
Setting up alerts is straightforward.
How to Install Nginx Amplify?
I loved the Amplify’s feature, and installation is easy. I was able to get it started in less than 10 minutes. As a best practice, you may want to try this in non-production to ensure everything is working as expected. Since its SaaS solution, you got to create an account here.
Once account created, log in to Amplify, and you will be prompted with the agent installation instructions.
Next, you will be asked to confirm the configuration. The default configuration should contain this already but better confirm and adjust if needed.
Continue to finish the installation.
You will need to add some additional configuration to monitor more metrics. You’ll find those here. Once everything is good, you will notice metrics in the Amplify dashboard. I would strongly recommend taking a backup of configuration file before modifying. There are more to do, and you can check the official documentation to get an idea. When you log in to Amplify, you will be redirected to Overview tab which looks like below.
This is great! You can see the application availability and essential metrics at a glance. Conclusion Amplify is easy to set up and a perfect SaaS Nginx monitoring solution for small to enterprise business. The great thing about is, it got a free plan so you can try to see how it works. If you need help on Nginx, then check out this online course by Ray Viljoen. Alternatively, you may also want to try out GoAccess – an open source monitoring utility for Nginx and Apache.