mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 08:03:30 +02:00
Updated alerts query to change ip
This commit is contained in:
@@ -232,6 +232,7 @@ function RunRules($device) {
|
|||||||
$chk = dbFetchRow("SELECT state FROM alerts WHERE rule_id = ? && device_id = ? ORDER BY id DESC LIMIT 1", array($rule['id'], $device));
|
$chk = dbFetchRow("SELECT state FROM alerts WHERE rule_id = ? && device_id = ? ORDER BY id DESC LIMIT 1", array($rule['id'], $device));
|
||||||
$sql = GenSQL($rule['rule']);
|
$sql = GenSQL($rule['rule']);
|
||||||
$qry = dbFetchRows($sql,array($device));
|
$qry = dbFetchRows($sql,array($device));
|
||||||
|
$qry[0]['ip'] = inet6_ntop($qry[0]['ip']);
|
||||||
$s = sizeof($qry);
|
$s = sizeof($qry);
|
||||||
if( $s == 0 && $inv === false ) {
|
if( $s == 0 && $inv === false ) {
|
||||||
$doalert = false;
|
$doalert = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user