Browse FAQs

How to remove alarms when the clock was set incorrectly

Published date: 20 February 2019

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 desactivated 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 desactivate 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/ww/en/faqs/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:
  1. Here are 2 devices where the clock was set 1 year (2020) ahead.



























 
  1. The clock has been reset to the proper time but the incorrect data still exists.
  2. Stop all ION services.
  3. Back up the ION_Data database.
  4. Restart all ION Services.
  5. Stop the ION LogSubsystem Router Service and the ION Software Data Processing Service.
  6. 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

 
  1. Restart the ION LogSubsystem Router Service and the ION Software Data Processing Service.

Was this helpful?

What can we do to improve the information ?

Can't find what you are looking for?

Reach out to our customer care team to receive information on technical support, assistance for complaints and more.