Package org.rhq.core.domain.event

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


    private EventSeverity getSeverityFromString(String sevFilter) {

        if (sevFilter == null || sevFilter.equals("") || (sevFilter.equals("ALL")))
            return null;
        try {
            EventSeverity sev = EventSeverity.valueOf(sevFilter);
            return sev;
        } catch (IllegalArgumentException iae) {
            log.warn("Illegal EventSeverity passed: " + sevFilter);
            return null;
        }
View Full Code Here


            String[] parsedValues = currentSetting.trim().split(",");
            if (!(currentSetting.trim().isEmpty() || parsedValues.length == EventSeverity.values().length)) {
                EventSeverity[] filterSeverities = new EventSeverity[parsedValues.length];
                int index = 0;
                for (String severity : parsedValues) {
                    EventSeverity p = EventSeverity.valueOf(severity);
                    filterSeverities[index++] = p;
                }
                criteria.addFilterSeverities(filterSeverities);
            }
View Full Code Here

        int count = params.getSimple("count").getIntegerValue();
        String source = params.getSimple("source").getStringValue();
        String details = params.getSimple("details").getStringValue();
        String eventType = resourceContext.getResourceType().getName() + "-event";
        String severityArg = params.getSimple("severity").getStringValue();
        EventSeverity severity;

        try {
            severity = EventSeverity.valueOf(severityArg);
        } catch (IllegalArgumentException e) {
            result = new OperationResult("passed");
View Full Code Here

    }

    public Set<Event> poll() {
        int count = Integer.parseInt(System.getProperty(SYSPROP_EVENTS_COUNT, "1"));
        String severityString = System.getProperty(SYSPROP_EVENTS_SEVERITY, EventSeverity.INFO.name());
        EventSeverity severity = EventSeverity.valueOf(severityString);
        Set<Event> events = new HashSet<Event>(count);
        for (int i = 0; i < count; i++) {
            Event event = new Event(PERFTEST_EVENT_TYPE, "source.loc", System.currentTimeMillis(), severity, "event #"
                + i);
            events.add(event);
View Full Code Here

                payload.append("Timestamp: " + new TimeTicks(timeTicks).toString());
                payload.append("\n");
            }

            SnmpTrapdComponent.trapCount++;
            EventSeverity severity = EventSeverity.INFO;

            Vector<VariableBinding> vbs = pdu.getVariableBindings();
            for (VariableBinding vb : vbs) {
                OID oid = vb.getOid();
                Variable var = vb.getVariable();
View Full Code Here

                }
            }
            String minimumSeverityString = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_ERROR_LOG_MINIMUM_SEVERITY,
                null);
            if (minimumSeverityString != null) {
                EventSeverity minimumSeverity = EventSeverity.valueOf(minimumSeverityString.toUpperCase());
                processor.setMinimumSeverity(minimumSeverity);
            }
            EventPoller poller = new LogFileEventPoller(this.eventContext, ERROR_LOG_ENTRY_EVENT_TYPE, errorLogFile,
                processor);
            this.eventContext.registerEventPoller(poller, 60, errorLogFile.getPath());
View Full Code Here

        try {
            severityLevel = SeverityLevel.valueOf(severityLevelString.toUpperCase());
        } catch (IllegalArgumentException e) {
            throw new ParseException("Unknown severity level: " + severityLevelString);
        }
        EventSeverity severity = LEVEL_TO_SEVERITY_MAP.get(severityLevel);
        String detail = matcher.group(3);
        return new LogEntry(timestamp, severity, detail);
    }
View Full Code Here

            if (matcher.find() && (matcher.groupCount() == 3)) {
                String dateTimeString = matcher.group(1);
                String severityString = matcher.group(2);
                String detailsString = matcher.group(3);
                long timestamp = getTimestamp(dateTimeString);
                EventSeverity severity = getSeverity(severityString);
                event = new Event(EVENT_LOG_TYPE, this.sourceLocation, timestamp, severity, detailsString);
            } else {
                event = null;
                if (log.isTraceEnabled()) {
                    log.trace("Message [" + syslogMessage + "] did not match parser regex: "
View Full Code Here

            String dateTimeString = messageParts[0];
            String severityString = messageParts[1];
            String detailsString = messageParts[2];

            long timestamp = getTimestamp(dateTimeString);
            EventSeverity severity = getSeverity(severityString);
            event = new Event(EVENT_LOG_TYPE, this.sourceLocation, timestamp, severity, detailsString);
        } catch (Exception e) {
            event = null;
            if (log.isTraceEnabled()) {
                log.trace("defaultFormat: Failed to convert syslog message [" + syslogMessage + "] to event: " + e);
View Full Code Here

    protected Event convertAnyLine(String syslogMessage) {
        Event event;
        try {
            long timestamp = System.currentTimeMillis();
            EventSeverity severity = EventSeverity.INFO;
            event = new Event(EVENT_LOG_TYPE, this.sourceLocation, timestamp, severity, syslogMessage);
        } catch (Exception e) {
            event = null;
            if (log.isTraceEnabled()) {
                log.trace("anyLine: Failed to convert syslog message [" + syslogMessage + "] to event: " + e);
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.