How to get the queries made to AWS/RDS in Grafana - sql

I have a grafana instance running in a kubernetes cluster. I have set up a CoudWatch Datasource with the corresponding credentials and I can retrieve some metrics.
My specific need is to know if I can retrieve the queries to the DB (or SQL digest) like RDS does in TOP SQL on AWS Console (https://i.stack.imgur.com/H6sO4.png) or something similar, so I can check the query performance.
Thank you so much in advance.

You can do this with the following steps:
First, Enable the Query logging for Amazon RDS: eg. PostgreSQL and MySQL
Then, publish the logs to Amazon CloudWatch Logs
And, in the Grafana side, add the AWS CloudWatch data source integration
This way you be able to get your queries in Grafana like this Cloudwatch Logs integration example.
If you want you can analise/filter your RDS logs using CloudWatch Logs Insights in Grafana.

Related

EKS pods logging to Elastic Cloud

I am trying to set up pods logs shipping from EKS to ElasticSearch Cloud.
According to Fluent Bit for Amazon EKS on AWS Fargate is here, ElasticSearch should be supported:
You can choose between CloudWatch, Elasticsearch, Kinesis Firehose and Kinesis Streams as outputs.
According to FluentBit Configuration Parameters for ElasticSearch having Cloud_ID and Cloud_Auth parameters should be enough to ship logs to Elasticsearch Cloud.
An example here shows how to configure ES output for FluentBit, so my config looks like:
[OUTPUT]
Name es
Match *
Logstash_Format On
Logstash_Prefix ${logstash_prefix}
tls On
tls.verify Off
Pipeline date_to_timestamp
Cloud_ID ${es_cloud_id}
Cloud_Auth ${es_cloud_auth}
Trace_Output On
I am running a simple ngnix container to generate some logs (as in one of the linked examples), but they don't seem to appear in my ElasticSearch / Kibana.
Am I missing anything? How do I ship logs to ElasticSearch Cloud?
Also, Trace_Output On is supposed to log FluentBits' attempts to ship logs, but where can I see these logs on EKS?
I also ran into this. It seems to me only AWS ElasticSearch is supported when using the AWS managed FluentBit (from what I can tell).
https://aws.amazon.com/about-aws/whats-new/2020/12/amazon-eks-adds-built-in-logging-support-for-aws-fargate/
You can work around this by using a sidecar fluentbit container (which can send to ElasticSearch) if that's an option for you. You will need to modify the application to have logs written to the filesystem.
Or you can use the managed FluentBit with the cloudwatch output, subscribe with to the log group with a lambda function and send it to ES.

Kinesis data analytics sql application is not writing logs into cloudwatch

I created a kinesis data analytics application(using SQL) and attached cloudwatch logging option.
when i run the application, i am receiving the result based on my requirements.
Problem: my kinesis-data-analytics application is not writing logs into cloudwatch.
Note: I used CloudWatch FullAccess policy. The configured cloudwatch log-group and stream-name are also correct.
Please let me know how can i receive the logs.
Regards,
Siva

Pushing logs to Log Analytics from Databricks

I have logs collected in Databricks cluster but I need to pushed to Log Analytics in Azure to have a common log collection
Have not tried anything but would like to know what the approach
To know how to push databricks logs to Azure Log Analytics.

Best ways to collect ELB access logs into Cloudwatch

ELB access logs are stored on S3 buckets. I've been researching but have been unable to find some good examples of how to get these logs into Cloudwatch.
Any suggestion is appreciated.
Greg
One option is to trigger events when the S3 bucket receives log streams and send it directly to CloudWatch metrics or Cloudwatch events using a Lambda.
I'm not sure if it is the best approach. I'll investigate and update the answer.

Monitoring Amazon S3 logs with Splunk?

We have a large extended network of users that we track using badges. The total traffic is in the neighborhood of 60 Million impressions a month. We are currently considering switching from a fairly slow, database-based logging solution (custom-built on PHP—messy...) to a simple log-based alternative that relies on Amazon S3 logs and Splunk.
After using Splunk for some other analyisis tasks, I really like it. But it's not clear how to set up a source like S3 with the system. It seems that remote sources require the Universal Forwarder installed, which is not an option there.
Any ideas on this?
Very late answer but I was looking for the same thing and found a Splunk app that does what you want, http://apps.splunk.com/app/1137/. I have yet not tried it though.
I would suggest logging j-son preprocessed data to a documentdb database. For example, using azure queues or simmilar service bus messaging technologies that fit your scenario in combination with azure documentdb.
So I'll keep your database based approach and modify it to be a schemaless easy to scale document based DB.
I use http://www.insight4storage.com/ from AWS Marketplace to track my AWS S3 storage usage totals by prefix, bucket or storage class over time; plus it shows me the previous versions storage by prefix and per bucket. It has a setting to save the S3 data as splunk format logs that might work for your use case, in addition to its UI and webservice API.
You use Splunk Add-On for AWS.
This is what I understand,
Create a Splunk instance. Use the website version or the on-premise
AMI of splunk to create an EC2 where splunk is running.
Install Splunk Add-On for AWS application on the EC2.
Based on the input logs type (e.g. Cloudtrail logs, Config logs, generic logs, etc) configure the Add-On and supply AWS account id or IAM Role, etc parameters.
The Add-On will automatically ping AWS S3 source and fetch the latest logs after specified amount of time (default to 30 seconds).
For generic use case (like ours), you can try and configure Generic S3 input for Splunk