Package org.rhq.core.domain.event

Examples of org.rhq.core.domain.event.EventSeverity


        EventSource source = findEventSourceById(sourceId);
        Map<EventSource,Set<Event>> eventMap = new HashMap<EventSource, Set<Event>>();
        Set<Event> events = new LinkedHashSet<Event>(eventRest.size());
        for (EventRest eRest : eventRest) {
            EventSeverity eventSeverity = EventSeverity.valueOf(eRest.getSeverity());
            Event event = new Event(eRest.getTimestamp(),eventSeverity,source,eRest.getDetail());
            events.add(event);
        }
        eventMap.put(source,events);
        eventManager.addEventData(eventMap);
View Full Code Here


        q.setParameter("resourceId", resourceId);
        q.setParameter("start", startDate);
        q.setParameter("end", endDate);
        List<Object[]> rawResults = q.getResultList();
        for (Object[] rawResult : rawResults) {
            EventSeverity severity = (EventSeverity) rawResult[0];
            long count = (Long) rawResult[1];
            results.put(severity, (int) count);
        }
        return results;
    }
View Full Code Here

        q.setParameter("groupId", groupId);
        q.setParameter("start", startDate);
        q.setParameter("end", endDate);
        List<Object[]> rawResults = q.getResultList();
        for (Object[] rawResult : rawResults) {
            EventSeverity severity = (EventSeverity) rawResult[0];
            long count = (Long) rawResult[1];
            results.put(severity, (int) count);
        }
        return results;
    }
View Full Code Here

        long timeDiff = end - begin;
        long timePerBucket = timeDiff / bucketCount;

        for (Object[] nextFly : flyWeights) {
            long eventTime = (Long) nextFly[1];
            EventSeverity eventSeverity = (EventSeverity) nextFly[0];

            eventTime = eventTime - begin;
            int bucket = (int) (eventTime / timePerBucket);
            if (eventSeverity.isMoreSevereThan(buckets[bucket])) {
                buckets[bucket] = eventSeverity;
            }
        }

        return buckets;
View Full Code Here

                }
            }
            String minimumSeverityString = logEventSource.getSimpleValue(
                LogEventSourcePropertyNames.MINIMUM_SEVERITY, null);
            if (minimumSeverityString != null) {
                EventSeverity minimumSeverity = EventSeverity.valueOf(minimumSeverityString.toUpperCase());
                processor.setMinimumSeverity(minimumSeverity);
            }
            EventContext eventContext = this.resourceContext.getEventContext();
            EventPoller poller = new LogFileEventPoller(eventContext, LOG_ENTRY_EVENT_TYPE, logFile, processor);
            eventContext.registerEventPoller(poller, POLLING_INTERVAL_IN_SECONDS, logFile.getPath());
View Full Code Here

        try {
            priority = Priority.valueOf(priorityString);
        } catch (IllegalArgumentException e) {
            throw new ParseException("Unknown priority: " + priorityString);
        }
        EventSeverity severity = PRIORITY_TO_SEVERITY_MAP.get(priority);
        String detail = matcher.group(3);
        return new LogEntry(timestamp, severity, detail);
    }
View Full Code Here

            public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
                String sevEnumName = record.getAttribute("severity");
                if (sevEnumName == null) {
                    return null;
                }
                EventSeverity severity = EventSeverity.valueOf(sevEnumName);
                switch (severity) {
                case DEBUG:
                    return MSG.common_severity_debug();
                case INFO:
                    return MSG.common_severity_info();
View Full Code Here

                    alertConditionId, stats);

            }
        } else if (alertConditionCategory == AlertConditionCategory.EVENT) {
            AlertConditionEventCategoryComposite eventComposite = (AlertConditionEventCategoryComposite) composite;
            EventSeverity eventSeverity = EventSeverity.valueOf(alertCondition.getName());
            String eventDetails = alertCondition.getOption();

            EventCacheElement cacheElement = null;
            try {
                if (eventDetails == null) {
View Full Code Here

                html = new StringBuffer("<ul class=\"boxy\">");

                for (EventComposite event : events) {
                    html.append("<li> ");

                    EventSeverity severity = event.getSeverity();
                    switch (severity) {
                    case FATAL:
                        html.append("<img src=\"/images/event_fatal.gif\"/>");
                        break;
                    case ERROR:
View Full Code Here

            searchString = WebUtility.getOptionalRequestParameter(request, "pSearch", null);
            eForm.setSearchString(searchString);
        }

        // Perform the query and get the (filtered) events
        EventSeverity eventSeverityFilter = getSeverityFromString(eForm.getSevFilter());

        EntityContext context = new EntityContext(resourceId, groupId, parent, type);
        List<EventComposite> events = eventManager.findEventComposites(subject, context, begin, end,
            new EventSeverity[] { eventSeverityFilter }, sourceFilter, searchString, pc);
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.event.EventSeverity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.