Merge branch 'ent-11551-widget-os-quick-report-arroja-errores-sql-en-metaconsola' into 'develop'
Ent 11551 widget os quick report arroja errores sql en metaconsola See merge request artica/pandorafms!6097
This commit is contained in:
commit
7fa32854e9
|
@ -23,9 +23,10 @@ function os_agents_critical($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
critical_count>0 AND id_os=%d',
|
||||
$table,
|
||||
$table,
|
||||
$id_os
|
||||
)
|
||||
);
|
||||
|
@ -36,10 +37,11 @@ function os_agents_critical($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
critical_count>0 AND
|
||||
id_os=%d AND id_grupo IN (%s)',
|
||||
$table,
|
||||
$table,
|
||||
$id_os,
|
||||
implode(',', $groups)
|
||||
)
|
||||
|
@ -60,9 +62,10 @@ function os_agents_ok($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
normal_count=total_count AND id_os=%d',
|
||||
$table,
|
||||
$table,
|
||||
$id_os
|
||||
)
|
||||
);
|
||||
|
@ -73,10 +76,11 @@ function os_agents_ok($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
normal_count=total_count AND
|
||||
id_os=%d AND id_grupo IN (%s)',
|
||||
$table,
|
||||
$table,
|
||||
$id_os,
|
||||
implode(',', $groups)
|
||||
)
|
||||
|
@ -97,10 +101,11 @@ function os_agents_warning($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
critical_count=0 AND warning_count>0
|
||||
AND id_os=%d',
|
||||
$table,
|
||||
$table,
|
||||
$id_os
|
||||
)
|
||||
);
|
||||
|
@ -111,10 +116,11 @@ function os_agents_warning($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
critical_count=0 AND warning_count>0 AND
|
||||
id_os=%d AND id_grupo IN (%s)',
|
||||
$table,
|
||||
$table,
|
||||
$id_os,
|
||||
implode(',', $groups)
|
||||
)
|
||||
|
@ -135,10 +141,11 @@ function os_agents_unknown($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
critical_count=0 AND warning_count=0 AND
|
||||
unknown_count>0 AND id_os=%d',
|
||||
$table,
|
||||
$table,
|
||||
$id_os
|
||||
)
|
||||
);
|
||||
|
@ -149,10 +156,11 @@ function os_agents_unknown($id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND
|
||||
WHERE %s.disabled=0 AND
|
||||
critical_count=0 AND warning_count=0 AND
|
||||
unknown_count>0 AND id_os=%d AND id_grupo IN (%s)',
|
||||
$table,
|
||||
$table,
|
||||
$id_os,
|
||||
implode(',', $groups)
|
||||
)
|
||||
|
@ -179,7 +187,8 @@ function os_agents_total(int $id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND id_os=%d',
|
||||
WHERE %s.disabled=0 AND id_os=%d',
|
||||
$table,
|
||||
$table,
|
||||
$id_os
|
||||
)
|
||||
|
@ -191,7 +200,8 @@ function os_agents_total(int $id_os)
|
|||
sprintf(
|
||||
'SELECT COUNT(*)
|
||||
FROM %s
|
||||
WHERE tagente.disabled=0 AND id_os=%d AND id_grupo IN (%s)',
|
||||
WHERE %s.disabled=0 AND id_os=%d AND id_grupo IN (%s)',
|
||||
$table,
|
||||
$table,
|
||||
$id_os,
|
||||
implode(',', $groups)
|
||||
|
|
Loading…
Reference in New Issue