mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
ccbe3ea2e3
* fix: Use correct entity columns for sensors * updated schema * Update custom rules too
8 lines
930 B
SQL
8 lines
930 B
SQL
UPDATE `sensors` SET `entPhysicalIndex_measured` = 'ports', `entPhysicalIndex` = entity_link_index WHERE entity_link_type='port';
|
|
UPDATE `config` SET `config_value` = "(%sensors.entPhysicalIndex_measured = 'ports' && %sensors.entPhysicalIndex = %ports.ifIndex && %macros.port_up)", `config_default` = "(%sensors.entPhysicalIndex_measured = 'ports' && %sensors.entPhysicalIndex = %ports.ifIndex && %macros.port_up)" WHERE `config_name` = 'alert.macros.rule.sensor_port_link';
|
|
UPDATE `alert_rules` SET `query` = REPLACE(query, 'entity_link_type', 'entPhysicalIndex_measured');
|
|
UPDATE `alert_rules` SET `query` = REPLACE(query, 'entity_link_index', 'entPhysicalIndex');
|
|
UPDATE `alert_rules` SET `rule` = REPLACE(rule, 'entity_link_type', 'entPhysicalIndex_measured');
|
|
UPDATE `alert_rules` SET `rule` = REPLACE(rule, 'entity_link_index', 'entPhysicalIndex');
|
|
ALTER TABLE `sensors` DROP `entity_link_type` , DROP `entity_link_index`;
|