This commit is contained in:
SirPdboy 2022-10-13 10:12:29 +08:00 committed by GitHub
parent 32740f68df
commit 71620993ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 0 additions and 22133 deletions

View File

@ -1,24 +0,0 @@
# Copyright (C) 2016 Openwrt.org
# Copyright (C) 2020-2021 sirpdboy <herboy2008@gmail.com>
# https://github.com/sirpdboy/luci-app-netdata for v 1.33.1 cn
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Netdata
LUCI_DEPENDS:=+netdata
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-netdata
PKG_VERSION:=1.0
PKG_RELEASE:=20220523
define Build/Compile
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,16 +0,0 @@
module("luci.controller.netdata", package.seeall)
function index()
if not nixio.fs.access("/etc/config/netdata") then
return
end
local page
entry({"admin", "status", "netdata"}, alias("admin", "status", "netdata", "netdata"),_("NetData"), 10).dependent = true
entry({"admin", "status", "netdata", "netdata"}, template("netdata/netdata"), _("NetData"), 10).leaf = true
entry({"admin", "status", "netdata", "setting"}, cbi("netdata/netdata"), _("Setting"), 20).leaf=true
end

View File

@ -1,24 +0,0 @@
-- Copyright 2018 sirpdboy (herboy2008@gmail.com)
require("luci.util")
local m, s ,o
local m = Map("netdata", translate("NetData"))
s = m:section(TypedSection, "netdata", translate("Global Settings"))
s.addremove=false
s.anonymous=true
o=s:option(Flag,"enabled",translate("Enable"))
o.default=0
o=s:option(Value, "port",translate("Set the netdata access port"))
o.datatype="uinteger"
o.default=19999
local e=luci.http.formvalue("cbi.apply")
if e then
io.popen("/etc/init.d/netdata start")
end
return m

View File

@ -1,20 +0,0 @@
<%#
Copyright 2008-2020 sirpdboy Wich <sirpdboy@qq.com>
https://github.com/sirpdboy/luci-app-netdata
Licensed to the public under the Apache License 2.0.
-%>
<%+header%>
<div class="cbi-map">
<iframe id="netdata" style="width: 100%; min-height: 780px; border: none; border-radius: .375rem;box-shadow: rgba(0, 0, 0, 0.75) 0px 0px 15px -5px;"></iframe>
</div>
<script type="text/javascript">
document.getElementById("netdata").src = window.location.protocol + "//" + window.location.hostname + ":<%=luci.model.uci.cursor():get("netdata", "netdata", "port") %>";
document.getElementById("netdata").height = document.documentElement.clientHeight;
window.onresize = function(){
document.getElementById("netdata").height = document.documentElement.clientHeight;
}
</script>
<%+footer%>

View File

@ -1,9 +0,0 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "NetData"
msgstr "实时监控"
msgid "Set the netdata access port"
msgstr "设置访问端口"

View File

@ -1,21 +0,0 @@
luci-app-netdata for OpenWRT/Lede
Install to OpenWRT/LEDE
git clone https://github.com/sirpdboy/luci-app-netdata
cp -r luci-app-netdata LEDE_DIR/package/luci-app-netdata
cd LEDE_DIR
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
LuCI --->
1. Collections --->
<*> luci
3. Applications --->
<*> luci-app-netdata.........................LuCI support for Netdata
make package/luci-app-netdata/compile V=s

View File

@ -1,6 +0,0 @@
config netdata 'netdata'
option logger '1'
option enabled '1'
option port '19990'

View File

@ -1,9 +0,0 @@
#!/bin/sh
[ -f /usr/share/netdata/webcn/netdata.conf ] && mv -f /usr/share/netdata/webcn/netdata.conf /etc/netdata/netdata.conf
[ -f /usr/share/netdata/webcn/dashboard.js ] && mv -f /usr/share/netdata/webcn/dashboard.js /usr/share/netdata/web/dashboard.js
[ -f /usr/share/netdata/webcn/dashboard_info.js ] && mv -f /usr/share/netdata/webcn/dashboard_info.js /usr/share/netdata/web/dashboard_info.js
[ -f /usr/share/netdata/webcn/main.js ] && mv -f /usr/share/netdata/webcn/main.js /usr/share/netdata/web/main.js
[ -f /usr/share/netdata/webcn/index.html ] && mv -f /usr/share/netdata/webcn/index.html /usr/share/netdata/web/index.html
[ -f /usr/share/netdata/webcn/netdata ] && mv -f /usr/share/netdata/webcn/index.html /etc/init.d/netdata
rm -rf /tmp/luci-modulecache /tmp/luci-indexcache*
exit 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,49 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
APPBINARY=/usr/sbin/netdata
CONFIGFILE=/etc/netdata/netdata.conf
get_config() {
config_get_bool enabled $1 enabled 1
config_get_bool logger $1 logger 1
config_get port $1 port 19999
}
netdata_prepare() {
pgrep -f /usr/sbin/netdata | xargs kill -9 >/dev/null 2>&1
logger -t netdata -p warn "netdata is stop."
echo "netdata is stop."
}
stop_service() {
netdata_prepare
}
start_service() {
netdata_prepare
config_load netdata
config_foreach get_config netdata
[ x$enabled == x1 ] || return 1
mkdir -m 0755 -p /var/cache/netdata
logger -t netdata -p warn "netdata is start."
echo "netdata is start."
chown nobody /var/cache/netdata
mkdir -m 0755 -p /var/lib/netdata
chown nobody /var/lib/netdata
mkdir -m 0755 -p /var/log/netdata
chown nobody /var/log/netdata
procd_open_instance
procd_set_param command $APPBINARY -D -c $CONFIGFILE -p $port:$port
[ "x$logger" == x1 ] && procd_set_param stderr 1
procd_set_param file $CONFIGFILE
procd_set_param respawn
procd_close_instance
}
service_triggers() {
procd_add_reload_trigger "netdata"
}

View File

@ -1,52 +0,0 @@
# Full configuration can be retrieved from the running
# server at http://localhost:19999/netdata.conf
#
# Example:
# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
#
[global]
update every = 2
memory deduplication (ksm) = no
debug log = syslog
error log = syslog
access log = none
run as user = root
[web]
allow connections from = *
allow dashboard from = *
[plugins]
cgroups = no
apps = no
charts.d = no
fping = no
node.d = no
python.d = no
[plugin:proc]
ipc =no
/proc/sysvipc/shm = no
/sys/devices/system/edac/mc = no
/sys/devices/system/node = no
/proc/net/sockstat = no
/proc/net/netstat = no
/proc/net/snmp = no
/proc/net/softnet_stat = no
/proc/net/sctp/snmp = no
/proc/net/ip_vs/stats = no
/proc/net/stat/synproxy = no
/sys/kernel/mm/ksm = no
/dev/mapper = no
semaphore totals = no
[plugin:proc:/proc/diskstats]
path to /dev/vx/dsk =
path to /dev/disk/by-label =</font>
[health]
enabled = no
[plugin:proc:ipc]
shared memory totals = no

View File

@ -1,11 +0,0 @@
{
"luci-app-nedata": {
"description": "Grant UCI access for luci-app-netdata",
"read": {
"uci": [ "netdata" ]
},
"write": {
"uci": [ "netdata" ]
}
}
}