Netdata
即时效能监控,全力给您最详细的数据
Drag charts to pan. Shift + wheel on them, to zoom in and out. Double-click on them, to reset. Hover on them too!
├── Makefile
├── README.md
├── luasrc
├── controller
│ └── netdata.lua
├── model
│ └── cgi
│ │ └── netdate.lua
└── view
│ └── netdata
│ └── netdata.htm
├── po
└── zh-cn
│ └── netdata.po
├── root
├── etc
│ ├── netdata
│ │ ├── apps_groups.conf
│ │ ├── ebpf.conf
│ │ ├── exporting.conf
│ │ ├── netdata.conf
│ │ └── stream.conf
│ └── uci-defaults
│ │ └── 40_luci-app-netdata
└── usr
│ └── share
│ ├── netdata
│ └── webcn
│ │ ├── dashboard.js
│ │ ├── dashboard_info.js
│ │ ├── index.html
│ │ └── main.js
│ └── rpcd
│ └── acl.d
│ └── luci-app-netdata.json
└── web
├── dashboard.js
├── dashboard_info.js
├── index.html
└── main.js
/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2016 Openwrt.org
2 | #
3 | # This is free software, licensed under the Apache License, Version 2.0 .
4 | #
5 |
6 | include $(TOPDIR)/rules.mk
7 |
8 | LUCI_TITLE:=LuCI support for Netdata
9 | LUCI_DEPENDS:=+netdata
10 | LUCI_PKGARCH:=all
11 |
12 | PKG_NAME:=luci-app-netdata
13 | PKG_VERSION:=1.0
14 | PKG_RELEASE:=3
15 |
16 | include $(TOPDIR)/feeds/luci/luci.mk
17 |
18 | # call BuildPackage - OpenWrt buildroot signature
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # luci-app-netdata
2 | 1.33.1 汉化(部分)
3 | ## 食用方法
4 | ```
5 | rm -rf ./feeds/luci/applications/luci-app-netdata/
6 | git clone https://github.com/Jason6111/luci-app-netdata ./feeds/luci/applications/luci-app-netdata/
7 | ```
8 | 也可以用web里文件,覆盖至路径 `/usr/share/netdata/web/` ,请先备份
9 |
10 | - dashboard_info.js
11 | - dashboard.js
12 | - main.js
13 | - index.html
14 |
15 | 已经开启了远程查看权,不需要的手动关闭
16 | `/root/etc/netdata/netdata.conf`
17 | allow connections from = *
18 | allow dashboard from = *
19 | 把这两行第一个*删除即可
20 | # 如发现luci进不去netdata请尝试 连接ssh进入openwrt输入以下指令
21 | ```
22 | mkdir /usr/lib/lua/luci/view/netdata
23 | mv -f /usr/lib/lua/luci/view/netdata.htm /usr/lib/lua/luci/view/netdata/netdata.htm
24 |
25 | ```
26 |
27 | # 还原1.33.1(留作以后用)
28 | ```
29 | rm -rf ./feeds/packages/admin/netdata
30 | git clone -b 1.33.1 https://github.com/Jason6111/luci-app-netdata ./feeds/packages/admin/netdata
31 | ```
32 |
--------------------------------------------------------------------------------
/luasrc/controller/netdata.lua:
--------------------------------------------------------------------------------
1 | module("luci.controller.netdata", package.seeall)
2 |
3 | function index()
4 | if not (luci.sys.call("pidof netdata > /dev/null") == 0) then
5 | return
6 | end
7 | local fs = require "nixio.fs"
8 |
9 | entry({"admin", "status", "netdata"}, template("netdata/netdata"), _("NetData"), 10).leaf = true
10 | end
11 |
--------------------------------------------------------------------------------
/luasrc/model/cgi/netdate.lua:
--------------------------------------------------------------------------------
1 | -- Copyright 2022 Jason
2 |
3 | function index()
4 |
5 |
6 | o = Map("netdate", "" .. translate("实时监控") .."", "" .. translate( "强大的实时监控数据,需要中文版请点击:【升级中文版】") .."")
7 |
8 | t = o:section(TypedSection, "netdate")
9 | t.anonymous = true
10 | t.description = translate(string.format("%s
", status))
11 |
12 | t:tab("base",translate("Basic Settings"))
13 |
14 | e = t:taboption("base", Button, "restart", translate("手动更新"))
15 | e.inputtitle = translate("升级中文版")
16 | e.inputstyle = "reload"
17 | e.write = function()
18 | luci.sys.call("/usr/share/netdata/netdatacn 2>&1 >/dev/null")
19 | luci.http.redirect(luci.dispatcher.build_url("admin","status","netdata"))
20 | end
21 |
22 | t=o:section(TypedSection,"rss_rules",translate("技术支持"))
23 | t.anonymous = true
24 | t:append(Template("feedback"))
25 | return o
26 |
--------------------------------------------------------------------------------
/luasrc/view/netdata/netdata.htm:
--------------------------------------------------------------------------------
1 | <%+header%>
2 |