User Tools

Site Tools


Writing /app/www/public/data/meta/ems/alarm_sync_setting.meta failed
ems:alarm_sync_setting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
ems:alarm_sync_setting [2018/03/28 12:46] ashevyakovems:alarm_sync_setting [2021/06/25 10:09] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Alarm Sync Scripts ======
 +Author: Eoin Joy\\ \\
 +The Alarm Sync scripts are contained in the AlarmSyncSetting domain. They are also stored with some metadata about how they should be executed.\\
 +The purpose of these scripts is to retrieve both active and disabled alarms from the target controller in a two-step process:\\
 +  - Retrieve the information needed in a separate thread queue.
 +  - Process the retrieved information into current or disabled alarms.
 +===== Additional Configuration =====
 +==== currentAlarmGetType ====
 +An Enum of type OutboundTaskType, determining what strategy to use for the retrieval of the currently active alarms.
 +==== currentAlarmMib ====
 +Should the currentAlarmGetType be SNMP_TABLE, the Mib from which the table will be retrieved is required to be set.
 +==== disabledAlarmGetType ====
 +An Enum of type OutboundTaskType, determining what strategy to use for the retrieval of the disabled alarms.
 +==== disabledAlarmMib ====
 +Should the disabledAlarmGetType be SNMP_TABLE, the Mib from which the table will be retrieved is required to be set.
 +===== Retrieve Path =====
 +Used for all types to determine either what URLs to retrieve, or what SNMP OIDs to poll.
 +==== Return Value ====
 +//List< Map< String, String > >// – A list of String to String maps containing a path and optional identifier value.
 +==== Inserted Variables ====
 +**networkElement** – //NetworkElement// – The controller that we wish to perform the sync on.\\
 +**type** – //String// – Used to determine what type of sync is requesting paths, such as current or disabled.
 +===== Parameter Populate =====
 +Used for HTTP_POST type syncs to determine what data should be inserted into the postData such as some JSON requests. Executed for every path in the pathMapList generated by the Retrieve Path script.
 +==== Return Value ====
 +//Map< String, String >// – The postData required for the given path.
 +==== Inserted Variables ====
 +**jobType** – //JobType// – Used to determine in the script which postData should be returned, eg. ALARM_SYNC or ALARM_SEVERITY_SYNC.\\
 +**httpSession** – //GroovyHttpSessionManager// – Holds the current session connected to the given controller.\\
 +**path** – //String// – The path to calculate the postData for.\\
 +**url** – //String// – The full URL (protocol + ipAddress + port + path) to calculate the postData for.\\
 +**pathMap** – //Map< String, String >// – The map containing the path and identifier data for this entry as calculated in the Retrieve Path script.
 +===== Current Alarm Parse =====
 +This script takes the result of the outbound task and parses it into discovered alarms. Taking note of setting the fullName property of the DiscoveredAlarm, as this is used to match against discoveredName values in the NetworkElement table.
 +==== Return Value ====
 +//List< DiscoveredAlarm >// – Sent back to the application to be worked on by the [[ems:alarm_auditor_configuration|Alarm Auditor Scripts]].
 +==== Inserted Variables ====
 +**networkElement** – //NetworkElement// – The controller the sync is being performed on.\\
 +**pathResultMap** – //Map< String, String >// – The combined results of the retrieved data from the paths generated in the Retrieve Path script.\\
 +**voList** – //List< SnmpDataVO >// – The list of results received from the SNMP type gets as SnmpDataVO objects.
 +===== Disabled Alarm Parse =====
 +This script performs similarly to the Current Alarm Parse script. In the end it is returning disabled alarms that will be matched against using the [[ems:alarm_auditor_configuration|Alarm Auditor Scripts]].\\
 +Only executed if it exists.
 +==== Return Value ====
 +//List< DiscoveredAlarmSeverity >// – A listing of the alarms found to be disabled on the controller. 
 +==== Inserted Variables ====
 +**networkElement** – //NetworkElement// – The controller the sync is being performed on.\\
 +**pathResultMap** – //Map< String, String >// – The combined results of the retrieved data from the paths generated in the Retrieve Path script.\\
 +**voList** – //List< SnmpDataVO >// – The list of results received from the SNMP type gets as SnmpDataVO objects.
 +===== Troubleshooting =====
 +If the **Thread_Config**s are set-up correctly (i.e. active and pointing at the server supposed to run the scheduled alarm syncs) and the "SyncSchedulerTask started" line appears in the relevant SnmpManager (i.e. handler) log, then run the following query: **delete from network_element_sync_setting where network_element_id not in (select id from network_element);**. That query will delete the scheduled syncs related to the non-existing elements - otherwise, such sync would throw the silent (i.e. not in the logs) exception, thus aborting the current sync task (i.e. the task encompassing all scheduled syncs).