How to configure Flume to listen a web api http petitions : <p>I have built an api web application, which is published on IIS Server, I am trying to configure Apache Flume to listen that web api and to save the response of http petitions in HDFS, this is the post method that I need to listen:</p>

<pre><code>    [HttpPost]
    public IEnumerable&lt;Data&gt; obtenerValores(arguments arg)
    {
        Random rdm = new Random();

        int ano = arg.ano;
        int rdmInt;
        decimal rdmDecimal;

        int anoActual = DateTime.Now.Year;
        int mesActual = DateTime.Now.Month;

        List&lt;Data&gt; ano_mes_sales = new List&lt;Data&gt;();

        while (ano &lt;= anoActual)
        {
            int mes = 1;
            while ((anoActual == ano &amp;&amp; mes &lt;= mesActual) || (ano &lt; anoActual &amp;&amp; mes &lt;= 12))
            {
                rdmInt = rdm.Next();
                rdmDecimal = (decimal)rdm.NextDouble();
                Data anoMesSales = new Data(ano, mes,(rdmInt * rdmDecimal));
                ano_mes_sales.Add(anoMesSales);

                mes++;
            }
            ano++;
        }
        return ano_mes_sales;
    }
</code></pre>

<p>Flume is running over a VMware Virtual Machine CentOs, this is my attempt to configure flume to listen that application:</p>

<pre><code># Sources, channels, and sinks are defined per # agent name, in this case 'tier1'.
a1.sources  = source1
a1.channels = channel1
a1.sinks    = sink1
a1.sources.source1.interceptors = i1 i2 
a1.sources.source1.interceptors.i1.type = host
a1.sources.source1.interceptors.i1.preserveExisting = false
a1.sources.source1.interceptors.i1.hostHeader = host
a1.sources.source1.interceptors.i2.type = timestamp

# For each source, channel, and sink, set # standard properties.
a1.sources.source1.type     = org.apache.flume.source.http.HTTPSource
a1.sources.source1.bind     = transacciones.misionempresarial.com/CSharpFlume
a1.sources.source1.port     = 80

# JSONHandler is the default for the httpsource # 
a1.sources.source1.handler = org.apache.flume.source.http.JSONHandler
a1.sources.source1.channels = channel1
a1.channels.channel1.type   = memory
a1.sinks.sink1.type         = hdfs
a1.sinks.sink1.hdfs.path = /monthSales
a1.sinks.sink1.hdfs.filePrefix = event-file-prefix-
a1.sinks.sink1.hdfs.round = false
a1.sinks.sink1.channel      = channel1

# Other properties are specific to each type of # source, channel, or sink. In this case, we # specify the capacity of the memory channel.
a1.channels.channel1.capacity = 1000 
</code></pre>

<p>I am using curl to post, here is my attempt:</p>

<pre><code>curl -X POST -H 'Content-Type: application/json; charset=UTF-8' -d '[{"ano":"2010"}]' http://transacciones.misionempresarial.com/CSharpFlume/api/SourceFlume/ObtenerValores
</code></pre>

<p>I only get this error:</p>

<pre><code>{"Message":"Error."}
</code></pre>

<p>My question are, which is the right way to configure flume to listen http petitions to my web api, what I am missing?</p>
