1
0
Fork 0

feat(nginxpulse): add nginxpulse application with version 1.6.5

This commit is contained in:
pooneyy 2026-01-31 18:05:38 +08:00
parent 5185cd21f9
commit 6b747a5136
No known key found for this signature in database
7 changed files with 254 additions and 0 deletions

View File

@ -0,0 +1,149 @@
additionalProperties:
formFields:
- default: 8080
envKey: PANEL_APP_PORT_HTTP
labelZh: HTTP 端口
labelEn: HTTP Port
label:
zh: HTTP 端口
zh-Hant: HTTP 連接埠
en: HTTP Port
ja: HTTP ポート
ko: HTTP 포트
ms: Port HTTP
pt-br: Porta HTTP
ru: HTTP Порт
tr: HTTP Portu
description:
zh: "设置应用的 HTTP 访问端口,有效范围: 1-65535"
zh-Hant: "設定應用程式的 HTTP 存取連接埠,有效範圍: 1-65535"
en: "Set the HTTP access port for the application, valid range: 1-65535"
ja: "アプリケーションのHTTPアクセスポートを設定します。有効範囲: 1-65535"
ko: "애플리케이션의 HTTP 접근 포트를 설정합니다. 유효 범위: 1-65535"
ms: "Tetapkan port akses HTTP untuk aplikasi, julat sah: 1-65535"
pt-br: "Defina a porta de acesso HTTP para o aplicativo, intervalo válido: 1-65535"
ru: "Установите порт доступа HTTP для приложения, допустимый диапазон: 1-65535"
tr: "Uygulama için HTTP erişim portunu ayarlayın, geçerli aralık: 1-65535"
required: true
type: number
edit: true
rule: paramPort
- default: nginxpulse_access_key
envKey: ACCESS_KEYS
labelZh: 访问密钥
labelEn: Access Key
label:
zh: 访问密钥
zh-Hant: 访问密钥
en: Access Key
ja: アクセスキー
ko: 액세스 키
ms: Kunci Akses
pt-br: Chave de Acesso
ru: Ключ доступа
tr: Erişim Anahtarı
required: false
type: text
edit: true
random: true
- default: ""
envKey: WEBSITE_DIR
labelEn: Website Dir
labelZh: 网站目录
required: true
type: text
label:
en: Website directory
ja: ウェブサイトディレクトリ
ms: Direktori laman web
pt-br: Diretório do site
ru: Директория сайта
ko: 웹사이트 디렉토리
tr: Web Sitesi Dizin
zh-Hant: 網站目錄
zh: 网站目录
description:
zh: 默认网站目录会放置在 1Panel 安装目录下,如需修改请以绝对路径填写
zh-Hant: 預設網站目錄會放置在 1Panel 安裝目錄下,如需修改請以絕對路徑填寫
en: The website directory will be placed under the 1Panel installation directory
ja: ウェブサイトディレクトリは 1Panel インストールディレクトリに配置されます
ms: Direktori laman web akan diletakkan di bawah direktori pemasangan 1Panel
pt-br: O diretório do site será colocado sob o diretório de instalação do 1Panel
ru: Директория сайта будет размещена в каталоге установки 1Panel
ko: 웹사이트 디렉토리는 1Panel 설치 디렉토리에 배치됩니다
tr: Web sitesi dizini 1Panel kurulum dizini altında yer alacaktır
- default: ""
envKey: PANEL_DB_HOST
labelZh: 数据库
labelEn: Database
label:
zh: 数据库
zh-Hant: 資料庫
en: Database
ja: データベース
ko: 데이터베이스
ms: Pangkalan Data
pt-br: Banco de Dados
ru: База данных
tr: Veritabanı
required: true
type: service
edit: true
key: postgres
- default: nginxpulse_user
envKey: PANEL_DB_USER
labelZh: 数据库用户名
labelEn: Database Username
label:
zh: 数据库用户名
zh-Hant: 資料庫使用者名稱
en: Database Username
ja: データベースユーザー名
ko: 데이터베이스 사용자 이름
ms: Nama Pengguna Pangkalan Data
pt-br: Nome de Usuário do Banco de Dados
ru: Имя пользователя базы данных
tr: Veritabanı Kullanıcı Adı
required: true
type: text
edit: true
rule: paramCommon
random: true
- default: nginxpulse_pass
envKey: PANEL_DB_USER_PASSWORD
labelZh: 数据库密码
labelEn: Database Password
label:
zh: 数据库密码
zh-Hant: 資料庫密碼
en: Database Password
ja: データベースパスワード
ko: 데이터베이스 비밀번호
ms: Kata Laluan Pangkalan Data
pt-br: Senha do Banco de Dados
ru: Пароль базы данных
tr: Veritabanı Parolası
required: true
type: password
edit: true
rule: paramComplexity
random: true
- default: nginxpulse
envKey: PANEL_DB_NAME
labelZh: 数据库名
labelEn: Database Name
label:
zh: 数据库名
zh-Hant: 資料庫名稱
en: Database Name
ja: データベース名
ko: 데이터베이스 이름
ms: Nama Pangkalan Data
pt-br: Nome do Banco de Dados
ru: Имя базы данных
tr: Veritabanı Adı
required: true
type: text
edit: true
rule: paramCommon
random: true

View File

