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:
An Enum of type OutboundTaskType, determining what strategy to use for the retrieval of the currently active alarms.
Should the currentAlarmGetType be SNMP_TABLE, the Mib from which the table will be retrieved is required to be set.
An Enum of type OutboundTaskType, determining what strategy to use for the retrieval of the disabled alarms.
Should the disabledAlarmGetType be SNMP_TABLE, the Mib from which the table will be retrieved is required to be set.
Used for all types to determine either what URLs to retrieve, or what SNMP OIDs to poll.
List< Map< String, String > > – A list of String to String maps containing a path and optional identifier value.
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.
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.
Map< String, String > – The postData required for the given path.
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.
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.
List< DiscoveredAlarm > – Sent back to the application to be worked on by the Alarm Auditor Scripts.
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.
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 Alarm Auditor Scripts.
Only executed if it exists.
List< DiscoveredAlarmSeverity > – A listing of the alarms found to be disabled on the controller.
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.
If the Thread_Configs 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).