1
头图

Monitoring can help you ensure that Kubernetes applications run smoothly and troubleshoot any issues that may arise. Prometheus is a popular open source monitoring tool that many companies use to monitor their IT infrastructure. However, there are many other monitoring tools available. This article introduces 6 methods that can replace Prometheus to monitor Kubernetes.

What is Prometheus?

Prometheus is an open source monitoring system originally built on SoundCloud. It is designed to monitor multi-dimensional data collection and query. The Prometheus server has its own independent unit, which does not rely on network storage or external services. Therefore, Prometheus does not require a lot of other infrastructure or software.

图片

The main advantages of Prometheus Kubernetes , many available exporters and libraries, and fast query language and API. The main disadvantages of Prometheus include a simplified, constrained data model, the limited granularity of pull-based models, and a lack of encryption.

Listed below are 6 ways to monitor Kubernetes in addition to Prometheus. Each tool has its own advantages and disadvantages, let us take a look at the main functions of each tool.

1、Grafana

Grafana is an open source platform for visualization, monitoring and analysis of indicators. Grafana is time series analysis. Grafana can display the analyzed data through a variety of graphical options (including line graphs, heat maps, and bar graphs). When the monitored indicator exceeds a predefined threshold, you will receive an alert.

图片

The main functions include:
  • Alerts-You can get alerts through different channels (including SMS, email, Slack or PagerDuty). If you prefer other communication channels, you can use some code to create your own notification program.
  • Dashboard templates-Through templating, you can create dashboards that can be reused for multiple use cases. For example, you can use the same dashboard for production servers and test servers.
  • Provisioning-You can use scripts to automate everything in Grafana. For example, you can automatically start Grafana and a new Kubernetes cluster using preset scripts that include IP addresses, servers, and data sources.
  • Comment-Used for data association when an error occurs. You can manually create annotations by adding text to the graph, or you can get data from any data source.

2、cAdvisor

cAdvisor can collect, process and export information about the performance and resource usage of running containers. cAdvisor has native support for Kubernetes because it is integrated into the Kubelet binary.

图片

The main functions include:
  • Auto discovery-automatically discover all containers in a given node and collect statistics, including memory, CPU, network, and file system usage.
  • Storage plugin-Export statistics to different storage plugins, such as Elasticsearch and InfluxDB.
  • Overall computer usage-Provides overall computer usage by analyzing the "root" container on the computer.
  • Web-UI-You can view metrics on the Web-UI, which displays real-time information about all containers on your computer.

3、Fluentd

Fluentd separates the data source from the back-end system by providing a unified logging layer between the two. The logging layer allows you to collect multiple types of logs generated.

图片

The main functions include:
  • JSON data structure-enables you to unify all log data processing aspects, such as buffering, filtering and outputting logs across different sources.
  • Pluggable architecture-a flexible plug-in system allows you to extend the functionality of Fluentd by connecting multiple data sources and outputs.
  • System resources-The instance runs on 30MB to 40MB of memory and can handle 13,000 events per second. If you need more memory, you can use the Fluent Bit light transponder.
  • Reliability-Supports file-based buffering and memory buffering to prevent data loss on the node. In addition, you can set up Fluentd to support high availability and strong failover.

4、Jaeger

Jaeger is an open source tool for monitoring traffic between distributed services such as Kubernetes. Jaeger uses distributed tracing to track the path of service requests through different microservices. Then, you can visually see the request flow. Distributed tracing is a method of managing and observing microservices, and it runs as part of a service grid.

图片

The main functions include:
  • High scalability-Designed to have no single point of failure (SPOF) and can be expanded according to business needs.
  • Multiple storage options-Supports two open source NoSQL databases, Elasticsearch and Cassandra. Jaeger also provides a simple memory storage for testing.
  • Cloud native deployment-supports different configuration methods, including environment variables, command line options and configuration files. Kubernetes templates, Kubernetes operators and Helm charts support Kubernetes deployment.
  • Monitoring-Jaeger backend components expose Prometheus metrics and logs by default.

5、Telepresence

Telepresence is an open source tool that can run a single service locally while connecting the service to a remote Kubernetes cluster. TelePresence has deployed a two-way network proxy in the Pod, which can collect data for the Kubernetes environment, including TCP connections, environment variables, and volumes.

图片

The main functions include:
  • Compatibility-Both Linux and Mac OS with OS native software packages can be used.
  • Development workflow-Provides you with a rapid development workflow for multi-container applications developed on Kubernetes. You can run it while proxying a local Docker container to the cluster.
  • Debug Kubernetes service locally-When there is a bug in the temporary cluster, you want to run the service locally. Telepresence allows you to debug services locally.

Connect to a remote Kubernetes cluster-You can access the remote cluster from a local process. With this access, you can use local tools on your laptop to communicate with processes in the cluster.

6、Zabbix

Zabbix designed to monitor a large number of network parameters and the running status of servers, and provides many data visualization and reporting functions based on stored data. Small organizations with a small number of servers and large enterprises with multiple servers can use Zabbix monitor IT infrastructure.

图片

The main functions include:
  • Elastic threshold-You can define elastic problem thresholds, also known as triggers. These triggers are based on values in the back-end database.
  • Real-time visualization-You can use the built-in drawing function to instantly view the monitored items.
  • Automatic discovery-provides a variety of methods to automate the management of large-scale environments (such as Kubernetes). You can automatically add and delete file systems and network interfaces in your organization.
  • Network Discovery-Enables you to periodically scan for external services or Zabbix agents in the network and take pre-defined measures when discovered.
  • Distributed Monitoring-Provides an effective way to monitor distributed infrastructure using Zabbix agent. You can use an agent to collect data locally, and then report the data to the server.

in conclusion

Prometheus is an open source tool for monitoring Kubernetes workloads. It is locally integrated as the default monitoring tool in Kubernetes, including a built-in alert manager. However, you should also consider using other monitoring options for your Kubernetes environment to complement and improve the Kubernetes functional experience.

Author丨by Limor Wainstein Source丨

图片

图片


民工哥
26.4k 声望56.7k 粉丝

10多年IT职场老司机的经验分享,坚持自学一路从技术小白成长为互联网企业信息技术部门的负责人。2019/2020/2021年度 思否Top Writer