Issue
If a device has a clock set incorrectly with Events/Alarms and this device is read by PME the Events are loaded into the database with the incorrect timestamps. In the case of the clock being set to the future these events appear first in many of the Event/ Alarm views even after setting the device’s clock correctly. Since the Alarms are displayed in chronological order from newest to the oldest an event coming from a device with a clock in the future it will always be at the top.
Product Line
SPM 7.2.2, Power Monitoring Expert 8.X, 9.0
Environment
Web Application - Alarms
Cause
The Alarms are working as expected - When the clocks on the devices were set to the correct time, PME still shows events for these future timestamps with the state of “Check device clock”. The future timestamps have been recorded in the PME db and the “Check device clock” is PME’s way of telling you it thinks something is strange since the event start is so far in the future. Even though you have fixed the device clock since the data is coming from the database the web app still shows the “Check device clock” message.
Resolution 1:
Those future alarms can be deactivated in the Deactivate Alarms feature in Management Console.
PME 9.0 System guide - See page 287 - Deactivate alarms
Here is the link to download the System Guide:
https://ecobuilding.schneider-electric.com/power-management-systems/power-management-software/power-monitoring-expert/install-maintain
Additionally there is a KB - Video that describes how to deactivate the alarms - The video relates to a previous PME version so screens may look different to PME 9.0 but the process is the same.
https://www.se.com/us/en/faqs/index?page=content&id=FA313760&actp=search&viewlocale=en_US#__highlight
Note that this procedure will remove these alarms from the “Active alarms” view but not from the “All alarms” view. If you want to totally remove an incorrect event then it should be removed from the PME databases consequently the process is more involved, please follow the Resolution 2.
Resolution 2:
Remove the Events/Alarms with incorrect timestamps.
To remove the incorrect events a SQL script must be run to properly clean the ION_Data database. This script removes data entries in the Eventlog2 table and metadata in other tables.
Here is one example:
USE ION_Data
DECLARE @EventsToDeleteCount INT
DECLARE @AlarmsToDeleteCount INT
-- Declare the table Events to Remove
CREATE TABLE #EventIDsToRemove (ID INT PRIMARY KEY NOT NULL)
-- Fill the table of relevant Events to remove
INSERT INTO #EventIDsToRemove
SELECT ID FROM vEventLog2
WHERE TimestampUTC > GETUTCDATE()
-- *** START CUSTOM CRITERIA HERE
--
-- Note. It is recommended you test your criteria first using the following query to ensure you get the exact match you want:
-- SELECT * FROM vEventLog2 WHERE <your criteria to test>
--
-- *** END CUSTOM CRITERIA HERE
If a device has a clock set incorrectly with Events/Alarms and this device is read by PME the Events are loaded into the database with the incorrect timestamps. In the case of the clock being set to the future these events appear first in many of the Event/ Alarm views even after setting the device’s clock correctly. Since the Alarms are displayed in chronological order from newest to the oldest an event coming from a device with a clock in the future it will always be at the top.
Product Line
SPM 7.2.2, Power Monitoring Expert 8.X, 9.0
Environment
Web Application - Alarms
Cause
The Alarms are working as expected - When the clocks on the devices were set to the correct time, PME still shows events for these future timestamps with the state of “Check device clock”. The future timestamps have been recorded in the PME db and the “Check device clock” is PME’s way of telling you it thinks something is strange since the event start is so far in the future. Even though you have fixed the device clock since the data is coming from the database the web app still shows the “Check device clock” message.
Resolution 1:
Those future alarms can be deactivated in the Deactivate Alarms feature in Management Console.
PME 9.0 System guide - See page 287 - Deactivate alarms
Here is the link to download the System Guide:
https://ecobuilding.schneider-electric.com/power-management-systems/power-management-software/power-monitoring-expert/install-maintain
Additionally there is a KB - Video that describes how to deactivate the alarms - The video relates to a previous PME version so screens may look different to PME 9.0 but the process is the same.
https://www.se.com/us/en/faqs/index?page=content&id=FA313760&actp=search&viewlocale=en_US#__highlight
Note that this procedure will remove these alarms from the “Active alarms” view but not from the “All alarms” view. If you want to totally remove an incorrect event then it should be removed from the PME databases consequently the process is more involved, please follow the Resolution 2.
Resolution 2:
Remove the Events/Alarms with incorrect timestamps.
To remove the incorrect events a SQL script must be run to properly clean the ION_Data database. This script removes data entries in the Eventlog2 table and metadata in other tables.
Here is one example:
- Here are 2 devices where the clock was set 1 year (2020) ahead.
- The clock has been reset to the proper time but the incorrect data still exists.
- Stop all ION services.
- Back up the ION_Data database.
- Restart all ION Services.
- Stop the ION LogSubsystem Router Service and the ION Software Data Processing Service.
- Open the attached SQL script in SQL Server Management Studio.
USE ION_Data
DECLARE @EventsToDeleteCount INT
DECLARE @AlarmsToDeleteCount INT
-- Declare the table Events to Remove
CREATE TABLE #EventIDsToRemove (ID INT PRIMARY KEY NOT NULL)
-- Fill the table of relevant Events to remove
INSERT INTO #EventIDsToRemove
SELECT ID FROM vEventLog2
WHERE TimestampUTC > GETUTCDATE()
-- *** START CUSTOM CRITERIA HERE
--
-- Note. It is recommended you test your criteria first using the following query to ensure you get the exact match you want:
-- SELECT * FROM vEventLog2 WHERE <your criteria to test>
--
-- *** END CUSTOM CRITERIA HERE
- Restart the ION LogSubsystem Router Service and the ION Software Data Processing Service.