You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Deploying Nightingale Monitoring using binary files"
4
4
lead: ""
5
5
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
7
7
draft: false
8
8
images: []
9
9
menu:
10
10
docs:
11
11
parent: "install"
12
-
weight: 630
12
+
weight: 210
13
13
toc: true
14
14
---
15
15
16
+
If you have not read the section on [Pre-Installation Instructions](/docs/install/pre-intro/), please do so before reading this section.
17
+
16
18
## Download
17
19
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.
19
21
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.
21
23
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.
23
25
24
26
```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
+
```
27
29
28
-
cd /opt/n9e
30
+
## Single Node Test Installation
29
31
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 &
32
38
```
33
39
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
35
43
36
44
```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
39
47
```
40
48
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`.
42
52
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.
44
54
45
-
> Please replace localhost with your server's IP address.
55
+
## Single Node Production Installation
46
56
47
-
## Install using MySQL and Redis
57
+
In a production environment, we recommend using MySQL and Redis to store data.
48
58
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
50
60
51
-
DB section:
61
+
You need to configure the connection information for MySQL and Redis in the `/opt/n9e/etc/config.toml` file.
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.
69
83
70
84
```bash
71
85
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
72
113
```
73
114
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
+
```
75
121
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
+
```
77
151
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`.
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."
4
4
lead: ""
5
5
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
7
7
draft: false
8
8
images: []
9
9
menu:
10
10
docs:
11
11
parent: "install"
12
-
weight: 610
12
+
weight: 300
13
13
toc: true
14
14
---
15
15
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).
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
40
39
```
41
40
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.
43
58
59
+
## Edge Mode
44
60
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).
0 commit comments