مرور مانیتورینگ سلامت سرور0:01
Forge takes the responsibility for spinning up our servers and our sites. And when we want to take action on a server or a site or several other things in our Forge account, it makes it easy. Usually you're just clicking a button. But when we are not taking an action, those servers are still running and the responsibility to make sure they're still running and still running the way we want them
Viewing Server Metrics0:16
and the responsibility to make sure they're still running and still running the way we want them to be is in the end on us. Thankfully, forge offers a few tools to make that easier for us. So the first way to take a look at the health of our server is something called metrics. If you want a quick glance at two of our most important health indicators, which is the CPU and memory usage, we've got two places to look at that.
of our most important health indicators, which is the CPU and memory usage, we've got two places to look at that. First, if we just go to our server and we scroll down a little bit, we will see the average over the last hour CPU usage and memory usage for the server. If we want to go a little bit more in depth, we click on observe and metrics. We can see those over various time periods. So one hour, six hours, one day, one week, one month.
We can see those over various time periods. So one hour, six hours, one day, one week, one month. And also if we scroll down a little bit, we have two more metrics here, inbound and outbound bandwidth. Now, this information is very valuable for you to look at when you feel like it, but what happens when it gets in a bad shape and you're not looking at it? Thankfully, forge has a tool called Server Monitors,
Setting Up Server Monitors1:09
and you're not looking at it? Thankfully, forge has a tool called Server Monitors, which allows you to set thresholds for server Health past, which you'll be notified. So you go to server, observe and then click on monitoring. And for each of these monitors, you are able to define a metric. So CPU Load average use dis space or use memory a condition. It's either greater than or equal to or less than or equal to a particular percentage.
It's either greater than or equal to or less than or equal to a particular percentage. And then it has to have met that condition for over a certain number of minutes, at which point you'll get a notification. So you can say, Hey, if the CPU load average is greater than or equal to 80% for at least 15 minutes, then notify me and you put your email address right here, and then you can just know that you're gonna get notified anytime that happens.
Configuring App Health Checks1:46
and then you can just know that you're gonna get notified anytime that happens. That's it. We also have the ability to check App level Health, not just server level health. And there's a tool called Health Checks. This makes it possible for you to check that, not just that the server is running, but that your site is running, especially after Deploy. So you go to your site and you click on settings. And then deployments. If you scroll the whole way down
So you go to your site and you click on settings. And then deployments. If you scroll the whole way down to the bottom, there's something called Health Checks here. It says, after your site is finished deploying Forge will ping a URL in your application to ensure it's still available. When you turn this on, you can pick what the URL is, it'll by default assume it is the URL slash up, which is something that should be accessible in any modern LABLE applications. But you can also set your own definition for this route.
Reviewing Server and Site Logs2:24
that should be accessible in any modern LABLE applications. But you can also set your own definition for this route. If you want, basically from multiple places around the world, it's gonna ping this URL and make sure that it's a, you know, not an an error code, basically. Um, and if it is an error code, then you'll get notified. And finally, if you wanna dig into what's going on at a deeper level, you can use Forge to check out your logs at several different levels.
deeper level, you can use Forge to check out your logs at several different levels. First, we can go to the server level and we can see all sorts of logs related to the systems that make the server work. So you go to observe logs, and you can see We have these sorts of logs. We've got MySQL logs, and NGINX logs, and PHP logs, and SSH logs and upgrade logs. But this is less to do with the specific sites
and SSH logs and upgrade logs. But this is less to do with the specific sites and more to do with the functionality that actually makes your server operate. And then at the site level, we can also go to observe logs and we can see logs specific to the site. The site log, which is your Laravel log, the N Engine X access log, and the N Engine X error log for that site. And we have access to all of those here as well.
and the N Engine X error log for that site. And we have access to all of those here as well.
