# Http output plugin json\_batch format to Http input plugin

**URL:** https://discuss.elastic.co/t/http-output-plugin-json-batch-format-to-http-input-plugin/127462
**Category:** Logstash
**Created:** [April 10, 2018, 10:24am UTC](https://discuss.elastic.co/t/http-output-plugin-json-batch-format-to-http-input-plugin/127462 "2018-04-10T10:24:29Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![Aceman87](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Aceman87](https://discuss.elastic.co/u/Aceman87)
#### Post date: [May 3, 2018, 8:25am UTC](https://discuss.elastic.co/t/http-output-plugin-json-batch-format-to-http-input-plugin/127462/10 "2018-05-03T08:25:00Z")

</div>

Thank you Badger. Your idea was correct, but there is something wrong with the format pattern. I had to replace it with "ISO8601" to get it to work.

Now everything seems to be working and the messages are flowing through HTTP in gzip JSON packages.  
Here is the final configuration for documentation purposes.  
Sending conf:

```
output {
    http {
        http_compression => true
        http_method => put
        cacert => "../cert/server.pem"
        format => "json_batch"
        content_type => "application/json;charset=UTF-8"
        url => "https://address.xyz:8080/organization1/env"
        headers => ["Authorization", "Basic blaablaablaa"]
    }
}

```

Receiving conf:

```
input {
    http {
        port => 8080
        user => user
        password => password
        ssl => true
        keystore => "/path/to/keystore.jks"
        keystore_password => "keystore_password"
    }
}
filter {
    json {
        source => "message"
        target => "messageArray"
    }
    split {
        field => "messageArray"
    }
    date {
        match => ["[messageArray][@timestamp]", "ISO8601" ]
        target => "[messageArray][@timestamp]"
    }
    ruby {
        code => '
            if (event.get("messageArray"))
                event.get("messageArray").each { |k,v|
                    event.set(k,v);
                }
            end
        '
    }
    mutate {
        remove_field => ["messageArray"]
    }
}
```

---

_[View the full topic](https://discuss.elastic.co/t/http-output-plugin-json-batch-format-to-http-input-plugin/127462)._
