mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Fix code style
This commit is contained in:
parent
2386b87c1d
commit
4b31bc340e
@ -5627,8 +5627,8 @@ sub pandora_server_statistics ($$) {
|
|||||||
|
|
||||||
# Non-dataserver LAG calculation:
|
# Non-dataserver LAG calculation:
|
||||||
if ($server->{"server_type"} != DATASERVER){
|
if ($server->{"server_type"} != DATASERVER){
|
||||||
|
$lag_row = get_db_single_row (
|
||||||
$lag_row = get_db_single_row ($dbh,
|
$dbh,
|
||||||
"SELECT COUNT(tam.id_agente_modulo) AS module_lag,
|
"SELECT COUNT(tam.id_agente_modulo) AS module_lag,
|
||||||
AVG(UNIX_TIMESTAMP() - tae.last_execution_try - tae.current_interval) AS lag
|
AVG(UNIX_TIMESTAMP() - tae.last_execution_try - tae.current_interval) AS lag
|
||||||
FROM (
|
FROM (
|
||||||
@ -5647,11 +5647,15 @@ sub pandora_server_statistics ($$) {
|
|||||||
) tam
|
) tam
|
||||||
ON tae.id_agente_modulo = tam.id_agente_modulo
|
ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||||
WHERE (UNIX_TIMESTAMP() - tae.last_execution_try) > (tae.current_interval)
|
WHERE (UNIX_TIMESTAMP() - tae.last_execution_try) > (tae.current_interval)
|
||||||
AND (UNIX_TIMESTAMP() - tae.last_execution_try) < ( tae.current_interval * 10)", $server->{"id_server"});
|
AND (UNIX_TIMESTAMP() - tae.last_execution_try) < ( tae.current_interval * 10)",
|
||||||
|
$server->{"id_server"}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
# Dataserver LAG calculation:
|
# Dataserver LAG calculation:
|
||||||
else {
|
else {
|
||||||
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tam.id_agente_modulo) AS module_lag,
|
$lag_row = get_db_single_row (
|
||||||
|
$dbh,
|
||||||
|
"SELECT COUNT(tam.id_agente_modulo) AS module_lag,
|
||||||
AVG(UNIX_TIMESTAMP() - tae.last_execution_try - tae.current_interval) AS lag
|
AVG(UNIX_TIMESTAMP() - tae.last_execution_try - tae.current_interval) AS lag
|
||||||
FROM (
|
FROM (
|
||||||
SELECT tagente_estado.last_execution_try, tagente_estado.current_interval, tagente_estado.id_agente_modulo
|
SELECT tagente_estado.last_execution_try, tagente_estado.current_interval, tagente_estado.id_agente_modulo
|
||||||
@ -5670,7 +5674,9 @@ sub pandora_server_statistics ($$) {
|
|||||||
) tam
|
) tam
|
||||||
ON tae.id_agente_modulo = tam.id_agente_modulo
|
ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||||
WHERE (UNIX_TIMESTAMP() - tae.last_execution_try) > (tae.current_interval * 1.1)
|
WHERE (UNIX_TIMESTAMP() - tae.last_execution_try) > (tae.current_interval * 1.1)
|
||||||
AND (UNIX_TIMESTAMP() - tae.last_execution_try) < ( tae.current_interval * 10)", $server->{"id_server"});
|
AND (UNIX_TIMESTAMP() - tae.last_execution_try) < ( tae.current_interval * 10)",
|
||||||
|
$server->{"id_server"}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$server->{"module_lag"} = $lag_row->{'module_lag'};
|
$server->{"module_lag"} = $lag_row->{'module_lag'};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user