Nezha Monitoring Panel Setup Guide11


Introduction

Nezha is a powerful, open-source monitoring platform designed to provide comprehensive visibility into your IT infrastructure. This guide will walk you through the steps of setting up a Nezha monitoring panel, allowing you to monitor your systems' performance, availability, and security.

Prerequisites
A server running a supported Linux distribution (Ubuntu, CentOS, or Debian)
Root access to the server
Java Runtime Environment (JRE) or OpenJDK
MySQL or PostgreSQL database
Nezha installation package

Step 1: Install Java

Ensure you have Java installed on your server. For Ubuntu/Debian:```Bash
sudo apt-get update
sudo apt-get install openjdk-11-jre
```

For CentOS/Red Hat:```Bash
sudo yum -y install java-11-openjdk
```

Step 2: Install MySQL or PostgreSQL

Nezha requires a database for storing monitoring data. Install MySQL:```Bash
sudo apt-get install mysql-server
```

Or PostgreSQL:```Bash
sudo apt-get install postgresql
```

Step 3: Download and Install Nezha

Download the Nezha installation package from the official website.

Extract the package and navigate to the extraction directory:```Bash
tar -xvzf nezha-*.
cd nezha-*
```

Start Nezha:```Bash
./
```

Step 4: Configure Database

Create a database for Nezha. For MySQL:```Bash
sudo mysql -u root -p
CREATE DATABASE nezha;
GRANT ALL PRIVILEGES ON nezha.* TO 'nezha_user'@'%' IDENTIFIED BY 'nezha_password';
```

For PostgreSQL:```Bash
sudo postgresql -u postgres -p
CREATE DATABASE nezha;
CREATE USER nezha_user WITH PASSWORD 'nezha_password';
GRANT ALL PRIVILEGES ON DATABASE nezha TO nezha_user;
```

Step 5: Configure Nezha

Edit the `` file in the Nezha directory and update the database configuration:```YAML
=jdbc:mysql://localhost:3306/nezha?useUnicode=true&characterEncoding=utf8&useSSL=false
=nezha_user
=nezha_password
```

Step 6: Create a Nezha User

Navigate to `{server_ip}:{port}/nezha` in your browser. Click on "Login" and create a user with administrative privileges.

Step 7: Add Monitoring Sources

Click on "Host" in the left menu. Add hosts and agents to monitor their performance and availability.

Step 8: Configure Alerts

Click on "Alert" in the left menu. Create alerts to notify you of critical events or performance issues.

Step 9: View Dashboards

Click on "Dashboard" in the left menu. Create dashboards to visualize the performance and availability of your monitored systems.

Conclusion

Congratulations! You have successfully set up a Nezha monitoring panel. Nezha provides comprehensive and real-time insights into your IT infrastructure, empowering you to proactively manage and optimize your systems' performance.

2025-01-26


Previous:All-in-One Guide to Bluetooth Monitoring Devices

Next:The Benefits of Installing Video Surveillance