nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-1337) Add Riemann Reporting Task
Date Wed, 27 Jan 2016 16:25:40 GMT

    [ https://issues.apache.org/jira/browse/NIFI-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15119701#comment-15119701
] 

ASF GitHub Bot commented on NIFI-1337:
--------------------------------------

Github user rickysaltzer commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/188#discussion_r51008627
  
    --- Diff: nifi-nar-bundles/nifi-riemann-bundle/nifi-riemann-reporting-task/src/main/java/org/apache/nifi/reporting/riemann/RiemannReportingTask.java
---
    @@ -0,0 +1,244 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nifi.reporting.riemann;
    +
    +import java.io.IOException;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.concurrent.TimeUnit;
    +
    +import org.apache.nifi.annotation.behavior.DynamicProperty;
    +import org.apache.nifi.annotation.documentation.CapabilityDescription;
    +import org.apache.nifi.annotation.documentation.Tags;
    +import org.apache.nifi.annotation.lifecycle.OnScheduled;
    +import org.apache.nifi.annotation.lifecycle.OnStopped;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.controller.ConfigurationContext;
    +import org.apache.nifi.processor.exception.ProcessException;
    +import org.apache.nifi.processor.util.StandardValidators;
    +import org.apache.nifi.reporting.AbstractReportingTask;
    +import org.apache.nifi.reporting.Bulletin;
    +import org.apache.nifi.reporting.BulletinQuery;
    +import org.apache.nifi.reporting.ReportingContext;
    +import org.apache.nifi.reporting.riemann.metrics.MetricsService;
    +
    +import com.aphyr.riemann.Proto;
    +import com.aphyr.riemann.client.IPromise;
    +import com.aphyr.riemann.client.RiemannClient;
    +import com.google.common.collect.Lists;
    +import com.google.common.collect.Maps;
    +import com.yammer.metrics.core.VirtualMachineMetrics;
    +
    +@Tags({ "reporting", "riemann", "metrics" })
    +@DynamicProperty(name = "Attribute Name", value = "Attribute Value", supportsExpressionLanguage
= false,
    +        description = "Additional attributes may be attached to the event by adding dynamic
properties")
    +@CapabilityDescription("Publish NiFi metrics to Riemann. These metrics include " + "JVM,
Processor, and General Data Flow metrics. In addition, you may also forward bulletin " + "board
messages.")
    +public class RiemannReportingTask extends AbstractReportingTask {
    +    public static final PropertyDescriptor RIEMANN_HOST = new PropertyDescriptor.Builder().name("Riemann
Address").description("Hostname of Riemann server").required(true)
    +            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
    +    public static final PropertyDescriptor RIEMANN_PORT = new PropertyDescriptor.Builder().name("Riemann
Port").description("Port that Riemann is listening on").required(true).defaultValue("5555")
    +            .addValidator(StandardValidators.PORT_VALIDATOR).build();
    +    public static final PropertyDescriptor TRANSPORT_PROTOCOL = new PropertyDescriptor.Builder().name("Transport
Protocol").description("Transport protocol to speak to Riemann in").required(true)
    +            .allowableValues(new Transport[] { Transport.TCP, Transport.UDP }).defaultValue("TCP").build();
    +    public static final PropertyDescriptor SERVICE_PREFIX = new PropertyDescriptor.Builder().name("Prefix
for Service Name").description("Prefix to use when reporting to Riemann").defaultValue("nifi")
    +            .required(true).addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
    +    public static final PropertyDescriptor WRITE_TIMEOUT = new PropertyDescriptor.Builder().name("Timeout").description("Timeout
in milliseconds when writing events to Riemann").required(true)
    +            .defaultValue("500ms").addValidator(StandardValidators.TIME_PERIOD_VALIDATOR).build();
    +    static final PropertyDescriptor HOSTNAME = new PropertyDescriptor.Builder().name("Hostname").description("The
Hostname of this NiFi instance to report to Riemann").required(true)
    --- End diff --
    
    not a good reason, no. I'll get these moved into private.


> Add Riemann Reporting Task
> --------------------------
>
>                 Key: NIFI-1337
>                 URL: https://issues.apache.org/jira/browse/NIFI-1337
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Ricky Saltzer
>            Assignee: Ricky Saltzer
>         Attachments: example-graph.png, riemann-reporting-configuration.png
>
>
> It would be beneficial for NiFi to report health information to [Riemann|http://riemann.io]
for monitoring purposes. I plan on implementing this, and will use this JIRA to track the
progress. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message