内容简介:Grafana has a built-in alert module that allows users to configure alerts for many event types using different communication channels. For example, you can configure alerts to send a dashboard image to Slack or email. Users can also initiate an OpsGenie or
This blog post will pit Grafana vs Graphite against each other, two of the most popular observability tools on the market today. R&D organizations typically implement a wide technology stack. They include varying services, systems, or tools to support their production and development environments. Most, if not all, of these companies have SLAs requiring R&D to provide high availability solutions and the ability to respond to incidents in real time. DevOps and SRE teams must have observability into all their application or infrastructure services and dependencies. Observability , when done correctly, improves the response times of DevOps staff and reduces MTTD and MTTR . Effective tools address the three pillars of observability: logging, metrics, and tracing. They also offer well-designed alerting systems.
Grafana is the Best
Grafana is currently the industry leader in the visualization of monitoring. The tool provides a variety of graphs, charts, tables, and indicators capable of displaying all types of metrics from hundreds of sources. The Grafana team officially supports the tool . Grafana is the chosen open source visualization tool of a variety of industries’ R&D organizations. As a result, it comes with many community created, preconfigured dashboards and generic queries for almost all architecture types and tools. These features allow DevOps teams to start monitoring and providing value almost immediately.
Grafana has a built-in alert module that allows users to configure alerts for many event types using different communication channels. For example, you can configure alerts to send a dashboard image to Slack or email. Users can also initiate an OpsGenie or PagerDuty incident which leads to an automatic phone call. Grafana alerts notify DevOps when a specific threshold is breached, and then again when the monitored tool is back to normal so teams can close the incident.
Grafana has a feature called template variables. Consequently, users define variable sources and collect all possible values for the variable from the data source. Panels in a dashboard can then display data according to these variables, as seen in the screenshot below.
Figure 1: Grafana dashboard (Source: Commerce Tools )
Grafana continues to evolve and grow, offering DevOps and SRE new opportunities to present important information about everything from software services to smart home, power plant , and ambulance service operations.
Graphite is a Strong Competitor
Graphite is Grafana’s older brother. Designed in 2006 and released as an open-source monitoring system in 2008, Graphite allows users to store metrics as time series data and generate graphs based on this data. It has a simple user interface, with special functions that allow you to transform, calculate, combine, and filter data in a single graph. After that, it can display the time series according to R&D requirements. Graphite’s dashboard is usually constructed of one or two visualization types (point or line graphs). Therefore, it displays metrics in a more straightforward way than Grafana does, with less visualization flexibility.
Graphite Architecture
Graphite architecture has three main components: carbon, whisper , and graphite-web . Carbon, the back end storage for Graphite, is a daemon that listens for time series data and collects it over a common set of protocols . There are several types of carbons, and each behaves differently, allowing you to assemble a sophisticated architecture for your storage back end. Whisper is a database similar in design and purpose to other round robin databases like Logstash . It provides quick access to numeric data over time. Whisper provides higher resolution (seconds per time point) in order to facilitate deep dives into lower resolutions for long-term retention of historical data.
Carbon writes the data to whisper for long-term storage. Both databases supply the time series for the third and last component of Graphite, graphite-web . Graphite-web queries the databases and provides the user interface for both user dashboards and API access.
Graphite was one of the first monitoring tools that R&D organizations implemented, and many of these organizations are finding that it’s not easy to move away from it. The tool works with many storage back ends and collectors, some of which no other tool supports. It has a very simple plug and play mechanism that allows DevOps teams to set up monitoring easily. The people behind Graphite know that their tool’s UI is old and does not meet today’s DevOps or production needs. As a result, they’ve created an integration with Grafana. It enables Graphite to be the data source for Grafana and to display the data in newer, more sophisticated and innovative visualization panels. Below is a screenshot of graphite-web’s user interface.
Figure 2: Graphite dashboard (Source: Nuxeo )
Grafana vs Graphite: The Takeaways
Although Grafana is a better fit for the information explosion decade in which we live, Graphite might be appropriate for some use cases. Below, we’ll compare several aspects of both tools in order to help you choose the right one for your organization.
Installation and Configuration
Grafana offers several editions, installation methods, and even a hosted solution. It can easily spin up on a Docker container or run as a process on Windows, different Linux editions, and Mac OS. It has very minimal requirements—only 256MB of memory and 1 CPU.
Once the container is running and port 3000 is open, Grafana is available. Adding plugins is also simple. You can do this in Docker build, with the build-arg , this way:
–build-arg “GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource”
You can also do this from inside the Grafana container, with the Grafana CLI, as shown below:
grafana-cli –pluginsDir “/var/lib/grafana/devplugins” plugins install < plugin-id >
Grafana Labs offers two hosting services: Grafana Cloud and Grafana Enterprise. Grafana Cloud is a simple hosting for Grafana, Prometheus, and Graphite data sources that provides high availability of a monitoring stack. Grafana Enterprise comes with unlimited access to Grafana plugins, support with SLA, and training sessions. Pricing for the Enterprise edition bases itself on the number of users and their permissions.
Graphite, on the other hand, is completely self-hosted. The Graphite installer, Synthesize, goes through all relevant components and installs them one by one. It also installs three extra components:
- Memcached , used for speeding up data queries
- Statsite , a high-performance StatsD implementation, and
- Collectd , a service metrics agent.
These components allow you to start the metric collection process and visualize its data right after completion of installation.
Not too long ago, a new offering, called Hosted Graphite , emerged as an SaaS solution for Graphite. It’s not an enterprise-ready solution, however, so it can’t easily compare to Grafana’s offerings.
Graphite vs Grafana: Querying and Visualizations
Since Graphite visualizations have become obsolete, comparing them to Grafana is irrelevant. That said, querying in Graphite is advanced and very simple to perform. Graphite functions facilitate almost every calculation, alias, exclusion, and grouping method that DevOps teams need in order to display metrics in a useful configuration.
Out of the box queries in Grafana are simplistic. You will need special plugins, most of which were community-created, to accommodate more complex data structures and manipulations. In Grafana, each data source comes with its own querying abilities and structure, and there are few data sources that allow you to compose a query constructed from different data sources and perform additional calculations on the query results.
Integrations
When it comes to integrations, no tool can compete with Grafana. The list of data sources, applications, and visualizations that Grafana officially supports is long, and the community keeps adding more to it. The data source list contains relational databases, cloud providers, and other monitoring systems. Integrated applications like Kubernetes, Cloudflare, and worldPing make it easy to visualize your app’s data in Grafana.
Graphite also has a long list of integrations for the collection, monitoring, and forwarding of data, but the tools are not always the newest. In some cases, they address the needs of only a specific software stack.
Alerts
Graphite doesn’t come with an out of the box alerting solution. However, open-source tools like Graphite-beacon and Graphite-alerts allow you to generate alerts for Graphite thresholds. Graphite also has integrations with other tools that allow you to create alerts on Graphite events.
Grafana has a built-in alert module which allows you to create alerts that communicate with collaboration and on-call management tools. Below is an example of what Grafana’s alert module looks like:
Figure 3: Grafana alerts module
Grafana supports an additional alerting method, webhook, which enables every system to register to its alerts and receive a push notification when a predefined event occurs.
Community
Grafana’s community is huge, with contributors from many types of businesses and organizations, technological support that is continuously growing, and significant user support. Grafana’s greatest strength is its community support for different architectures and technological stacks.
Graphite, a more business-specific tool, has fewer people participating in its growth effort, but they still add new content from time to time. The Graphite GitHub project sees constant updates with small features and bug fixes, keeping the tool relevant for today’s DevOps engineers.
Summary
The use of monitoring and visualization tools is a substantial element of day-to-day DevOps life and a responsibility of every R&D group. Every organization should understand its monitoring requirements and standards. They should choose the relevant tools and solutions based on their capabilities and estimated setup and maintenance efforts. While this blog post compared Grafana with Graphite as though you must choose one tool over the other, it’s also worth considering having them run side-by-side, since they easily integrate and can fulfill different roles in the monitoring stack. Together, they can provide DevOps and R&D with a full and bigger picture.
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。