collecting data from cloudwatch

413 views
Skip to first unread message

aruna pavan

unread,
Apr 22, 2016, 9:53:26 AM4/22/16
to Fluentd Google Group
Hi,,

can someone please help me in collecting logs from cloudwatch and send them to mysql using fluentd?

im completely new to fluentd.Please help me

Mr. Fiber

unread,
Apr 25, 2016, 8:03:20 AM4/25/16
to Fluentd Google Group

--
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.

aruna pavan

unread,
Apr 26, 2016, 1:55:55 AM4/26/16
to flu...@googlegroups.com
Hi,

Thanks for responding. I installed the input plug-in for cloudwatch and also configured the td-agent.conf file.

Attached is my config file. Please let me know where i missed.

TIA

--
You received this message because you are subscribed to a topic in the Google Groups "Fluentd Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fluentd/4wtkZ8HZPmc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fluentd+u...@googlegroups.com.
cloudwatch-config.txt

Mr. Fiber

unread,
Apr 26, 2016, 2:27:40 AM4/26/16
to Fluentd Google Group
I installed the input plug-in for cloudwatch and also configured the td-agent.conf file.

It means cloudwatch plugin doesn't work on your environment?
What the error did you see in the log?

aruna pavan

unread,
Apr 26, 2016, 5:53:44 AM4/26/16
to flu...@googlegroups.com
I did not see any error.But the file where i'm trying to put my cloudwatch logs is blank

Mr. Fiber

unread,
Apr 26, 2016, 7:32:31 PM4/26/16
to Fluentd Google Group
Your configuration refers cloudwatch logs service, not cloudwatch.
AFAIK, cloudwatch logs and cloudwatch have different APIs.
If you want to use cloudwatch logs, not cloudwatch, then
cloudwatch-logs plugin is better.

BTW, you should not upload API keys information in the public
even though it is test user.

aruna pavan

unread,
Apr 27, 2016, 2:05:28 AM4/27/16
to flu...@googlegroups.com
Hi Fiber,
 
Thank you so much for your suggestion. i installed cloudwatch-logs plugin and modified the config file as you said.
<source>
  type cloudwatch_logs
  tag cloudwatch.in
  log_group_name xxxxxxx
  log_stream_name xxxxxxxxx
  use_log_stream_name_prefix true
  state_file /var/lib/fluent/group_stream.in.state
</source>
<match cloudwatch>
  @type copy
 <store>
  @type file
  path xxxxx
 </store>
</match>
 
and restarted the td-agent. but  the path file is still blank.
 
kindly guide me.

Mr. Fiber

unread,
Apr 27, 2016, 2:08:03 AM4/27/16
to Fluentd Google Group

aruna pavan

unread,
Apr 28, 2016, 5:58:00 AM4/28/16
to flu...@googlegroups.com
<source>
  type cloudwatch_logs
  log_group_name /var/log/messages
  log_stream_name xxxxxxx
  use_log_stream_name_prefix true
  state_file /var/lib/fluent/group_stream.in.state
</source>
  type stdout
 </match>


when i checked the output from /var/log/td-agent/td-agent.log, it is giving me error as no patterns matched tag="cloudwatch"
cloudwatch:watcher thread is not working after ............  restarting..

Mr. Fiber

unread,
Apr 28, 2016, 6:15:20 AM4/28/16
to Fluentd Google Group
Please paste your entire logs without secret parameters.

aruna pavan

unread,
Apr 28, 2016, 6:19:28 AM4/28/16
to flu...@googlegroups.com
Attache dis my output. Kindly guide me in resolving this issue.


cloud_log_error.png

Mr. Fiber

unread,
Apr 28, 2016, 6:23:58 AM4/28/16
to Fluentd Google Group
Did you use above configuration?
This log is generated by cloudwatch plugin, not cloudwatch-logs plugin.
But your pasted configuration doesn't include cloudwatch plugin.


Please re-check your environemnt.
Currently, I can't help you because problems are mixed.

aruna pavan

unread,
Apr 28, 2016, 6:35:12 AM4/28/16
to flu...@googlegroups.com
yes..i used the above configuration only.checked my config file again.

the aws cli is also working fine.
Reply all
Reply to author
Forward
0 new messages