Nagios Hướng dẫn: Là gì Nagios Dụng cụ? Archikiến trúc & lắp đặt

⚡ Tóm tắt thông minh

Nagios is an open-source monitoring platform that continuously watches servers, networks, applications, and services, alerting teams to failures in real time so problems are resolved quickly across an entire DevOps infrastructure.

  • 🔍 Giám sát liên tục: Continuous monitoring detects, reports, and responds to failures and attacks across infrastructure once an application is deployed to the server.
  • 🧩 Thành phần cốt lõi: Three parts define Nagios — the web interface or GUI, the Nagios server, and plugins running on remote hosts.
  • 🏗️ Archikiến trúc: A server-side scheduler triggers plugins on remote hosts, which return status data that updates the GUI and sends notifications.
  • 🔌 plugin: Plugins such as NRPE, NSCA, and check_nt monitor Linux, Mac OS X, and Windows hosts over secure SSL connections.
  • 🇧🇷 Cài đặt: Nagios deploys quickly on AWS by subscribing through the Marketplace, connecting through PuTTY, and logging in as nagiosadmin.
  • 📊 Ứng dụng Nagios delivers single-console health checks for data-centre servers, middleware, messaging, and complete business processes.
  • ⚠️ Hạn chế: Advanced dashboards and wizards require the paid Nagios XI; Nagios Core only monitors networks rather than managing them.

Nagios tutorial covering architecture, plugins, and AWS installation for continuous monitoring

Nagios is one of the most widely used open-source tools for the continuous monitoring of IT infrastructure. This tutorial explains what Nagios is, how its client-server architecture and plugins work, how to install it on AWS, and where it fits within a modern DevOps quy trình làm việc.

Giám sát liên tục là gì?

Continuous monitoring is the practice of detecting, reporting, and responding to every issue or attack that occurs across an infrastructure. Once an application is deployed to a server, continuous monitoring takes over the job of watching the company’s systems and responding appropriately. It complements continuous integration tools such as Jenkins by extending automated oversight into production.

Là gì Nagios?

Nagios is open-source software for the continuous monitoring of systems, networks, and infrastructures. It runs plugins that are stored on a server and connected to a host or another server on your network or the Internet. Whenever a failure occurs, Nagios raises an alert so that the technical team can begin the recovery process immediately.

Because it watches systems, applications, services, and business processes around the clock, Nagios is a popular choice for continuous monitoring within a DevOps culture.

Tại sao chúng ta cần Nagios?

Here are the important reasons to use the Nagios công cụ giám sát:

  • Detects all types of network and server issues.
  • Helps you find the root cause of a problem so you can apply a permanent solution.
  • Actively monitors your entire infrastructure and business processes.
  • Lets you monitor and troubleshoot server performance issues.
  • Helps you plan infrastructure upgrades before outdated systems create failures.
  • Helps you maintain the security and availability of your services.
  • Can automatically fix problems in critical situations.

Lịch sử của Nagios

1996 – Ethan Galstad creates a simple MS-DOS application that “pings” Novell NetWare servers and sends numeric pages. The basic architectural concept later used for Nagios được sinh ra.

1998 – Ethan uses the ideas and architecture of his earlier work to begin building a new application that runs on Hệ điều hành Linux.

1999 – The project is released as open source under the name “NetSaint.” The plugins originally distributed as part of the NetSaint distribution are soon split into a separate Nagios Plugins project.

2002 – Ethan renames the project to “Nagios” vì vấn đề nhãn hiệu với cái tên “NetSaint.”

2005 - Nagios trở thành SourceForge.net Project of the Month in June.

2007 – Ethan founds Nagios Enterprises, LLC to provide consulting and development services around Nagios.

2009 - Nagios Doanh nghiệp ra mắt phiên bản thương mại đầu tiên, Nagios XI. The open-source project is renamed Nagios Cốt lõi.

2010 - Nagios Fusion is released as a central dashboard for multiple monitoring servers.

2013 - Nagios Core 4 is released, along with Nagios Network Analyzer and the NCPA cross-platform agent.

2014 - Nagios Log Server is released for enterprise log monitoring and management.

2015 - Nagios XI 5 arrives with over 200 enhancements and improvements.

2016 - Nagios Core surpasses 7,500,000 downloads directly from the SourceForgetrang web .net.

2017 - Nagios Log Server 2 is released, and Nagios crosses 1,200 software downloads per day.

