Contents
Summary
New alarm module export Export alerts from secondaryValidation logging once to new alarm module server in JSON format. Once
Since 2024.01. Backported to RWS2022.02, RWS2023.02
...
- Configuring a loggingTimeSeries in the secondaryValidation tasks so the alerts are not only logged, but also stored in a dedicated loggingTimeSeries. #Config example 1
This needs to be a nonequidistant timeSeries. - Configure an export Schedule a task to serialize entries in the loggingTimeSeries that aren't flagged as exported yet. #Config example 2
- Configure a flagSourceColumn and a customFlagSource in the general export where exported alarms can be marked as exported. The exclusiveFlagSourceColumn options also has to be set to false. (If it is set to true the entries that are not marked yet are filtered out.) # Config example 2
Config examples
Code Block |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<secondaryValidation xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/secondaryValidation.xsd">
<variableDefinition>
<variableId>IWP_check_dummy</variableId>
<timeSeriesSet>
<moduleInstanceId>$MODULE_INSTANCE_ID$</moduleInstanceId>
<valueType>scalar</valueType>
<parameterId>H.meting</parameterId>
<locationId>dummy</locationId>
<timeSeriesType>temporary</timeSeriesType>
<timeStep unit="minute" multiplier="10"/>
<relativeViewPeriod startOverrulable="false" endOverrulable="false" unit="day" start="0" end="0"/>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
</variableDefinition>
<variableDefinition>
<variableId>IWP_check_logging</variableId>
<timeSeriesSet>
<moduleInstanceId>$MODULE_INSTANCE_ID$</moduleInstanceId>
<valueType>scalar</valueType>
<parameterId>Comment</parameterId>
<locationId>dummy</locationId>
<timeSeriesType>external historical</timeSeriesType>
<timeStep unit="nonequidistant"/>
<relativeViewPeriod startOverrulable="false" endOverrulable="false" unit="day" start="0" end="0"/>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
</variableDefinition>
<!--Dummy check gebruikt door RWS om te controleren of alarmmodule werkt - niet weghalen!-->
<seriesComparisonCheck id="IWP.check">
<loggingTimeSeries>
<variableId>IWP_check_logging</variableId>
</loggingTimeSeries>
<expression>IWP_check_dummy .gt. 0.0</expression>
<validatingVariableId>IWP_check_dummy</validatingVariableId>
<outputFlag>doubtful</outputFlag>
<outputMode>flags_and_logs</outputMode>
<logLevel>WARN</logLevel>
<logEventCode>IWP.check</logEventCode>
<logMessage><![CDATA[seriesComparisonCheck checked1]]></logMessage>
</seriesComparisonCheck>
<seriesComparisonCheck id="IWP.check2">
<loggingTimeSeries>
<variableId>IWP_check_logging</variableId>
</loggingTimeSeries>
<expression>IWP_check_dummy .gt. -1.0</expression>
<validatingVariableId>IWP_check_dummy</validatingVariableId>
<outputFlag>unreliable</outputFlag>
<outputMode>flags_and_logs</outputMode>
<logLevel>WARN</logLevel>
<logEventCode>IWP.check</logEventCode>
<logMessage><![CDATA[seriesComparisonCheck checked2]]></logMessage>
</seriesComparisonCheck>
</secondaryValidation> |
Code Block |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesExportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesExportRun.xsd">
<export>
<general>
<exportType>IQM</exportType>
<serverUrl>https://alarmmodule.rws.nl/api/v1/event</serverUrl>
<user>apiuser.rwsos.iwp</user>
<password>O$sjv5bd%R.?</password>
<exportTimeZone>
<timeZoneOffset>+00:00</timeZoneOffset>
</exportTimeZone>
<flagSourceColumnFilter>exported</flagSourceColumnFilter>
<exportedFlagSource>verzonden</exportedFlagSource>
<exclusiveFlagSourceColumn>false</exclusiveFlagSourceColumn>
</general>
<properties>
<string value="RWsOS.IWP" key="source"/>
<string value="RWsOS.IWP" key="deviceCode"/>
</properties>
<timeSeriesSet>
<moduleInstanceId>$MODULE_INSTANCE_ID$</moduleInstanceId>
<valueType>scalar</valueType>
<parameterId>Comment</parameterId>
<locationId>dummy</locationId>
<timeSeriesType>external historical</timeSeriesType>
<timeStep unit="nonequidistant"/>
<relativeViewPeriod startOverrulable="true" endOverrulable="false" unit="minute" start="-1440" end="1"/>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
</export>
</timeSeriesExportRun> |
FlagSourceColumns.xml in RegionConfigFiles
Code Block |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<flagSourceColumns xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/flagSourceColumns.xsd">
<column id="exported" name="exported">
<storageKey>0</storageKey>
<description>exported</description>
<toolTip>exported</toolTip>
<alwaysVisible>true</alwaysVisible>
<backgroundColor>alice blue</backgroundColor>
</column>
</flagSourceColumns> |
CustomFlagSources.xml in RegionConfigFiles
Code Block |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<customFlagSources xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/customFlagSources.xsd">
<customFlagSource id="verzonden" flag="100"/>
</customFlagSources> |