Get a DemoStart Free TrialSign In

AWS Elastic Kubernetes Service

Ship AWS EKS Metrics to Logstash

Metricbeat is an open source shipping agent that lets you ship AWS Elastic Kubernetes Service (EKS) Metrics to one or more destinations, including Logstash.

Send Your DataMetricsAWSAWS Elastic Kubernetes Service Guide

Follow this step by step guide to get 'logs' from your system to Logit.io:

Step 1 - Prerequisites

Firstly Make sure you have the aws cli, eksctl & kubectl installed on local machine using the following guide

Also make sure you have setup aws configure with your AWS credentials.

To do this run run the following command in your aws terminal.

aws configure

When you type this command, the AWS CLI prompts you for four pieces of information: access key, secret access key, AWS Region, and output format. This information is stored in a profile named default. This profile is used when you run commands, unless you specify another one.

Step 2 - Connecting to the cluster

Update your config by running the following command. Replace <enter_region> and <enter_name> with your AWS cluster region and name.

aws eks --region <enter_region> update-kubeconfig --name <enter_name>

Check you can connect to your cluster by running the following command:

kubectl get svc

Step 3 - kube-state-metrics

You will need an instance of kube-state-metrics running on your cluster before you install metricbeat.

Cloning the kube-state-metrics repository locally and applying the example is the easiest way to generate some metrics. You can tailor these to your needs at a later stage.

git clone https://github.com/kubernetes/kube-state-metrics.git

Change into the newly downloaded directory:

cd go/src/k8s.io/kube-state-metrics/

Then to deploy this project, you can simply run:

kubectl apply -f examples/standard
Metricbeat requires kube-state-metrics to be deployed and running to gather the cluster metrics. You can read more about kube state metrics on Github

Step 4 - Deploy Metricbeat

You're going to need the metricbeat deployment manifest.

curl -L -O cdn.logit.io/metricbeat-kubernetes-7.10.0.yaml

Now you have the manifest we need to add your Stack Logstash endpoint details. Open the file in the terminal editor using the vim or nano command. Alternatively you can choose Open Editor from the console toolbar to make your changes.

vi metricbeat-kubernetes-7.10.0.yaml

or

nano metricbeat-kubernetes-7.10.0.yaml

Update the following lines in the yaml with your Stack Logstash endpoint and Beats-SSL port.

Note: The code snippet occurs two times in the yaml file and needs updating in both.
env:
- name: LOGSTASH_HOST
  value: "guid-ls.logit.io"
- name: BEATS_PORT
  value: "00000"

After updating the code should look as below.

env:
- name: LOGSTASH_HOST
  value: ["your-logstash-host"]
- name: BEATS_PORT
  value: ["your-ssl-port"]

Exit and save the file.

Step 5 - Apply your updates

Now we're going to apply the file to the cluster.

kubectl apply -f metricbeat-kubernetes-7.10.0.yaml
If you need to apply further updates after running the apply command you may need to remove the yaml file, make your changes and then apply again.

Step 6 - Confirm Deployment

Confirm your pod has deployed, you should see output similar to that below.

kubectl get po -A

or

kubectl logs ["podname"] --namespace=kube-system

Browse to Kibana and you should see Metrics arriving in your Stack.

Step 7 - Check Logit.io for your logs

Data should now have been sent to your Stack.

View my data

If you don't see logs take a look at How to diagnose no data in Stack below for how to diagnose common issues.

Step 8 - how to diagnose no data in Stack

If you don't see data appearing in your Stack after following the steps, visit the Help Centre guide for steps to diagnose no data appearing in your Stack or Chat to support now.

Step 9 - AWS EKS Overview

To efficiently collect and analyze AWS EKS metrics, an effective solution is to integrate with Logit.io, a leading cloud-native observability platform. By sending your AWS EKS metrics to Logit.io, you can access advanced analytics and visualization tools to make informed decisions about your Kubernetes workloads. This includes setting up real-time dashboards, alerts, and anomaly detection to proactively identify and address any issues or performance bottlenecks, ensuring optimal resource utilization and a reliable user experience. While monitoring metrics is essential, for a holistic approach to AWS EKS observability, it's equally crucial to explore AWS EKS Logs. These logs provide invaluable insights into your applications and infrastructure behaviour. To delve deeper into harnessing the full potential of AWS EKS Logs, explore our dedicated integration. By combining AWS EKS Metrics and Logs within the Logit.io ecosystem, you gain a comprehensive and reliable monitoring strategy to manage your Kubernetes workloads with precision and confidence. Logit.io's AWS logging excels in providing fully scalable integrations for these components.

Return to Search
Sign Up

© 2024 Logit.io Ltd, All rights reserved.