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
Power Monitoring Expert 7.2
Power Monitoring Expert 8.x
Power Monitoring Expert 9.x
Power Monitoring Expert 2021
Power Monitoring Expert 2022
Power Monitoring Expert 2023
Power Monitoring Expert 2024
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.
Here is the link to download the Power Monitoring Expert 2024 Help -> Deactivating alarms
FAQ => Video: How to Deactivate Alarms in PME | Schneider Electric USA
Note that this procedure will remove these alarms from the “Active alarms” view but not from the “All alarms” view. If you want to completely remove an incorrect event, it should be removed from the PME databases. Consequently, the process is more involved; please follow Resolution 2.
Resolution 2:
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*
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 from 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.
Edit the WHERE clause on Line 9 for a time value in the future eg using WHERE TimestampUTC > GETUTCDATE() will remove all entries timestamped in the future of the moment the script is run. Other criteria are possible as needed.
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.