“No tag matched” Warning while using POST on fluentd

1,084 views
Skip to first unread message

Gaurav Bareja

unread,
Mar 29, 2016, 10:19:45 AM3/29/16
to Fluentd Google Group
“No tag matched” Warning while using POST on fluentd


up vote
0
down vote
favorite
I was using fluentd and I found out that the example given on the site http://docs.fluentd.org/articles/install-by-deb was working perfectly using the below curl command.

curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test

But when I tried to match any other pattern, I found out that even an exact match wasn't working. To my surprise, even the default config file that matches
<match debug.*>
was only working for debug.test and not debug.a (for example)
Here is my conf file:


<match td.*.*>
type tdlog
apikey YOUR_API_KEY

auto_create_table
buffer_type file
buffer_path /var/log/td-agent/buffer/td

<secondary>
type file
path /var/log/td-agent/failed_records
</secondary>
</match>

<match bigquery>
type copy
deep_copy true
<store>
type bigquery
auth_method compute_engine
project my_table
dataset test_db
table LogMessage
auto_create_table true
field_string body,header
# buffer_chunk_limit
# buffer_chunk_records_limit 300
buffer_queue_limit 10240
num_threads 16
# flush_interval 1
buffer_type file
buffer_path /var/log/td-agent/buffer/bq
</store>
<store>
type file
path /var/log/td-agent/bq-logtextmsg.log
</store>
</match>

## match tag=debug.** and dump to console
<match debug.**>
type stdout
</match>

####
## Source descriptions:
##

## built-in TCP input
## @see http://docs.fluentd.org/articles/in_forward
<source>
type forward
</source>

## built-in UNIX socket input
#<source>
# type unix
#</source>

# HTTP input
# POST http://localhost:8888/<tag>?json=<json>
# POST http://localhost:8888/td.myapp.login?json={"user"%3A"me"}
# @see http://docs.fluentd.org/articles/in_http
<source>
type http
port 8888
</source>

## live debugging agent
<source>
type debug_agent
bind 127.0.0.1
port 24230
</source>

####
## Examples:
##

## File input
## read apache logs continuously and tags td.apache.access
#<source>
# type tail
# format apache
# path /var/log/httpd-access.log
# tag td.apache.access
#</source>
## File input
## File output
## match tag=local.** and write to file
#<match local.**>
# type file
# path /var/log/td-agent/access
#</match>
## Forwarding
## match tag=system.** and forward to another td-agent server
#<match system.**>
# type forward
# host 192.168.0.11
# # secondary host is optional
# <secondary>
# host 192.168.0.12
# </secondary>
#</match>
## Multiple output
## match tag=td.*.* and output to Treasure Data AND file
#<match td.*.*>
# type copy
# <store>
# type tdlog
# apikey API_KEY
# auto_create_table
# buffer_type file
# buffer_path /var/log/td-agent/buffer/td
# </store>
# <store>
# type file
# path /var/log/td-agent/td-%Y-%m-%d/%H.log
# </store>
#</match>

Mr. Fiber

unread,
Mar 29, 2016, 12:14:28 PM3/29/16
to Fluentd Google Group
debug.a also works on my test.

2016-03-30 01:12:39 +0900 [info]: using configuration file: <ROOT>
  <source>
    @type http
    port 8888
  </source>
  <match debug.*>
    @type stdout
  </match>
</ROOT>
2016-03-30 01:12:39 +0900 [info]: adding match pattern="debug.*" type="stdout"
2016-03-30 01:12:39 +0900 [info]: adding source type="http"
2016-03-30 01:12:47 +0900 debug.test: {"json":"message"}
2016-03-30 01:12:50 +0900 debug.a: {"json":"message"}


Masahiro


--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gaurav Bareja

unread,
Mar 30, 2016, 1:12:24 AM3/30/16
to Fluentd Google Group

It didn't work with <ROOT> tag, it said connection refused to localhost:8888
When I removed the <ROOT> tag, it got nothing on stdout even for debug.test.
And now my previous conf file has stopped working too.

Appreciate any input.
Thanks

Mr. Fiber

unread,
Mar 30, 2016, 2:17:31 AM3/30/16
to Fluentd Google Group
Your conf file also work on my test.


  <match td.*.*>
    type tdlog
    apikey YOUR_API_KEY
    auto_create_table
    buffer_type file
    buffer_path /tmp/td
    <secondary>
      type file
      path /tmp/failed_records

    </secondary>
  </match>
  <match bigquery>
    type copy
    deep_copy true
    # remove bigquery plugin because I don't have it...
    <store>
      type file
      path /tmp/bq-logtextmsg.log
    </store>
  </match>

  <match debug.**>
    type stdout
  </match>
  <source>
    type forward
  </source>

  <source>
    type http
    port 8888
  </source>
  <source>
    type debug_agent
    bind 127.0.0.1
    port 24230
  </source>
</ROOT>
2016-03-30 15:12:48 +0900 [info]: adding match pattern="td.*.*" type="tdlog"
2016-03-30 15:12:48 +0900 [info]: adding match pattern="bigquery" type="copy"
2016-03-30 15:12:48 +0900 [info]: adding match pattern="debug.**" type="stdout"
2016-03-30 15:12:48 +0900 [info]: adding source type="forward"
2016-03-30 15:12:48 +0900 [info]: adding source type="http"
2016-03-30 15:12:48 +0900 [info]: adding source type="debug_agent"
2016-03-30 15:12:48 +0900 [info]: listening fluent socket on 0.0.0.0:24224
2016-03-30 15:12:48 +0900 [info]: listening dRuby uri="druby://127.0.0.1:24230" object="Engine"
2016-03-30 15:13:09 +0900 debug.test: {"json":"message"}

If there are no error logs in /var/log/td-agent/td-agent.log, your envrionment seems to have a problem.
Paste entire your logs may help.

Gaurav Bareja

unread,
Mar 30, 2016, 5:27:10 AM3/30/16
to Fluentd Google Group
Hi, Thanks.
I found out that everything was working fine, just that the post request didn't actually come on stdout, it went to /var/log/td-agent/td-agent.log
Thanks for everything
Reply all
Reply to author
Forward
0 new messages