# Logstash - Output - Http - Message

**URL:** <https://discuss.elastic.co/t/logstash-output-http-message/258150>\
**Category:** Logstash\
**Created:** [December 9, 2020, 3:31pm UTC](https://discuss.elastic.co/t/logstash-output-http-message/258150 "2020-12-09T15:31:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rguerrero](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@rguerrero](https://discuss.elastic.co/u/rguerrero)\
**Post date:** [December 9, 2020, 3:31pm UTC](https://discuss.elastic.co/t/logstash-output-http-message/258150/1 "2020-12-09T15:31:59Z")

</div>

The next pipeline work good.

```
input {
  jdbc {
    jdbc_driver_library => "C:\\03_ELK\\logstash\\drivers\\ojdbc6-11.2.0.3.jar"
    jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
    jdbc_connection_string => "jdbc:oracle:thin:@XXXXXXXXXXXXXX:1521:orcl"
    jdbc_user => "XXXXXXXXXXXXX"
    jdbc_password => "XXXXXXXXXXXXXXXXXXXXX"
    parameters => { }
    #schedule => "*/5 * * * * UTC" #cada 5 mins comprobada
    schedule => "* * * * * UTC" #cada 1 min
    statement => "select XXXXXXXXXXXXXX FROM XXXXXXXXXXXXXXX where rownum = 1"
  }
}

filter {
  if [%{tx_nombre}]=="pedro"{
    mutate { add_field => { " **alert**" => "juan,cpu.id=0 1000" } }
  }
 }

output{
       http {
       format => "message"
       http_method =>"post"
       content_type => "text/plain"
       request_timeout => 120
       url => "https://xxxxxxxxxxxxxxx.live.dynatrace.com/api/v2/metrics/ingest?api-token=xxxxxxxxxxxxx"
       pool_max => 1000
       connect_timeout => 30
       message => "juan,cpu.id=0 1000"
    }
    stdout { codec => rubydebug }
}

```

**but I change the line: message =\> "%{alert}"**

My output failet; It is not recognizing the value or perhaps the field that I added alert  
Show me the following error: **Encountered non-2xx HTTP code 400 {**

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/8/1834e7576c4c4e7352ab4983b6aedf680994d410.png)

I tried the following in my output: tx\_nombre = pedro

Not work: #message =\> "[%{tx\_nombre}],[%{tx\_nombre}]=0 100"  
Work: #message =\> "pedro,pedro=0 100"

* * *

Not work: message =\> "[%{tx\_nombre}]"  
Not work: message =\> "tx\_nombre"

How can I concatenate this value in the message http output, additional in the filter I am adding a field ut not work

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 6, 2021, 3:32pm UTC](https://discuss.elastic.co/t/logstash-output-http-message/258150/2 "2021-01-06T15:32:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
