sysguard_interval
The 'sysguard_interval' directive sets the interval, in seconds, for monitoring system performance metrics in the NGINX sysguard module.
Description
The 'sysguard_interval' directive is part of the NGINX sysguard module and is utilized to define the time interval, in seconds, at which the NGINX server should check and monitor system resource usage metrics, such as CPU load and memory usage. This directive allows administrators to fine-tune how frequently the server performs these checks, which can impact the responsiveness and performance of the server during high load conditions. By adjusting this interval, you can find a balance between prompt resource monitoring and the overhead introduced by frequent checks.
The value specified for 'sysguard_interval' is given in seconds and should be set according to the performance requirements and capabilities of the server. For instance, a lower value means more frequent checks, which could help in identifying performance bottlenecks quickly, but it also adds additional CPU overhead. Conversely, a higher value could reduce the overhead but may delay the response to critical performance issues. It is advisable to start with a moderate interval and adjust based on the observed server performance and load characteristics.
This directive takes a single argument and can be placed within the 'http', 'server', or 'location' contexts, providing flexibility in configuration depending on the specific monitoring needs of different parts of a web application served by NGINX. You can specify only one value per directive in a given configuration block, and it is important for users to ensure that their configuration aligns with other sysguard parameters to maintain cohesive performance monitoring and response operations.
Config Example
http {
sysguard on;
sysguard_interval 5;
server {
location / {
sysguard_mem free=100M action=/limit;
}
}
}Setting too low of an interval can lead to excessive CPU usage due to frequent checking.
Not placing the directive in the correct context (http, server, location) will lead to errors or unexpected behavior.
Ensure that the specified time value is a valid positive integer representing seconds.