@ -0,0 +1,21 @@
services:
nginxpulse:
image: magiccoders/nginxpulse:v1.6.5
container_name: ${CONTAINER_NAME}
ports:
- ${PANEL_APP_PORT_HTTP}:8088
environment:
- ACCESS_KEYS=${ACCESS_KEYS}
- DB_DSN=postgres://${PANEL_DB_USER}:${PANEL_DB_USER_PASSWORD}@${PANEL_DB_HOST}:${PANEL_DB_PORT}/${PANEL_DB_NAME}
volumes:
- ${WEBSITE_DIR}/sites:/sites:ro
- ./data/nginxpulse_data:/app/var/nginxpulse_data
- ./data/configs:/app/configs
- /etc/localtime:/etc/localtime:ro
networks:
- 1panel-network
labels:
createdBy: Apps
networks:
1panel-network:
external: true

View File

@ -0,0 +1,2 @@
mkdir -p data/configs data/nginxpulse_data
chmod 777 data/configs data/nginxpulse_data

25
apps/nginxpulse/README.md Normal file
View File

@ -0,0 +1,25 @@
## 产品介绍
NginxPulse 是一个轻量级的 Nginx 访问日志分析与可视化面板,旨在为开发者和运维人员提供便捷的日志监控和分析工具。通过实时解析 Nginx 访问日志提供多维度的统计指标、PV/UV 过滤、IP 归属地查询以及客户端信息解析等功能。该项目将原始的日志文件转化为直观的可视化图表,帮助用户快速了解网站流量、用户分布和访问行为。
## 主要功能
- **实时日志分析与统计**:自动扫描并解析 Nginx 访问日志(支持 gzip 压缩格式),实时统计 PV页面浏览量、UV独立访客、请求状态码分布、访问路径排行等关键指标并以图表形式直观展示。
- **IP 归属地与客户端解析**:集成本地 ip2region 数据库与远程 ip-api.com 服务,实现 IP 地址的地理位置解析(支持 IPv4/IPv6同时解析 User-Agent 获取客户端设备、浏览器和操作系统信息,帮助分析用户来源和访问环境。
- **灵活的数据过滤与配置**:提供可配置的 PV 过滤规则,支持排除内网 IP 或特定地址,确保统计数据的准确性。系统采用异步任务处理日志解析与 IP 归属地补齐,避免阻塞实时分析,并内置缓存机制提升查询性能。
## 配置和使用说明
安装时默认将服务器中的站点路径(默认为 `/opt/1panel/www/sites`)映射到容器内的 `/sites`,所以你启动应用后配置站点与日志时,你的日志路径应写作:
```
/sites/<站点目录>/log/*.log
```
如果你想一次匹配全部站点,你也可以使用通配符:
```
/sites/*/log/*.log
```

View File

@ -0,0 +1,25 @@
## Introduction
NginxPulse is a lightweight Nginx access log analysis and visualization panel designed to provide developers and operations staff with a convenient log monitoring and analysis tool. By parsing Nginx access logs in real time, it offers multi-dimensional statistical metrics, PV/UV filtering, IP geolocation queries, and client information parsing. The project transforms raw log files into intuitive visual charts, helping users quickly understand website traffic, user distribution, and access behavior.
## Features
- **Real-time Log Analysis and Statistics**: Automatically scans and parses Nginx access logs (supports gzip compressed format), providing real-time statistics on key metrics such as PV (Page Views), UV (Unique Visitors), request status code distribution, and top access paths, all presented through intuitive charts.
- **IP Geolocation and Client Parsing**: Integrates the local ip2region database and the remote ip-api.com service to achieve IP address geolocation resolution (supports IPv4/IPv6). Simultaneously, it parses User-Agent strings to extract client device, browser, and operating system information, aiding in the analysis of user sources and access environments.
- **Flexible Data Filtering and Configuration**: Offers configurable PV filtering rules, supporting the exclusion of internal IPs or specific addresses to ensure the accuracy of statistical data. The system uses asynchronous tasks to handle log parsing and IP geolocation completion, preventing real-time analysis blockage, and includes a built-in caching mechanism to enhance query performance.
## Configuration and Usage Instructions
During installation, the default mapping is from the server's site directory (default: `/opt/1panel/www/sites`) to the container's `/sites`. Therefore, after starting the application and configuring Website & Logs, your log path should be written as:
```
/sites/<site-directory>/log/*.log
```
If you wish to match all sites at once, you can also use a wildcard:
```
/sites/*/log/*.log
```

32
apps/nginxpulse/data.yml Normal file
View File

@ -0,0 +1,32 @@
name: NginxPulse
tags:
- 实用工具
- BI
title: Nginx 访问日志分析与可视化面板
description: Nginx 访问日志分析与可视化面板
additionalProperties:
key: nginxpulse
name: NginxPulse
tags:
- Tool
- BI
shortDescZh: Nginx 访问日志分析与可视化面板
shortDescEn: Nginx Access Log Analysis and Visualization Panel
description:
en: Nginx Access Log Analysis and Visualization Panel
zh: Nginx 访问日志分析与可视化面板
zh-Hant: Nginx 存取日誌分析與視覺化面板
ja: Nginx アクセスログ分析・可視化パネル
ms: Panel Analisis dan Visualisasi Log Akses Nginx
pt-br: Painel de Análise e Visualização de Logs de Acesso do Nginx
ru: Панель анализа и визуализации журналов доступа Nginx
ko: Nginx 액세스 로그 분석 및 시각화 패널
type: website
crossVersionUpdate: true
limit: 0
website: https://nginx-pulse.kaisir.cn
github: https://github.com/likaia/nginxpulse
document: https://github.com/likaia/nginxpulse/wiki
architectures:
- amd64
- arm64

BIN
apps/nginxpulse/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB