add netdata
This commit is contained in:
parent
80435e289f
commit
5c493cb697
22
applications/luci-app-netdata/Makefile
Executable file
22
applications/luci-app-netdata/Makefile
Executable file
@ -0,0 +1,22 @@
|
||||
# Copyright (C) 2016 Openwrt.org
|
||||
# Copyright (C) 2020-2021 sirpdboy <herboy2008@gmail.com>
|
||||
# https://github.com/sirpdboy/luci-app-netdata for v 1.30.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_VERSION:=1.0
|
||||
PKG_RELEASE:=20210610
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
30
applications/luci-app-netdata/README.md
Executable file
30
applications/luci-app-netdata/README.md
Executable file
@ -0,0 +1,30 @@
|
||||
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/new/luci-app-netdata/compile V=s
|
||||
|
12
applications/luci-app-netdata/luasrc/controller/netdata.lua
Executable file
12
applications/luci-app-netdata/luasrc/controller/netdata.lua
Executable file
@ -0,0 +1,12 @@
|
||||
module("luci.controller.netdata", package.seeall)
|
||||
|
||||
function index()
|
||||
if not (luci.sys.call("pidof netdata > /dev/null") == 0) then
|
||||
return
|
||||
end
|
||||
local fs = require "nixio.fs"
|
||||
|
||||
entry({"admin","status","netdata"},template("netdata"),_("NetData"),10).leaf=true
|
||||
|
||||
|
||||
end
|
25
applications/luci-app-netdata/luasrc/model/cgi/netdate.lua
Executable file
25
applications/luci-app-netdata/luasrc/model/cgi/netdate.lua
Executable file
@ -0,0 +1,25 @@
|
||||
-- Copyright 2018 Nick Peng (pymumu@gmail.com)
|
||||
|
||||
function index()
|
||||
|
||||
|
||||
o = Map("netdate", "<font color='green'>" .. translate("实时监控") .."</font>", "<font color='purple'>" .. translate( "强大的实时监控数据,需要中文版请点击:【升级中文版】") .."</font>")
|
||||
|
||||
t = o:section(TypedSection, "netdate")
|
||||
t.anonymous = true
|
||||
t.description = translate(string.format("%s<br /><br />", status))
|
||||
|
||||
t:tab("base",translate("Basic Settings"))
|
||||
|
||||
e = t:taboption("base", Button, "restart", translate("手动更新"))
|
||||
e.inputtitle = translate("升级中文版")
|
||||
e.inputstyle = "reload"
|
||||
e.write = function()
|
||||
luci.sys.call("/usr/share/netdata/netdatacn 2>&1 >/dev/null")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin","status","netdata"))
|
||||
end
|
||||
|
||||
t=o:section(TypedSection,"rss_rules",translate("技术支持"))
|
||||
t.anonymous = true
|
||||
t:append(Template("feedback"))
|
||||
return o
|
22
applications/luci-app-netdata/luasrc/view/netdata.htm
Executable file
22
applications/luci-app-netdata/luasrc/view/netdata.htm
Executable file
@ -0,0 +1,22 @@
|
||||
<%#
|
||||
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">
|
||||
<h2 name="content"><%=translate("NetData")%></h2>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function upnetdata(button) {
|
||||
|
||||
(new XHR()).post('<%=controller%>/admin/status/netdata/call', { token: '<%=token%>' }, check);
|
||||
}
|
||||
//]]></script>
|
||||
|
||||
<iframe id="netdata" style="width: 100%; min-height: 1200px; border: none; border-radius: 3px;"></iframe>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
document.getElementById("netdata").src = window.location.protocol + "//" + window.location.hostname + ":19999";
|
||||
</script>
|
||||
<%+footer%>
|
5
applications/luci-app-netdata/po/zh-cn/netdata.po
Executable file
5
applications/luci-app-netdata/po/zh-cn/netdata.po
Executable file
@ -0,0 +1,5 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
msgid "NetData"
|
||||
msgstr "实时监控"
|
21
applications/luci-app-netdata/readme.txt
Executable file
21
applications/luci-app-netdata/readme.txt
Executable file
@ -0,0 +1,21 @@
|
||||
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
|
314
applications/luci-app-netdata/root/etc/netdata/apps_groups.conf
Executable file
314
applications/luci-app-netdata/root/etc/netdata/apps_groups.conf
Executable file
@ -0,0 +1,314 @@
|
||||
#
|
||||
# apps.plugin process grouping
|
||||
#
|
||||
# The apps.plugin displays charts with information about the processes running.
|
||||
# This config allows grouping processes together, so that several processes
|
||||
# will be reported as one.
|
||||
#
|
||||
# Only groups in this file are reported. All other processes will be reported
|
||||
# as 'other'.
|
||||
#
|
||||
# For each process given, its whole process tree will be grouped, not just
|
||||
# the process matched. The plugin will include both parents and childs.
|
||||
#
|
||||
# The format is:
|
||||
#
|
||||
# group: process1 process2 process3 ...
|
||||
#
|
||||
# Each group can be given multiple times, to add more processes to it.
|
||||
#
|
||||
# The process names are the ones returned by:
|
||||
#
|
||||
# - ps -e or /proc/PID/stat
|
||||
# - in case of substring mode (see below): /proc/PID/cmdline
|
||||
#
|
||||
# To add process names with spaces, enclose them in quotes (single or double)
|
||||
# example: 'Plex Media Serv' "my other process".
|
||||
#
|
||||
# Wildcard support:
|
||||
# You can add an asterisk (*) at the beginning and/or the end of a process:
|
||||
#
|
||||
# *name suffix mode: will search for processes ending with 'name'
|
||||
# (/proc/PID/stat)
|
||||
#
|
||||
# name* prefix mode: will search for processes beginning with 'name'
|
||||
# (/proc/PID/stat)
|
||||
#
|
||||
# *name* substring mode: will search for 'name' in the whole command line
|
||||
# (/proc/PID/cmdline)
|
||||
#
|
||||
# If you enter even just one *name* (substring), apps.plugin will process
|
||||
# /proc/PID/cmdline for all processes, just once (when they are first seen).
|
||||
#
|
||||
# To add processes with single quotes, enclose them in double quotes
|
||||
# example: "process with this ' single quote"
|
||||
#
|
||||
# To add processes with double quotes, enclose them in single quotes:
|
||||
# example: 'process with this " double quote'
|
||||
#
|
||||
# If a group or process name starts with a -, the dimension will be hidden
|
||||
# (cpu chart only).
|
||||
#
|
||||
# If a process starts with a +, debugging will be enabled for it
|
||||
# (debugging produces a lot of output - do not enable it in production systems)
|
||||
#
|
||||
# You can add any number of groups you like. Only the ones found running will
|
||||
# affect the charts generated. However, producing charts with hundreds of
|
||||
# dimensions may slow down your web browser.
|
||||
#
|
||||
# The order of the entries in this list is important: the first that matches
|
||||
# a process is used, so put important ones at the top. Processes not matched
|
||||
# by any row, will inherit it from their parents or children.
|
||||
#
|
||||
# The order also controls the order of the dimensions on the generated charts
|
||||
# (although applications started after apps.plugin is started, will be appended
|
||||
# to the existing list of dimensions the netdata daemon maintains).
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# NETDATA processes accounting
|
||||
|
||||
# netdata main process
|
||||
netdata: netdata
|
||||
|
||||
# netdata known plugins
|
||||
# plugins not defined here will be accumulated in netdata, above
|
||||
apps.plugin: apps.plugin
|
||||
freeipmi.plugin: freeipmi.plugin
|
||||
nfacct.plugin: nfacct.plugin
|
||||
cups.plugin: cups.plugin
|
||||
xenstat.plugin: xenstat.plugin
|
||||
perf.plugin: perf.plugin
|
||||
charts.d.plugin: *charts.d.plugin*
|
||||
node.d.plugin: *node.d.plugin*
|
||||
python.d.plugin: *python.d.plugin*
|
||||
tc-qos-helper: *tc-qos-helper.sh*
|
||||
fping: fping
|
||||
ioping: ioping
|
||||
go.d.plugin: *go.d.plugin*
|
||||
slabinfo.plugin: slabinfo.plugin
|
||||
ebpf.plugin: *ebpf.plugin*
|
||||
|
||||
# agent-service-discovery
|
||||
agent_sd: agent_sd
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# authentication/authorization related servers
|
||||
|
||||
auth: radius* openldap* ldap* slapd authelia
|
||||
fail2ban: fail2ban*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# web/ftp servers
|
||||
|
||||
httpd: apache* httpd nginx* lighttpd hiawatha
|
||||
proxy: squid* c-icap squidGuard varnish*
|
||||
php: php* lsphp*
|
||||
ftpd: proftpd in.tftpd vsftpd
|
||||
uwsgi: uwsgi
|
||||
unicorn: *unicorn*
|
||||
puma: *puma*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# database servers
|
||||
|
||||
sql: mysqld* mariad* postgres* postmaster* oracle_* ora_* sqlservr
|
||||
nosql: mongod redis* memcached *couchdb*
|
||||
timedb: prometheus *carbon-cache.py* *carbon-aggregator.py* *graphite/manage.py* *net.opentsdb.tools.TSDMain* influxd*
|
||||
columndb: clickhouse-server*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# email servers
|
||||
|
||||
email: dovecot imapd pop3d amavis* master zmstat* zmmailboxdmgr qmgr oqmgr saslauthd opendkim clamd freshclam tlsmgr postfwd2 postscreen postfix smtp* lmtp* sendmail
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# network, routing, VPN
|
||||
|
||||
ppp: ppp*
|
||||
vpn: openvpn pptp* cjdroute gvpe tincd
|
||||
wifi: hostapd wpa_supplicant NetworkManager
|
||||
routing: ospfd* ospf6d* bgpd bfdd fabricd isisd eigrpd sharpd staticd ripd ripngd pimd pbrd nhrpd ldpd zebra vrrpd vtysh bird*
|
||||
modem: ModemManager
|
||||
tor: tor
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# high availability and balancers
|
||||
|
||||
camo: *camo*
|
||||
balancer: ipvs_* haproxy
|
||||
ha: corosync hs_logd ha_logd stonithd pacemakerd lrmd crmd
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# telephony
|
||||
|
||||
pbx: asterisk safe_asterisk *vicidial*
|
||||
sip: opensips* stund
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# chat
|
||||
|
||||
chat: irssi *vines* *prosody* murmurd
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# monitoring
|
||||
|
||||
logs: ulogd* syslog* rsyslog* logrotate systemd-journald rotatelogs
|
||||
nms: snmpd vnstatd smokeping zabbix* monit munin* mon openhpid watchdog tailon nrpe
|
||||
splunk: splunkd
|
||||
azure: mdsd *waagent* *omiserver* *omiagent* hv_kvp_daemon hv_vss_daemon *auoms* *omsagent*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# storage, file systems and file servers
|
||||
|
||||
ceph: ceph-* ceph_* radosgw* rbd-* cephfs-* osdmaptool crushtool
|
||||
samba: smbd nmbd winbindd ctdbd ctdb-* ctdb_*
|
||||
nfs: rpcbind rpc.* nfs*
|
||||
zfs: spl_* z_* txg_* zil_* arc_* l2arc*
|
||||
btrfs: btrfs*
|
||||
iscsi: iscsid iscsi_eh
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# kubernetes
|
||||
|
||||
kubelet: kubelet
|
||||
kube-dns: kube-dns
|
||||
kube-proxy: kube-proxy
|
||||
metrics-server: metrics-server
|
||||
heapster: heapster
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# containers & virtual machines
|
||||
|
||||
containers: lxc* docker* balena*
|
||||
VMs: vbox* VBox* qemu*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ssh servers and clients
|
||||
|
||||
ssh: ssh* scp dropbear
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# print servers and clients
|
||||
|
||||
print: cups* lpd lpq
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# time servers and clients
|
||||
|
||||
time: ntp* systemd-timesyn* chronyd
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# dhcp servers and clients
|
||||
|
||||
dhcp: *dhcp*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# name servers and clients
|
||||
|
||||
dns: named unbound nsd pdns_server knotd gdnsd yadifad dnsmasq systemd-resolve*
|
||||
dnsdist: dnsdist
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# installation / compilation / debugging
|
||||
|
||||
build: cc1 cc1plus as gcc* cppcheck ld make cmake automake autoconf autoreconf
|
||||
build: git gdb valgrind*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# antivirus
|
||||
|
||||
antivirus: clam* *clam imunify360*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# torrent clients
|
||||
|
||||
torrents: *deluge* transmission* *SickBeard* *CouchPotato* *rtorrent*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# backup servers and clients
|
||||
|
||||
backup: rsync lsyncd bacula* borg rclone
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# cron
|
||||
|
||||
cron: cron* atd anacron systemd-cron*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# UPS
|
||||
|
||||
ups: upsmon upsd */nut/*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# media players, servers, clients
|
||||
|
||||
media: mplayer vlc xine mediatomb omxplayer* kodi* xbmc* mediacenter eventlircd
|
||||
media: mpd minidlnad mt-daapd avahi* Plex* jellyfin squeeze* jackett Ombi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# java applications
|
||||
|
||||
hdfsdatanode: *org.apache.hadoop.hdfs.server.datanode.DataNode*
|
||||
hdfsnamenode: *org.apache.hadoop.hdfs.server.namenode.NameNode*
|
||||
hdfsjournalnode: *org.apache.hadoop.hdfs.qjournal.server.JournalNode*
|
||||
hdfszkfc: *org.apache.hadoop.hdfs.tools.DFSZKFailoverController*
|
||||
|
||||
yarnnode: *org.apache.hadoop.yarn.server.nodemanager.NodeManager*
|
||||
yarnmgr: *org.apache.hadoop.yarn.server.resourcemanager.ResourceManager*
|
||||
yarnproxy: *org.apache.hadoop.yarn.server.webproxy.WebAppProxyServer*
|
||||
|
||||
sparkworker: *org.apache.spark.deploy.worker.Worker*
|
||||
sparkmaster: *org.apache.spark.deploy.master.Master*
|
||||
|
||||
hbaseregion: *org.apache.hadoop.hbase.regionserver.HRegionServer*
|
||||
hbaserest: *org.apache.hadoop.hbase.rest.RESTServer*
|
||||
hbasethrift: *org.apache.hadoop.hbase.thrift.ThriftServer*
|
||||
hbasemaster: *org.apache.hadoop.hbase.master.HMaster*
|
||||
|
||||
zookeeper: *org.apache.zookeeper.server.quorum.QuorumPeerMain*
|
||||
|
||||
hive2: *org.apache.hive.service.server.HiveServer2*
|
||||
hivemetastore: *org.apache.hadoop.hive.metastore.HiveMetaStore*
|
||||
|
||||
solr: *solr.install.dir*
|
||||
|
||||
airflow: *airflow*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# X
|
||||
|
||||
X: X Xorg xinit lightdm xdm pulseaudio gkrellm xfwm4 xfdesktop xfce* Thunar
|
||||
X: xfsettingsd xfconfd gnome-* gdm gconf* dconf* xfconf* *gvfs gvfs* slim
|
||||
X: kdeinit* kdm plasmashell
|
||||
X: evolution-* firefox chromium opera vivaldi-bin epiphany WebKit*
|
||||
X: '*systemd --user*' chrome *chrome-sandbox* *google-chrome* *chromium* *firefox*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Kernel / System
|
||||
|
||||
ksmd: ksmd
|
||||
|
||||
system: systemd-* udisks* udevd* *udevd connmand ipv6_addrconf dbus-* rtkit*
|
||||
system: inetd xinetd mdadm polkitd acpid uuidd packagekitd upowerd colord
|
||||
system: accounts-daemon rngd haveged
|
||||
|
||||
kernel: kthreadd kauditd lockd khelper kdevtmpfs khungtaskd rpciod
|
||||
kernel: fsnotify_mark kthrotld deferwq scsi_*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# other application servers
|
||||
|
||||
kafka: *kafka.Kafka*
|
||||
|
||||
rabbitmq: *rabbitmq*
|
||||
|
||||
sidekiq: *sidekiq*
|
||||
java: java
|
||||
ipfs: ipfs
|
||||
|
||||
node: node*
|
||||
factorio: factorio
|
||||
|
||||
p4: p4*
|
||||
|
||||
git-services: gitea gitlab-runner
|
7
applications/luci-app-netdata/root/etc/netdata/ebpf.conf
Executable file
7
applications/luci-app-netdata/root/etc/netdata/ebpf.conf
Executable file
@ -0,0 +1,7 @@
|
||||
[global]
|
||||
ebpf load mode = entry
|
||||
disable apps = no
|
||||
|
||||
[ebpf programs]
|
||||
process = yes
|
||||
network viewer = yes
|
88
applications/luci-app-netdata/root/etc/netdata/exporting.conf
Executable file
88
applications/luci-app-netdata/root/etc/netdata/exporting.conf
Executable file
@ -0,0 +1,88 @@
|
||||
[exporting:global]
|
||||
enabled = no
|
||||
# send configured labels = yes
|
||||
# send automatic labels = no
|
||||
# update every = 10
|
||||
|
||||
[prometheus:exporter]
|
||||
# send names instead of ids = yes
|
||||
# send configured labels = yes
|
||||
# send automatic labels = no
|
||||
# send charts matching = *
|
||||
# send hosts matching = localhost *
|
||||
# prefix = netdata
|
||||
|
||||
# An example configuration for graphite, json, opentsdb exporting connectors
|
||||
# [graphite:my_graphite_instance]
|
||||
# enabled = no
|
||||
# destination = localhost
|
||||
# data source = average
|
||||
# prefix = netdata
|
||||
# hostname = my_hostname
|
||||
# update every = 10
|
||||
# buffer on failures = 10
|
||||
# timeout ms = 20000
|
||||
# send names instead of ids = yes
|
||||
# send charts matching = *
|
||||
# send hosts matching = localhost *
|
||||
|
||||
# [prometheus_remote_write:my_prometheus_remote_write_instance]
|
||||
# enabled = no
|
||||
# destination = localhost
|
||||
# remote write URL path = /receive
|
||||
# data source = average
|
||||
# prefix = netdata
|
||||
# hostname = my_hostname
|
||||
# update every = 10
|
||||
# buffer on failures = 10
|
||||
# timeout ms = 20000
|
||||
# send names instead of ids = yes
|
||||
# send charts matching = *
|
||||
# send hosts matching = localhost *
|
||||
|
||||
# [kinesis:my_kinesis_instance]
|
||||
# enabled = no
|
||||
# destination = us-east-1
|
||||
# stream name = netdata
|
||||
# aws_access_key_id = my_access_key_id
|
||||
# aws_secret_access_key = my_aws_secret_access_key
|
||||
# data source = average
|
||||
# prefix = netdata
|
||||
# hostname = my_hostname
|
||||
# update every = 10
|
||||
# buffer on failures = 10
|
||||
# timeout ms = 20000
|
||||
# send names instead of ids = yes
|
||||
# send charts matching = *
|
||||
# send hosts matching = localhost *
|
||||
|
||||
# [pubsub:my_pubsub_instance]
|
||||
# enabled = no
|
||||
# destination = pubsub.googleapis.com
|
||||
# credentials file = /etc/netdata/pubsub_credentials.json
|
||||
# project id = my_project
|
||||
# topic id = my_topic
|
||||
# data source = average
|
||||
# prefix = netdata
|
||||
# hostname = my_hostname
|
||||
# update every = 10
|
||||
# buffer on failures = 10
|
||||
# timeout ms = 20000
|
||||
# send names instead of ids = yes
|
||||
# send charts matching = *
|
||||
# send hosts matching = localhost *
|
||||
|
||||
# [mongodb:my_mongodb_instance]
|
||||
# enabled = no
|
||||
# destination = localhost
|
||||
# database = my_database
|
||||
# collection = my_collection
|
||||
# data source = average
|
||||
# prefix = netdata
|
||||
# hostname = my_hostname
|
||||
# update every = 10
|
||||
# buffer on failures = 10
|
||||
# timeout ms = 20000
|
||||
# send names instead of ids = yes
|
||||
# send charts matching = *
|
||||
# send hosts matching = localhost *
|
43
applications/luci-app-netdata/root/etc/netdata/netdata.conf
Executable file
43
applications/luci-app-netdata/root/etc/netdata/netdata.conf
Executable file
@ -0,0 +1,43 @@
|
||||
|
||||
[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 = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
|
||||
allow dashboard from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
|
||||
|
||||
[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
|
||||
|
||||
[plugin:proc:/proc/diskstats]
|
||||
path to /dev/vx/dsk =
|
||||
path to /dev/disk/by-label =</font>
|
||||
|
||||
[health]
|
||||
enabled = no
|
205
applications/luci-app-netdata/root/etc/netdata/stream.conf
Executable file
205
applications/luci-app-netdata/root/etc/netdata/stream.conf
Executable file
@ -0,0 +1,205 @@
|
||||
# netdata configuration for aggregating data from remote hosts
|
||||
#
|
||||
# API keys authorize a pair of sending-receiving netdata servers.
|
||||
# Once their communication is authorized, they can exchange metrics for any
|
||||
# number of hosts.
|
||||
#
|
||||
# You can generate API keys, with the linux command: uuidgen
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 1. ON CHILD NETDATA - THE ONE THAT WILL BE SENDING METRICS
|
||||
|
||||
[stream]
|
||||
# Enable this on child nodes, to have them send metrics.
|
||||
enabled = no
|
||||
|
||||
# Where is the receiving netdata?
|
||||
# A space separated list of:
|
||||
#
|
||||
# [PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]
|
||||
#
|
||||
# If many are given, the first available will get the metrics.
|
||||
#
|
||||
# PROTOCOL = tcp, udp, or unix (only tcp and unix are supported by parent nodes)
|
||||
# HOST = an IPv4, IPv6 IP, or a hostname, or a unix domain socket path.
|
||||
# IPv6 IPs should be given with brackets [ip:address]
|
||||
# INTERFACE = the network interface to use (only for IPv6)
|
||||
# PORT = the port number or service name (/etc/services)
|
||||
# SSL = when this word appear at the end of the destination string
|
||||
# the Netdata will encrypt the connection with the parent.
|
||||
#
|
||||
# This communication is not HTTP (it cannot be proxied by web proxies).
|
||||
destination =
|
||||
|
||||
# Skip Certificate verification?
|
||||
#
|
||||
# The netdata child is configurated to avoid invalid SSL/TLS certificate,
|
||||
# so certificates that are self-signed or expired will stop the streaming.
|
||||
# Case the server certificate is not valid, you can enable the use of
|
||||
# 'bad' certificates setting the next option as 'yes'.
|
||||
#
|
||||
#ssl skip certificate verification = yes
|
||||
|
||||
# Certificate Authority Path
|
||||
#
|
||||
# OpenSSL has a default directory where the known certificates are stored,
|
||||
# case it is necessary it is possible to change this rule using the variable
|
||||
# "CApath"
|
||||
#
|
||||
#CApath = /etc/ssl/certs/
|
||||
|
||||
# Certificate Authority file
|
||||
#
|
||||
# When the Netdata parent has certificate, that is not recognized as valid,
|
||||
# we can add this certificate in the list of known certificates in CApath
|
||||
# and give for Netdata as argument.
|
||||
#
|
||||
#CAfile = /etc/ssl/certs/cert.pem
|
||||
|
||||
# The API_KEY to use (as the sender)
|
||||
api key =
|
||||
|
||||
# The timeout to connect and send metrics
|
||||
timeout seconds = 60
|
||||
|
||||
# If the destination line above does not specify a port, use this
|
||||
default port = 19999
|
||||
|
||||
# filter the charts to be streamed
|
||||
# netdata SIMPLE PATTERN:
|
||||
# - space separated list of patterns (use \ to include spaces in patterns)
|
||||
# - use * as wildcard, any number of times within each pattern
|
||||
# - prefix a pattern with ! for a negative match (ie not stream the charts it matches)
|
||||
# - the order of patterns is important (left to right)
|
||||
# To send all except a few, use: !this !that * (ie append a wildcard pattern)
|
||||
send charts matching = *
|
||||
|
||||
# The buffer to use for sending metrics.
|
||||
# 1MB is good for 10-20 seconds of data, so increase this if you expect latencies.
|
||||
# The buffer is flushed on reconnects (this will not prevent gaps at the charts).
|
||||
buffer size bytes = 1048576
|
||||
|
||||
# If the connection fails, or it disconnects,
|
||||
# retry after that many seconds.
|
||||
reconnect delay seconds = 5
|
||||
|
||||
# Sync the clock of the charts for that many iterations, when starting.
|
||||
initial clock resync iterations = 60
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 2. ON PARENT NETDATA - THE ONE THAT WILL BE RECEIVING METRICS
|
||||
|
||||
# You can have one API key per child,
|
||||
# or the same API key for all child nodes.
|
||||
#
|
||||
# netdata searches for options in this order:
|
||||
#
|
||||
# a) parent netdata settings (netdata.conf)
|
||||
# b) [stream] section (above)
|
||||
# c) [API_KEY] section (below, settings for the API key)
|
||||
# d) [MACHINE_GUID] section (below, settings for each machine)
|
||||
#
|
||||
# You can combine the above (the more specific setting will be used).
|
||||
|
||||
# API key authentication
|
||||
# If the key is not listed here, it will not be able to push metrics.
|
||||
|
||||
# [API_KEY] is [YOUR-API-KEY], i.e [11111111-2222-3333-4444-555555555555]
|
||||
[API_KEY]
|
||||
# Default settings for this API key
|
||||
|
||||
# You can disable the API key, by setting this to: no
|
||||
# The default (for unknown API keys) is: no
|
||||
enabled = no
|
||||
|
||||
# A list of simple patterns matching the IPs of the servers that
|
||||
# will be pushing metrics using this API key.
|
||||
# The metrics are received via the API port, so the same IPs
|
||||
# should also be matched at netdata.conf [web].allow connections from
|
||||
allow from = *
|
||||
|
||||
# The default history in entries, for all hosts using this API key.
|
||||
# You can also set it per host below.
|
||||
# If you don't set it here, the history size of the central netdata
|
||||
# will be used.
|
||||
default history = 3600
|
||||
|
||||
# The default memory mode to be used for all hosts using this API key.
|
||||
# You can also set it per host below.
|
||||
# If you don't set it here, the memory mode of netdata.conf will be used.
|
||||
# Valid modes:
|
||||
# save save on exit, load on start
|
||||
# map like swap (continuously syncing to disks - you need SSD)
|
||||
# ram keep it in RAM, don't touch the disk
|
||||
# none no database at all (use this on headless proxies)
|
||||
# dbengine like a traditional database
|
||||
default memory mode = ram
|
||||
|
||||
# Shall we enable health monitoring for the hosts using this API key?
|
||||
# 3 possible values:
|
||||
# yes enable alarms
|
||||
# no do not enable alarms
|
||||
# auto enable alarms, only when the sending netdata is connected. For ephemeral child nodes or child system restarts,
|
||||
# ensure that the netdata process on the child is gracefully stopped, to prevent invalid last_collected alarms
|
||||
# You can also set it per host, below.
|
||||
# The default is taken from [health].enabled of netdata.conf
|
||||
health enabled by default = auto
|
||||
|
||||
# postpone alarms for a short period after the sender is connected
|
||||
default postpone alarms on connect seconds = 60
|
||||
|
||||
# need to route metrics differently? set these.
|
||||
# the defaults are the ones at the [stream] section (above)
|
||||
#default proxy enabled = yes | no
|
||||
#default proxy destination = IP:PORT IP:PORT ...
|
||||
#default proxy api key = API_KEY
|
||||
#default proxy send charts matching = *
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 3. PER SENDING HOST SETTINGS, ON PARENT NETDATA
|
||||
# THIS IS OPTIONAL - YOU DON'T HAVE TO CONFIGURE IT
|
||||
|
||||
# This section exists to give you finer control of the parent settings for each
|
||||
# child host, when the same API key is used by many netdata child nodes / proxies.
|
||||
#
|
||||
# Each netdata has a unique GUID - generated the first time netdata starts.
|
||||
# You can find it at /var/lib/netdata/registry/netdata.public.unique.id
|
||||
# (at the child).
|
||||
#
|
||||
# The host sending data will have one. If the host is not ephemeral,
|
||||
# you can give settings for each sending host here.
|
||||
|
||||
[MACHINE_GUID]
|
||||
# enable this host: yes | no
|
||||
# When disabled, the parent will not receive metrics for this host.
|
||||
# THIS IS NOT A SECURITY MECHANISM - AN ATTACKER CAN SET ANY OTHER GUID.
|
||||
# Use only the API key for security.
|
||||
enabled = no
|
||||
|
||||
# A list of simple patterns matching the IPs of the servers that
|
||||
# will be pushing metrics using this MACHINE GUID.
|
||||
# The metrics are received via the API port, so the same IPs
|
||||
# should also be matched at netdata.conf [web].allow connections from
|
||||
# and at stream.conf [API_KEY].allow from
|
||||
allow from = *
|
||||
|
||||
# The number of entries in the database
|
||||
history = 3600
|
||||
|
||||
# The memory mode of the database: save | map | ram | none | dbengine
|
||||
memory mode = save
|
||||
|
||||
# Health / alarms control: yes | no | auto
|
||||
health enabled = yes
|
||||
|
||||
# postpone alarms when the sender connects
|
||||
postpone alarms on connect seconds = 60
|
||||
|
||||
# need to route metrics differently?
|
||||
# the defaults are the ones at the [API KEY] section
|
||||
#proxy enabled = yes | no
|
||||
#proxy destination = IP:PORT IP:PORT ...
|
||||
#proxy api key = API_KEY
|
||||
#proxy send charts matching = *
|
8
applications/luci-app-netdata/root/etc/uci-defaults/40_luci-app-netdata
Executable file
8
applications/luci-app-netdata/root/etc/uci-defaults/40_luci-app-netdata
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
[ -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/dashboard.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
|
||||
|
||||
rm -rf /tmp/luci-modulecache /tmp/luci-indexcache*
|
||||
exit 0
|
10378
applications/luci-app-netdata/root/usr/share/netdata/webcn/dashboard.js
Executable file
10378
applications/luci-app-netdata/root/usr/share/netdata/webcn/dashboard.js
Executable file
File diff suppressed because it is too large
Load Diff
3844
applications/luci-app-netdata/root/usr/share/netdata/webcn/dashboard_info.js
Executable file
3844
applications/luci-app-netdata/root/usr/share/netdata/webcn/dashboard_info.js
Executable file
File diff suppressed because it is too large
Load Diff
1339
applications/luci-app-netdata/root/usr/share/netdata/webcn/index.html
Executable file
1339
applications/luci-app-netdata/root/usr/share/netdata/webcn/index.html
Executable file
File diff suppressed because it is too large
Load Diff
5149
applications/luci-app-netdata/root/usr/share/netdata/webcn/main.js
Executable file
5149
applications/luci-app-netdata/root/usr/share/netdata/webcn/main.js
Executable file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
{
|
||||
"luci-app-nedata": {
|
||||
"description": "Grant UCI access for luci-app-netdata",
|
||||
"read": {
|
||||
"uci": [ "netdata" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "netdata" ]
|
||||
}
|
||||
}
|
||||
}
|
10378
applications/luci-app-netdata/web/dashboard.js
Executable file
10378
applications/luci-app-netdata/web/dashboard.js
Executable file
File diff suppressed because it is too large
Load Diff
3844
applications/luci-app-netdata/web/dashboard_info.js
Executable file
3844
applications/luci-app-netdata/web/dashboard_info.js
Executable file
File diff suppressed because it is too large
Load Diff
1339
applications/luci-app-netdata/web/index.html
Executable file
1339
applications/luci-app-netdata/web/index.html
Executable file
File diff suppressed because it is too large
Load Diff
5149
applications/luci-app-netdata/web/main.js
Executable file
5149
applications/luci-app-netdata/web/main.js
Executable file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user