Class HypericAckProcessor

  • All Implemented Interfaces:
    Runnable, AckProcessor, org.springframework.beans.factory.InitializingBean

    public class HypericAckProcessor
    extends Object
    implements AckProcessor

    HypericAckProcessor class.

    Version:
    $Id: $
    Author:
    ranger
    • Field Detail

      • READER_NAME_HYPERIC

        public static final String READER_NAME_HYPERIC
        Constant READER_NAME_HYPERIC="HypericReader"
        See Also:
        Constant Field Values
      • PARAMETER_PREFIX_HYPERIC_SOURCE

        public static final String PARAMETER_PREFIX_HYPERIC_SOURCE
        Constant PARAMETER_PREFIX_HYPERIC_SOURCE="source:"
        See Also:
        Constant Field Values
      • ALERTS_PER_HTTP_TRANSACTION

        public static final int ALERTS_PER_HTTP_TRANSACTION
        Constant ALERTS_PER_HTTP_TRANSACTION=200
        See Also:
        Constant Field Values
    • Constructor Detail

      • HypericAckProcessor

        public HypericAckProcessor()
    • Method Detail

      • fetchUnclearedHypericAlarms

        public List<OnmsAlarm> fetchUnclearedHypericAlarms()

        fetchUnclearedHypericAlarms

        Returns:
        a List object.
      • getUrlForHypericSource

        public String getUrlForHypericSource​(String source)

        getUrlForHypericSource

        Parameters:
        source - a String object.
        Returns:
        a String object.
      • run

        public void run()

        run

        Specified by:
        run in interface Runnable
      • findAlarmForHypericAlert

        public static OnmsAlarm findAlarmForHypericAlert​(List<OnmsAlarm> alarms,
                                                         String platformId,
                                                         org.opennms.netmgt.ackd.readers.HypericAckProcessor.HypericAlertStatus alert)

        findAlarmForHypericAlert

        Parameters:
        alarms - a List object.
        platformId - a String object.
        alert - a HypericAckProcessor.HypericAlertStatus object.
        Returns:
        a OnmsAlarm object.
      • getAlertSourceParmValue

        public static String getAlertSourceParmValue​(OnmsAlarm alarm)

        getAlertSourceParmValue

        Parameters:
        alarm - a OnmsAlarm object.
        Returns:
        a String object.
      • getAlertIdParmValue

        public static String getAlertIdParmValue​(OnmsAlarm alarm)

        getAlertIdParmValue

        Parameters:
        alarm - a OnmsAlarm object.
        Returns:
        a String object.
      • getParmValueByRegex

        public static String getParmValueByRegex​(OnmsAlarm alarm,
                                                 String regex)

        Some parameter values that you might be interested in inside this class:

        • alert.id: ID of the alert in the remote Hyperic HQ system
        • alert.baseURL: Base URL of the Hyperic HQ service that generated the alert
        • alert.source: String key that identifies the Hyperic HQ service that generated the alert
        Parameters:
        alarm - The alarm to fetch parameters from
        regex - Java regex expression with a () group that will be returned
        Returns:
        The matching group from the regex
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception

        afterPropertiesSet

        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception - if any.
      • setAlarmDao

        public void setAlarmDao​(AlarmDao dao)

        setAlarmDao

        Parameters:
        dao - a AlarmDao object.