2019 – Ethan Galstad steps down as CEO of Nagios Enterprises and hires a successor.

2022 – Ethan Galstad resumes his position as CEO.

2023 – The 2024R1 versions of Nagios XI, Log Server, Network Analyzer, and Fusion are released with major updates to each product.

2024 - Nagios Enterprises celebrates its 25th anniversary and Nagios XI its 15th. Nagios Core surpasses 8,500,000 SourceForge.net downloads, the Nagios Library site is relaunched, and the first version of the Nagios Core Services Platform (CSP) ships to the community.

2025 – The sixth Nagios World Conference is held at company headquarters in St. Paul, MN. Nagios reports more than 10,000 customers and grows to 100 employees. Nagios Log Server 2026 ships with a new Simple Search homepage and an upgrade to OpenSeatháng 3 năm 3.1.0.

2026 - Nagios Core 4.5.x continues with maintenance and security releases (4.5.11 in January, 4.5.13 in May), while Nagios XI moves to the 2026R1 series with new configuration wizards for Red Hat OpenShift. Nagios World Conference 2026 is scheduled for September 14–17 in St. Paul, MN.

Đặc điểm của Nagios

The following are the important features of the Nagios công cụ giám sát:

  • Tương đối có thể mở rộng, quản lý và an toàn.
  • Provides a good log and database system.
  • Offers informative and attractive web interfaces.
  • Automatically sends alerts when a condition changes.
  • Skips redundant checks when services are already running fine.
  • Helps you detect network errors and server crashes.
  • Lets you troubleshoot server performance issues.
  • Fixes issues automatically as they are identified during monitoring.
  • Monitors your entire business process and IT infrastructure in a single pass.
  • Uses an architecture that makes it easy to write new plugins in the language of your choice.
  • Reads its configuration from an entire directory, helping you decide how to define individual files.
  • Uses topology to determine host dependencies.
  • Monitors network services such as HTTP, SMTP, SNMP, FTP, SSH, and POP.
  • Helps you define a network host hierarchy using parent hosts.
  • Lets you define event handlers that run during service or host events for proactive problem resolution.
  • Supports the implementation of redundant monitoring hosts.

Nagios Archikiến trúc

Nagios uses a client-server architecture. On a typical network, the Nagios server runs on a host, while plugins run on all the remote hosts that need to be monitored.

Nagios client-server architecture diagram showing the server, scheduler, and remote plugins

  1. The scheduler is a component of the server part of Nagios. It sends a signal to execute the plugins on the remote host.
  2. The plugin gets the status from the remote host.
  3. The plugin sends the data back to the process scheduler.
  4. The process scheduler updates the GUI, and notifications are sent to administrators.

bổ sung

Nagios plugins provide the low-level intelligence that tells Nagios Core how to monitor almost anything. A plugin acts as a standalone application, but it is designed to be executed by Nagios Cốt lõi. Nó kết nối với Apache, which is controlled by CGI to display the result, while a connected database keeps the log files.

Các plugin hoạt động như thế nào?

Diagram showing how a Nagios plugin communicates with the monitoring server

Consider the example above:

  • Check_nt is a plugin used to monitor a Windows machine, and it is usually available on the monitoring server.
  • NSClient++ should be installed on every Windows machine that you want to monitor.
  • An SSL connection between the server and the host continuously exchanges information between them.

Similarly, the NRPE (Nagios Remote Plugin Executor) and NSCA plugins are used to monitor Linux and Mac OS X hosts respectively.

GUI

Nagios interface displays web pages generated by CGI. It can show status through colored buttons (green or red), sounds, graphs, and more.

When a soft alert is raised repeatedly, it becomes a hard alert, and the Nagios server then sends a notification to the administrator.

Nagios web GUI dashboard displaying host and service status

Làm thế nào để cài đặt Nagios Công cụ tại AWS

Bước 1) Theo dõi Nagios.
Tới Nagios listing on AWS Marketplace and click Continue to Subscribe.

Đăng ký Nagios product on AWS Marketplace

Bước 2) Read the terms and conditions, then accept them.

Accepting the terms and conditions for the Nagios AWS subscription

Bước 3) View the message. You will see a subscription-pending message.

Subscription pending message for Nagios trên AWS

Bước 4) Do the configuration. Refresh the page after a few minutes and click Continue to Configuration.

