Skip to content

Commit d65388f

Browse files
committed
add some en docs
1 parent ef2d566 commit d65388f

15 files changed

Lines changed: 980 additions & 64 deletions

File tree

content/en/docs/install/binary.md

Lines changed: 101 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,74 @@
11
---
2-
title: "Binary install"
3-
description: "Deploy nightingale via binary"
2+
title: "Binary Deployment"
3+
description: "Deploying Nightingale Monitoring using binary files"
44
lead: ""
55
date: 2020-11-12T13:26:54+01:00
6-
lastmod: 2020-11-12T13:26:54+08:00
6+
lastmod: 2025-07-26T13:46:02.501+08:00
77
draft: false
88
images: []
99
menu:
1010
docs:
1111
parent: "install"
12-
weight: 630
12+
weight: 210
1313
toc: true
1414
---
1515

16+
If you have not read the section on [Pre-Installation Instructions](/docs/install/pre-intro/), please do so before reading this section.
17+
1618
## Download
1719

18-
Download the latest release from [GitHub](https://github.com/ccfos/nightingale/releases), then you will get a tarball which name is like `n9e-{version}-linux-amd64.tar.gz`
20+
Download the latest version from [GitHub](https://github.com/ccfos/nightingale/releases), and you will get a compressed package similar to `n9e-${version}-linux-amd64.tar.gz`. This is the release package for the X86 CPU architecture. If you need the ARM architecture, download the arm64 package. There is no Windows version of the release package because Nightingale is a server-side project that typically runs on Linux systems.
1921

20-
## Install using sqlite and miniredis
22+
If you want to run Nightingale on Windows and Mac, it's also OK, but you need to compile it yourself. The compilation is relatively simple, and you can refer to the logic in the `Makefile` in the project code repository.
2123

22-
This approach doesn't rely on MySQL and Redis. You can simply start it using the n9e binary. However, this method isn't suitable for production environments and is only intended for testing purposes.
24+
Unzip the downloaded package to the `/opt/n9e` directory.
2325

2426
```bash
25-
#!/bin/bash
26-
mkdir /opt/n9e && tar zxvf n9e-{version}-linux-amd64.tar.gz -C /opt/n9e
27+
mkdir /opt/n9e && tar zxvf n9e-${version}-linux-amd64.tar.gz -C /opt/n9e
28+
```
2729

28-
cd /opt/n9e
30+
## Single Node Test Installation
2931

30-
# check configurations in /opt/n9e/etc/config.toml and start n9e
31-
nohup ./n9e &> n9e.log &
32+
In this mode, it is only for testing purposes, and it does not depend on MySQL or Redis (it actually uses SQLite and an in-memory Redis: miniredis). The startup is straightforward; you can start it directly after unzipping.
33+
34+
### Start the Process
35+
36+
```bash
37+
cd /opt/n9e && nohup ./n9e &> n9e.log &
3238
```
3339

34-
## Check Process
40+
Since this is just a test mode, we directly use `nohup` to start it. In a production environment, you would typically use `systemd` to manage the `n9e` process.
41+
42+
### Check the Process
3543

3644
```bash
37-
# check process is runing or not
38-
ss -tlnp|grep 17000
45+
# Check if the process is running
46+
ss -tlnp | grep 17000
3947
```
4048

41-
## Login
49+
### Login
50+
51+
Open your browser and visit [http://localhost:17000](http://localhost:17000). The default username is `root`, and the default password is `root.2020`.
4252

43-
Open web browser and go to [http://localhost:17000](http://localhost:17000). The default username is `root` and default password is `root.2020`.
53+
> Please replace `localhost` with your server's IP address.
4454
45-
> Please replace localhost with your server's IP address.
55+
## Single Node Production Installation
4656

47-
## Install using MySQL and Redis
57+
In a production environment, we recommend using MySQL and Redis to store data.
4858

49-
In production environments, we recommend using MySQL and Redis to store data. Modify the `/opt/n9e/etc/config.toml` configuration file to configure the connection information for MySQL and Redis.
59+
### Modify Configuration
5060

51-
DB section:
61+
You need to configure the connection information for MySQL and Redis in the `/opt/n9e/etc/config.toml` file.
62+
63+
MySQL key configuration example:
5264

5365
```toml
5466
[DB]
5567
DBType = "mysql"
56-
DSN="YourUsername:YourPassword@tcp(127.0.0.1:3306)/n9e_v6?charset=utf8mb4&parseTime=True&loc=Local"
68+
DSN = "YourUsername:YourPassword@tcp(127.0.0.1:3306)/n9e_v6?charset=utf8mb4&parseTime=True&loc=Local"
5769
```
5870

59-
Redis section:
71+
Redis key configuration example:
6072

6173
```toml
6274
[Redis]
@@ -65,14 +77,76 @@ Password = "YourRedisPassword"
6577
RedisType = "standalone"
6678
```
6779

68-
Start the n9e binary, and Nightingale will automatically create the database tables. Of course, your DB connection account needs to have the permission to create database tables.
80+
### Start the Process
81+
82+
Start the `n9e` binary, and Nightingale will automatically create the database tables. This requires your database connection account to have permissions to create and modify tables.
6983

7084
```bash
7185
nohup ./n9e &> n9e.log &
86+
87+
# Check if the process started successfully
88+
ps -ef | grep n9e
89+
ss -tlnp | grep 17000
90+
```
91+
92+
`nohup` allows for quick startup verification; if there are any issues, check the n9e.log file.
93+
94+
## Using systemd for Management
95+
96+
In a production environment, it is recommended to use `systemd` to manage the `n9e` process. Create a systemd service file at `/etc/systemd/system/n9e.service` with the following content:
97+
98+
```ini
99+
[Unit]
100+
Description=Nightingale Monitoring Service
101+
After=network.target
102+
[Service]
103+
Type=simple
104+
ExecStart=/opt/n9e/n9e
105+
WorkingDirectory=/opt/n9e
106+
Restart=always
107+
RestartSec=5
108+
StandardOutput=syslog
109+
StandardError=syslog
110+
SyslogIdentifier=n9e
111+
[Install]
112+
WantedBy=multi-user.target
72113
```
73114

74-
Open web browser and go to [http://localhost:17000](http://localhost:17000). The default username is `root` and default password is `root.2020`.
115+
After saving the file, run the following commands to enable and start the service:
116+
117+
```bash
118+
sudo systemctl enable n9e
119+
sudo systemctl start n9e
120+
```
75121

76-
> Please replace localhost with your server's IP address.
122+
### Login
123+
124+
Open your browser and visit [http://localhost:17000](http://localhost:17000). The default username is `root`, and the default password is `root.2020`.
125+
126+
> Please replace `localhost` with your server's IP address.
127+
128+
## Cluster Mode
129+
130+
The logic of the cluster mode has already been explained in *[Nightingale Architecture Design](/docs/prologue/architecture/)*, so it will not be repeated here. From the deployment perspective, you just need to set up multiple machines, deploy one n9e process on each machine, and configure the connection information for MySQL and Redis properly. Multiple n9e processes share the same set of MySQL and Redis, so the configuration files of these n9e processes are exactly the same.
131+
132+
## Edge Mode
133+
134+
For instructions on the edge mode, please be sure to read this first: [Nightingale Monitoring - Detailed Explanation of Edge Alert Engine Architecture](/docs/prologue/architecture/#edge-mode)!!!
135+
136+
The edge mode uses the `n9e-edge` binary, which can be found in the `n9e-${version}-linux-amd64.tar.gz` compressed package. `n9e-edge` needs to communicate with the `n9e` of the central server to synchronize alert rules, so the configuration file of `n9e-edge` must include the connection information of the central `n9e`.
137+
138+
## Edge Cluster
139+
140+
Multiple instances of `n9e-edge` in edge computer rooms can also be deployed to form a cluster. The configuration files of multiple `n9e-edge` instances within the same cluster must be consistent. Instances with the same EngineName in the configuration file will be regarded as multiple instances of the same engine cluster, and the name should be different from that of the central `n9e`. The default EngineName of the central `n9e` is `default`, while the default EngineName of the edge `n9e-edge` is `edge`.
141+
142+
If you have multiple edge computer rooms, the EngineName of `n9e-edge` in each edge computer room needs to be different, such as `edge1`, `edge2`, etc. Only after such differentiation can different data sources be assigned to different alert engines.
143+
144+
### Start `n9e-edge`
145+
146+
Note that when starting the n9e-edge process, you need to specify the configuration directory instead of the configuration file. For example:
147+
148+
```bash
149+
nohup ./n9e-edge --configs etc/edge &> edge.log &
150+
```
77151

78-
We recommend using `systemd` to manage the n9e process in production environments and set it to start automatically at boot time.
152+
The `etc/edge` mentioned above is the configuration directory. It would be incorrect to write it as `--configs etc/edge/edge.toml`.

content/en/docs/install/compose.md

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,62 @@
11
---
22
title: "Docker Compose"
3-
description: "Deploy nightingale via Docker compose"
3+
description: "Nightingale monitoring (Nightingale) supports Docker Compose deployment, this article introduces how to deploy Nightingale using Docker Compose."
44
lead: ""
55
date: 2020-11-12T13:26:54+01:00
6-
lastmod: 2020-11-12T13:26:54+01:00
6+
lastmod: 2025-07-26T13:58:52.542+08:00
77
draft: false
88
images: []
99
menu:
1010
docs:
1111
parent: "install"
12-
weight: 610
12+
weight: 300
1313
toc: true
1414
---
1515

16+
## Download
17+
18+
Refer to the [Binary Installation](/docs/install/binary/) section to download the Nightingale monitoring release package, which includes Docker Compose configuration files. Alternatively, you can directly download the Nightingale source repository, where you can also find the Docker Compose configuration files.
19+
20+
## Start
21+
22+
Whether you download the release package or the source code repository, there will be a `docker/compose-bridge` directory after decompression. Simply enter this directory and execute the `docker-compose up -d` command (due to domestic network restrictions, image downloads may fail, and you need to solve the problem of scientific internet access on your own).
1623

1724
```bash
18-
$ git clone https://github.com/ccfos/nightingale.git
19-
$ cd nightingale/docker/compose-bridge
20-
21-
$ docker-compose up -d
22-
Creating network "docker_nightingale" with driver "bridge"
23-
Creating mysql ... done
24-
Creating redis ... done
25-
Creating prometheus ... done
26-
Creating ibex ... done
27-
Creating agentd ... done
28-
Creating nwebapi ... done
29-
Creating nserver ... done
30-
Creating telegraf ... done
31-
32-
$ docker-compose ps
33-
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
34-
categraf flashcatcloud/categraf:latest "/entrypoint.sh" categraf 2 days ago Up 2 days
35-
ibex ulric2019/ibex:0.3 "sh -c '/wait && /ap…" ibex 2 days ago Up 2 days
36-
mysql mysql:5.7 "docker-entrypoint.s…" mysql 2 days ago Up 2 days
37-
n9e flashcatcloud/nightingale:latest "sh -c '/wait && /ap…" n9e 2 days ago Up 2 days
38-
prometheus prom/prometheus "/bin/prometheus --c…" prometheus 2 days ago Up 2 days
39-
redis redis:6.2 "docker-entrypoint.s…" redis 2 days ago Up 2 days
25+
root@ubuntu-linux-22-04-desktop:/opt/n9e/docker/compose-bridge# docker compose up -d
26+
[+] Running 5/5
27+
✔ Container victoriametrics Started 0.6s
28+
✔ Container redis Started 0.6s
29+
✔ Container mysql Started 0.6s
30+
✔ Container nightingale Started 0.2s
31+
✔ Container categraf Started 0.2s
32+
root@ubuntu-linux-22-04-desktop:/opt/n9e/docker/compose-bridge# docker compose ps
33+
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
34+
categraf m.daocloud.io/docker.io/flashcatcloud/categraf:latest "/entrypoint.sh" categraf 2 minutes ago Up 3 seconds
35+
mysql mysql:8 "docker-entrypoint.s…" mysql 2 minutes ago Up 4 seconds 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp
36+
nightingale m.daocloud.io/docker.io/flashcatcloud/nightingale:latest "sh -c /app/n9e" nightingale 2 minutes ago Up 3 seconds 0.0.0.0:17000->17000/tcp, :::17000->17000/tcp, 0.0.0.0:20090->20090/tcp, :::20090->20090/tcp
37+
redis redis:6.2 "docker-entrypoint.s…" redis 2 minutes ago Up 4 seconds 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp
38+
victoriametrics victoriametrics/victoria-metrics:v1.79.12 "/victoria-metrics-p…" victoriametrics 2 minutes ago Up 4 seconds 0.0.0.0:8428->8428/tcp, :::8428->8428/tcp
4039
```
4140

42-
Use your browser to access Nightingale's web page at [http://localhost:17000](http://localhost:17000). The default username is `root` and default password is `root.2020`.
41+
Docker Compose starts multiple containers, which are:
42+
43+
- `victoriametrics`: Time-series database, compatible with Prometheus, with better performance.
44+
- `redis`: Cache database, Nightingale uses Redis to store JWT tokens and machine heartbeat metadata
45+
- `mysql`: Relational database, Nightingale uses MySQL to store user information, alert rules, dashboards, and other configuration data.
46+
- `nightingale`: The core service of Nightingale monitoring.
47+
- `categraf`: Monitoring data collector, responsible for collecting CPU, memory, disk, and other metric data from the host.
48+
49+
## Login
50+
51+
Use your browser to visit [http://localhost:17000](http://localhost:17000) to open the Nightingale monitoring page. The default username is `root`, and the default password is `root.2020`.
52+
53+
> Please replace `localhost` with your server's IP address.
54+
55+
## Cluster Mode
56+
57+
In cluster mode, multiple `n9e` instances need to share the same MySQL and Redis, so you cannot simply use the default Docker Compose. You need to modify the `config.toml` file in the `etc-nightingale` directory to configure the unified MySQL and Redis connection information.
4358

59+
## Edge Mode
4460

61+
The edge mode requires the `n9e-edge` process. However, the community does not provide a Docker image for `n9e-edge`, so in edge mode, it is still necessary to deploy the `n9e-edge` process using the [binary method](/docs/install/binary/). For detailed instructions on the edge mode, please refer to: [Nightingale Monitoring - Detailed Explanation of Edge Alert Engine Architecture](/docs/prologue/architecture/#edge-mode).
4562

0 commit comments

Comments
 (0)