mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Fix counters tactical view pandora_enterprise#12033
This commit is contained in:
parent
bab81b08e2
commit
9d70802083
@ -5687,7 +5687,7 @@ sub pandora_server_statistics ($$) {
|
|||||||
$server->{"modules_total"} = get_db_value ($dbh, "SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) FROM tagente, tagent_module_inventory WHERE tagente.disabled=0 AND tagent_module_inventory.id_agente = tagente.id_agente");
|
$server->{"modules_total"} = get_db_value ($dbh, "SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) FROM tagente, tagent_module_inventory WHERE tagente.disabled=0 AND tagent_module_inventory.id_agente = tagente.id_agente");
|
||||||
|
|
||||||
# Calculate lag
|
# Calculate lag
|
||||||
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - tagent_module_inventory.interval) AS lag
|
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tagent_module_inventory.id_agent_module_inventory) AS `module_lag`, AVG(UNIX_TIMESTAMP() - utimestamp - tagent_module_inventory.interval) AS `lag`
|
||||||
FROM tagente, tagent_module_inventory
|
FROM tagente, tagent_module_inventory
|
||||||
WHERE utimestamp > 0
|
WHERE utimestamp > 0
|
||||||
AND tagent_module_inventory.id_agente = tagente.id_agente
|
AND tagent_module_inventory.id_agente = tagente.id_agente
|
||||||
@ -5736,8 +5736,8 @@ sub pandora_server_statistics ($$) {
|
|||||||
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 (
|
||||||
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
|
||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
@ -5762,8 +5762,8 @@ sub pandora_server_statistics ($$) {
|
|||||||
else {
|
else {
|
||||||
$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 (
|
||||||
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
|
||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
|
Loading…
x
Reference in New Issue
Block a user