Continuing to the configuration step for Nagios trên AWS

Bước 5) Khởi động Nagios. Keep the default settings and click Continue to Launch.

Khởi chạy Nagios instance with default settings on AWS

Bước 6) Review the settings, create a new key, and click Launch.

Reviewing settings and creating a key pair before launching Nagios

Bước 7) Note the public DNS of your instance.

Noting the public DNS name of the Nagios Ví dụ EC2

Bước 8) Convert the pem file to ppk. On your Windows machine, use the PuTTY generator to convert the pem file to a ppk file.

Converting a pem key to ppk format with PuTTYgen

Bước 9) In PuTTY, enter the public DNS.

Entering the public DNS in the PuTTY session field

Bước 10) In the Auth section, enter the ppk key and click Open.

Adding the ppk private key in the PuTTY Auth section

Bước 11) In the terminal, enter the login name as ubuntu and run the command.

  1. Chạy lệnh này: sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin
  2. Nhập mật khẩu mới theo lựa chọn của bạn.

Setting the nagiosadmin password with the htpasswd command in the terminal

Bước 12) Open your browser and go to http://<Public DNS>/nagios3 (in this example, http://ec2-54-209-48-136.compute-1.amazonaws.com/nagios3/).

Nhập tên người dùng: nagiosadmin

Password: the one set in the previous step.

Đăng nhập vào Nagios web interface as nagiosadmin

Bước 13) Nagios installation is done, and Nagios tải trọng.

  Nagios dashboard loaded after a successful AWS installation

Ứng dụng của Nagios

Nagios công cụ giám sát mạng is a health-check and monitoring system for a typical data centre, covering all types of equipment, such as:

  • Servers and network nodes.
  • Application monitoring from a single console.
  • Application monitoring with transaction-level insights.
  • Middleware and messaging components.
  • Báo cáo và bảng điều khiển có thể tùy chỉnh.
  • UPS backup systems.
  • Bio-metric identification systems.
  • Temperature and humidity control systems (sensing mechanisms).
  • CCTV and NVR systems.
  • Storage subsystems (NAS and SAN).

Nhược điểm của việc sử dụng Nagios

  • Important features such as wizards and interactive dashboards are only available in Nagios XI, which is a fairly expensive tool.
  • Nagios Core has a confusing interface for new users.
  • It uses many configuration files that can be hard to set up.
  • Nagios cannot monitor network throughput.
  • The tool lets you monitor the network but not manage it.
  • Nagios makes no distinction between devices such as servers, routers, or switches, because it treats every device as a host.

Câu Hỏi Thường Gặp

Nagios Core is free, open-source software released under the GNU GPL, so you can download, run, and modify it without licensing fees. Nagios cũng bán Nagios XI, a paid commercial edition that adds dashboards, wizards, and support on top of Core.

Nagios Core is written mainly in C for performance, while many of its plugins and add-ons are created in Perl, Python, and shell scripts. It runs on Linux and most Unix-like systems, and its web interface is served through CGI and a web server.

Nagios Core is the free, open-source engine that relies on manual text-file configuration. Nagios XI is the paid edition built on Core, adding a configuration wizard, graphs, capacity planning, dashboards, scheduled reports, a mobile app, and official technical support.

NRPE stands for Nagios Remote Plugin Executor. It is an agent installed on remote Linux or Unix hosts that lets the Nagios server run plugins there and collect local metrics such as CPU, disk, and memory usage over a secure connection.

Nagios uses traditional check-based alerting and suits stable, smaller estates. Zabbix is an all-in-one, agent-based platform with strong dashboards, while Prometheus uses pull-based metrics ideal for cloud-native and Kubernetes environments.

Vâng. Nagios màn hình Windows servers using the NSClient++ agent with the check_nt plugin, and it monitors Linux, Unix, and Mac OS X hosts through the NRPE and NSCA plugins. This lets a single Nagios server watch a mixed operating-system environment.

AI and machine-learning tools analyze Nagios logs and alert history to reduce noise, group related alerts, and flag anomalies before outages. They can predict failures from performance trends and suggest thresholds, though engineers should review every recommendation before applying it.

Vâng. ChatGPTTrợ lý GitHub có thể soạn thảo Nagios object definitions, hostgroups, service checks, and NRPE command lines from a short description. Always review the generated configuration for correct syntax, paths, and thresholds before deploying it to production.

Tóm tắt bài viết này với: