Operations 8 min read

Step‑by‑Step Deployment of Nightingale Monitoring with Prometheus and Categraf on Linux

This guide walks through installing and configuring the open‑source Nightingale monitoring platform on a Linux server, including prerequisite MySQL and Redis setup, Prometheus deployment, Nightingale binary installation, service configuration, and adding the Categraf collector for comprehensive system metrics.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Step‑by‑Step Deployment of Nightingale Monitoring with Prometheus and Categraf on Linux

1.0 Background

Night​ingale is a Chinese open‑source, cloud‑native monitoring and analysis system that follows an All‑In‑One design, integrating data collection, visualization, alerting, and analysis. First released on GitHub on 2020‑03‑20 (v1), it has iterated over 60 versions and, since v5, integrates tightly with Prometheus, VictoriaMetrics, Grafana, Telegraf, Datadog, etc., providing out‑of‑the‑box enterprise‑grade monitoring.

Official website

https://n9e.github.io/

2.0 Installation and Deployment

2.1 Install dependency components

# Install MySQL (MariaDB)
yum -y install mariadb*
systemctl enable mariadb
systemctl restart mariadb
systemctl status mariadb

mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('1234');"

# Install Redis
yum install -y redis
systemctl enable redis
systemctl restart redis
systemctl status redis

2.2 Install Prometheus and configure service

# Download Prometheus
mkdir -p /opt/prometheus
wget https://github.com/prometheus/prometheus/releases/download/v2.28.0/prometheus-2.28.0.linux-amd64.tar.gz -O prometheus-2.28.0.linux-amd64.tar.gz
# or alternative URL
wget https://s3-gz01.didistatic.com/n9e-pub/prome/prometheus-2.28.0.linux-amd64.tar.gz -O prometheus-2.28.0.linux-amd64.tar.gz

tar xf prometheus-2.28.0.linux-amd64.tar.gz
cp -far prometheus-2.28.0.linux-amd64/* /opt/prometheus/

2.3 Prometheus service file

vim /etc/systemd/system/prometheus.service

[Unit]
Description="prometheus"
Documentation=https://prometheus.io/
After=network.target

[Service]
Type=simple
ExecStart=/opt/prometheus/prometheus \
  --config.file=/opt/prometheus/prometheus.yml \
  --storage.tsdb.path=/opt/prometheus/data \
  --web.enable-lifecycle \
  --enable-feature=remote-write-receiver \
  --query.lookback-delta=2m
Restart=on-failure
SuccessExitStatus=0
LimitNOFILE=65536
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=prometheus

[Install]
WantedBy=multi-user.target

2.4 Enable and start Prometheus

systemctl daemon-reload
systemctl enable prometheus
systemctl restart prometheus
systemctl status prometheus

3.0 Install Nightingale (binary method)

mkdir -p /opt/n9e && cd /opt/n9e
# Download Nightingale release, e.g., n9e-v6.6.1-linux-amd64.tar.gz
tar zxvf n9e-v6.6.1-linux-amd64.tar.gz

# Initialize MySQL schema
mysql -uroot -p1234 < docker/initsql/a-n9e.sql

# Start server and web API
nohup ./n9e server &> server.log &
nohup ./n9e webapi &> webapi.log &

# Verify processes
ps -ef | grep n9e server
ps -ef | grep n9e webapi

Configuration

vim /opt/n9e/etc/config.toml

[DB]
DSN="root:1234@tcp(127.0.0.1:3306)/n9e_v6?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
Debug = false
DBType = "mysql"

[Redis]
Address = "127.0.0.1:6379"
RedisType = "standalone"

[[Pushgw.Writers]]
Url = "http://127.0.0.1:9090/api/v1/write"
BasicAuthUser = ""
BasicAuthPass = ""
Headers = ["X-From", "n9e"]
Timeout = 10000
DialTimeout = 3000
TLSHandshakeTimeout = 30000
ExpectContinueTimeout = 1000
IdleConnTimeout = 90000

After a successful start, the server listens on port 19000 and the web API on port 18000. Default credentials are user root and password root.2020.

curl http://10.10.201.222:17000/

3.2 Configure Categraf collector

# Download Categraf
wget https://github.com/flashcatcloud/categraf/releases/download/v0.2.35/categraf-v0.2.35-linux-amd64.tar.gz

tar zxvf categraf-v0.2.35-linux-amd64.tar.gz
mv categraf-0.2.35 categraf
vim /opt/n9e/categraf/conf/config.toml

[[writers]]
url = "http://127.0.0.1:17000/prometheus/v1/write"

[heartbeat]
enable = true
url = "http://127.0.0.1:17000/v1/n9e/heartbeat"

Categraf systemd service

vim /etc/systemd/system/categraf.service

[Unit]
Description="Categraf"
After=network.target

[Service]
Type=simple
ExecStart=/opt/n9e/categraf/categraf
WorkingDirectory=/opt/n9e/categraf/
Restart=on-failure
SuccessExitStatus=0
LimitNOFILE=65536
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=categraf

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable categraf
systemctl restart categraf
systemctl status categraf

Original article: https://blog.51cto.com/u_64214/8800325

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxPrometheusInstallationnightingaleCategraf
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.