Package com.googlecode.jsendnsca.core

Examples of com.googlecode.jsendnsca.core.Level.ordinal()


    public void notify(EventObject eventObject) throws Exception {
        // create message payload to send
        String message = eventObject.toString();
        Level level = determineLevel(eventObject);
        MessagePayload payload = new MessagePayload(getHostName(), level.ordinal(), getServiceName(), message);

        if (log.isInfoEnabled()) {
            log.info("Sending notification to Nagios: " + payload.getMessage());
        }
        sender.send(payload);
View Full Code Here


            level = Level.valueOf(name);
        }
        String serviceName = exchange.getIn().getHeader(SERVICE_NAME, exchange.getContext().getName(), String.class);
        String hostName = exchange.getIn().getHeader(HOST_NAME, "localhost", String.class);

        MessagePayload payload = new MessagePayload(hostName, level.ordinal(), serviceName, message);

        if (log.isDebugEnabled()) {
            log.debug("Sending notification to Nagios: " + payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

    public void notify(EventObject eventObject) throws Exception {
        // create message payload to send
        String message = eventObject.toString();
        Level level = detemineLevel(eventObject);
        MessagePayload payload = new MessagePayload(getHostName(), level.ordinal(), getServiceName(), message);

        if (log.isInfoEnabled()) {
            log.info("Sending notification to Nagios: " + payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

            level = Level.valueOf(name);
        }
        String serviceName = exchange.getIn().getHeader(SERVICE_NAME, exchange.getContext().getName(), String.class);
        String hostName = exchange.getIn().getHeader(HOST_NAME, "localhost", String.class);

        MessagePayload payload = new MessagePayload(hostName, level.ordinal(), serviceName, message);

        if (log.isDebugEnabled()) {
            log.debug("Sending notification to Nagios: " + payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

            level = Level.valueOf(name);
        }
        String serviceName = exchange.getIn().getHeader(SERVICE_NAME, exchange.getContext().getName(), String.class);
        String hostName = exchange.getIn().getHeader(HOST_NAME, "localhost", String.class);

        MessagePayload payload = new MessagePayload(hostName, level.ordinal(), serviceName, message);

        if (log.isDebugEnabled()) {
            log.debug("Sending notification to Nagios: " + payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

    public void notify(EventObject eventObject) throws Exception {
        // create message payload to send
        String message = eventObject.toString();
        Level level = determineLevel(eventObject);
        MessagePayload payload = new MessagePayload(getHostName(), level.ordinal(), getServiceName(), message);

        if (log.isInfoEnabled()) {
            log.info("Sending notification to Nagios: {}", payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

            level = Level.valueOf(name);
        }
        String serviceName = exchange.getIn().getHeader(SERVICE_NAME, exchange.getContext().getName(), String.class);
        String hostName = exchange.getIn().getHeader(HOST_NAME, "localhost", String.class);

        MessagePayload payload = new MessagePayload(hostName, level.ordinal(), serviceName, message);

        if (log.isDebugEnabled()) {
            log.debug("Sending notification to Nagios: {}", payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

    public void notify(EventObject eventObject) throws Exception {
        // create message payload to send
        String message = eventObject.toString();
        Level level = determineLevel(eventObject);
        MessagePayload payload = new MessagePayload(getHostName(), level.ordinal(), getServiceName(), message);

        if (log.isInfoEnabled()) {
            log.info("Sending notification to Nagios: {}", payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

            level = Level.valueOf(name);
        }
        String serviceName = exchange.getIn().getHeader(SERVICE_NAME, exchange.getContext().getName(), String.class);
        String hostName = exchange.getIn().getHeader(HOST_NAME, "localhost", String.class);

        MessagePayload payload = new MessagePayload(hostName, level.ordinal(), serviceName, message);

        if (log.isDebugEnabled()) {
            log.debug("Sending notification to Nagios: {}", payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

    public void notify(EventObject eventObject) throws Exception {
        // create message payload to send
        String message = eventObject.toString();
        Level level = determineLevel(eventObject);
        MessagePayload payload = new MessagePayload(getHostName(), level.ordinal(), getServiceName(), message);

        if (log.isInfoEnabled()) {
            log.info("Sending notification to Nagios: " + payload.getMessage());
        }
        sender.send(payload);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.