Forge Monitoring Overview 0:00If you're providing a service that customers depend on, it's crucial that we make sure our server is monitored and we get notified before it goes down and completely ruins our evening. Forge provides active server monitoring as part of its business plan. Forge's server monitoring works by installing an agent onto your server. That agent will then periodically run every minute and check for the different monitors that we've configured. That means that if we're only interested in disk space, then we're not going to also be checking the CPU load average or the used memory. When the threshold has been met for at least the amount of time that we've configured, Monitor Types Explained 0:30then we're not going to also be checking the CPU load average or the used memory. When the threshold has been met for at least the amount of time that we've configured, then Forge is going to notify us. Once that threshold has been met, your server is going to continue monitoring the statistics and then notify us when everything resumes back to normal. With Forge's server monitoring, we can configure one of three different monitor types. The CPU load average is the average amount of load the server has experienced over the last few minutes. And a good rule of thumb is to ensure no more than 70% of our CPU is in use on average. The use disk space option allows us to track how much of the disk is currently in use.And a good rule of thumb is to ensure no more than 70% of our CPU is in use on average. The use disk space option allows us to track how much of the disk is currently in use. And if our server nears to 100% of the used space, then there is a high chance our web server will crash and everything will become unresponsive. We can avoid excessive usage by storing things like user uploaded files off our servers and perhaps using something like Amazon's S3 service. The used memory is the percentage of memory in use. When configuring a monitor for used memory, we need to be aware that if our server is also running a database server such as MySQL, then we should immediately expect a higher memory usage. Configuring Memory Monitor 1:38we need to be aware that if our server is also running a database server such as MySQL, then we should immediately expect a higher memory usage. And we will need to account for that by setting a higher threshold for the monitor. For this example, let's go with used memory. We can now check whether that value is greater than or equal to a threshold. In this monitor, we want to make sure that we're not hitting above 90% of our used memory. For this monitor, we want to make sure that we don't hit above 90% of our server's memory. And then we can also select how long that this should be happening for before we get a notification. If we experience 15 minutes of a high memory usage, Setting Notifications 2:13should be happening for before we get a notification. If we experience 15 minutes of a high memory usage, maybe that would be okay for a lower threshold, but anything around 90% we want to be aware of it very quickly. Let's say a five minute interval. And then finally, we need to provide Forge with an email address to notify. In this case, I'm going to go with james at laravel.com. And we can create. Now that five minutes have passed, we can see that the monitor status is now okay. If we simulate a high memory usage on this server, Simulating Alerts 2:41Now that five minutes have passed, we can see that the monitor status is now okay. If we simulate a high memory usage on this server, we will see that it changes to an alert state. And once we let everything settle down, it will return back to okay. Each time this status changes, then Forge is going to send us an email notification to let us know where we're currently at. And then we can also simulate a high memory usage on this server. In this case, I'm going to go with james at laravel.com. And then once we let everything settle down, it will return back to okay. Each time this status changes, then Forge is going to send us an email notificationAnd then once we let everything settle down, it will return back to okay. Each time this status changes, then Forge is going to send us an email notification to let us know where we're currently at.