https://github.com/itning/s-ui-traffic-exporter
Exporter for traffic information from s-ui to Prometheus.
https://github.com/itning/s-ui-traffic-exporter
exporter prometheus traffic x-ui
Last synced: 10 months ago
JSON representation
Exporter for traffic information from s-ui to Prometheus.
- Host: GitHub
- URL: https://github.com/itning/s-ui-traffic-exporter
- Owner: itning
- License: apache-2.0
- Created: 2025-08-24T15:12:22.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-08-24T15:17:50.000Z (10 months ago)
- Last Synced: 2025-08-24T20:11:08.937Z (10 months ago)
- Topics: exporter, prometheus, traffic, x-ui
- Language: Go
- Homepage:
- Size: 144 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-cn.md
- License: LICENSE
Awesome Lists containing this project
README
s-ui Traffic Exporter
[](https://github.com/itning/s-ui-traffic-exporter/stargazers)
[](https://github.com/itning/s-ui-traffic-exporter/network/members)
[](https://github.com/itning/s-ui-traffic-exporter/watchers)
[](https://github.com/itning?tab=followers)
[](https://github.com/itning/s-ui-traffic-exporter/issues)
[](https://github.com/itning/s-ui-traffic-exporter/blob/master/LICENSE)
[](https://github.com/itning/s-ui-traffic-exporter/commits)
[](https://github.com/itning/s-ui-traffic-exporter)
[](https://github.com/itning/hit-count)
---
# 介绍
功能:将s-ui中的流量信息上报给Prometheus
实现效果:

在s-ui中:

# 使用
```shell
./s-ui-traffic-exporter-linux-amd64 --web.listen-address=":9100"
```
```text
# HELP name_traffic_download_bytes_total Total bytes downloaded by each name.
# TYPE name_traffic_download_bytes_total counter
name_traffic_download_bytes_total{enable="true",name="zGZuZfFc"} 1.819867959e+09
# HELP name_traffic_upload_bytes_total Total bytes uploaded by each name.
# TYPE name_traffic_upload_bytes_total counter
name_traffic_upload_bytes_total{enable="true",name="zGZuZfFc"} 7.16911518e+08
```
默认使用s-ui sqlite数据库位置为:`/usr/local/s-ui/db/s-ui.db`
如果不在默认位置可以通过参数修改,例如`--db-path=/home/xui.db`
支持TLS:`--web.config.file=web-config.yml`
具体配置:[exporter-toolkit web-configuration](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md)
# 感谢
