├── 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 |
3 |

<%=translate("NetData")%>

4 | 10 | 11 | 12 |
13 | 16 | <%+footer%> 17 | -------------------------------------------------------------------------------- /po/zh-cn/netdata.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "NetData" 5 | msgstr "实时监控" 6 | -------------------------------------------------------------------------------- /root/etc/netdata/apps_groups.conf: -------------------------------------------------------------------------------- 1 | # 2 | # apps.plugin process grouping 3 | # 4 | # The apps.plugin displays charts with information about the processes running. 5 | # This config allows grouping processes together, so that several processes 6 | # will be reported as one. 7 | # 8 | # Only groups in this file are reported. All other processes will be reported 9 | # as 'other'. 10 | # 11 | # For each process given, its whole process tree will be grouped, not just 12 | # the process matched. The plugin will include both parents and childs. 13 | # 14 | # The format is: 15 | # 16 | # group: process1 process2 process3 ... 17 | # 18 | # Each group can be given multiple times, to add more processes to it. 19 | # 20 | # The process names are the ones returned by: 21 | # 22 | # - ps -e or /proc/PID/stat 23 | # - in case of substring mode (see below): /proc/PID/cmdline 24 | # 25 | # To add process names with spaces, enclose them in quotes (single or double) 26 | # example: 'Plex Media Serv' "my other process". 27 | # 28 | # Wildcard support: 29 | # You can add an asterisk (*) at the beginning and/or the end of a process: 30 | # 31 | # *name suffix mode: will search for processes ending with 'name' 32 | # (/proc/PID/stat) 33 | # 34 | # name* prefix mode: will search for processes beginning with 'name' 35 | # (/proc/PID/stat) 36 | # 37 | # *name* substring mode: will search for 'name' in the whole command line 38 | # (/proc/PID/cmdline) 39 | # 40 | # If you enter even just one *name* (substring), apps.plugin will process 41 | # /proc/PID/cmdline for all processes, just once (when they are first seen). 42 | # 43 | # To add processes with single quotes, enclose them in double quotes 44 | # example: "process with this ' single quote" 45 | # 46 | # To add processes with double quotes, enclose them in single quotes: 47 | # example: 'process with this " double quote' 48 | # 49 | # If a group or process name starts with a -, the dimension will be hidden 50 | # (cpu chart only). 51 | # 52 | # If a process starts with a +, debugging will be enabled for it 53 | # (debugging produces a lot of output - do not enable it in production systems) 54 | # 55 | # You can add any number of groups you like. Only the ones found running will 56 | # affect the charts generated. However, producing charts with hundreds of 57 | # dimensions may slow down your web browser. 58 | # 59 | # The order of the entries in this list is important: the first that matches 60 | # a process is used, so put important ones at the top. Processes not matched 61 | # by any row, will inherit it from their parents or children. 62 | # 63 | # The order also controls the order of the dimensions on the generated charts 64 | # (although applications started after apps.plugin is started, will be appended 65 | # to the existing list of dimensions the netdata daemon maintains). 66 | 67 | # ----------------------------------------------------------------------------- 68 | # NETDATA processes accounting 69 | 70 | # netdata main process 71 | netdata: netdata 72 | 73 | # netdata known plugins 74 | # plugins not defined here will be accumulated in netdata, above 75 | apps.plugin: apps.plugin 76 | freeipmi.plugin: freeipmi.plugin 77 | nfacct.plugin: nfacct.plugin 78 | cups.plugin: cups.plugin 79 | xenstat.plugin: xenstat.plugin 80 | perf.plugin: perf.plugin 81 | charts.d.plugin: *charts.d.plugin* 82 | node.d.plugin: *node.d.plugin* 83 | python.d.plugin: *python.d.plugin* 84 | tc-qos-helper: *tc-qos-helper.sh* 85 | fping: fping 86 | ioping: ioping 87 | go.d.plugin: *go.d.plugin* 88 | slabinfo.plugin: slabinfo.plugin 89 | ebpf.plugin: *ebpf.plugin* 90 | 91 | # agent-service-discovery 92 | agent_sd: agent_sd 93 | 94 | # ----------------------------------------------------------------------------- 95 | # authentication/authorization related servers 96 | 97 | auth: radius* openldap* ldap* slapd authelia 98 | fail2ban: fail2ban* 99 | 100 | # ----------------------------------------------------------------------------- 101 | # web/ftp servers 102 | 103 | httpd: apache* httpd nginx* lighttpd hiawatha 104 | proxy: squid* c-icap squidGuard varnish* 105 | php: php* lsphp* 106 | ftpd: proftpd in.tftpd vsftpd 107 | uwsgi: uwsgi 108 | unicorn: *unicorn* 109 | puma: *puma* 110 | 111 | # ----------------------------------------------------------------------------- 112 | # database servers 113 | 114 | sql: mysqld* mariad* postgres* postmaster* oracle_* ora_* sqlservr 115 | nosql: mongod redis* memcached *couchdb* 116 | timedb: prometheus *carbon-cache.py* *carbon-aggregator.py* *graphite/manage.py* *net.opentsdb.tools.TSDMain* influxd* 117 | columndb: clickhouse-server* 118 | 119 | # ----------------------------------------------------------------------------- 120 | # email servers 121 | 122 | email: dovecot imapd pop3d amavis* master zmstat* zmmailboxdmgr qmgr oqmgr saslauthd opendkim clamd freshclam tlsmgr postfwd2 postscreen postfix smtp* lmtp* sendmail 123 | 124 | # ----------------------------------------------------------------------------- 125 | # network, routing, VPN 126 | 127 | ppp: ppp* 128 | vpn: openvpn pptp* cjdroute gvpe tincd 129 | wifi: hostapd wpa_supplicant NetworkManager 130 | routing: ospfd* ospf6d* bgpd bfdd fabricd isisd eigrpd sharpd staticd ripd ripngd pimd pbrd nhrpd ldpd zebra vrrpd vtysh bird* 131 | modem: ModemManager 132 | tor: tor 133 | 134 | # ----------------------------------------------------------------------------- 135 | # high availability and balancers 136 | 137 | camo: *camo* 138 | balancer: ipvs_* haproxy 139 | ha: corosync hs_logd ha_logd stonithd pacemakerd lrmd crmd 140 | 141 | # ----------------------------------------------------------------------------- 142 | # telephony 143 | 144 | pbx: asterisk safe_asterisk *vicidial* 145 | sip: opensips* stund 146 | 147 | # ----------------------------------------------------------------------------- 148 | # chat 149 | 150 | chat: irssi *vines* *prosody* murmurd 151 | 152 | # ----------------------------------------------------------------------------- 153 | # monitoring 154 | 155 | logs: ulogd* syslog* rsyslog* logrotate systemd-journald rotatelogs 156 | nms: snmpd vnstatd smokeping zabbix* monit munin* mon openhpid watchdog tailon nrpe 157 | splunk: splunkd 158 | azure: mdsd *waagent* *omiserver* *omiagent* hv_kvp_daemon hv_vss_daemon *auoms* *omsagent* 159 | 160 | # ----------------------------------------------------------------------------- 161 | # storage, file systems and file servers 162 | 163 | ceph: ceph-* ceph_* radosgw* rbd-* cephfs-* osdmaptool crushtool 164 | samba: smbd nmbd winbindd ctdbd ctdb-* ctdb_* 165 | nfs: rpcbind rpc.* nfs* 166 | zfs: spl_* z_* txg_* zil_* arc_* l2arc* 167 | btrfs: btrfs* 168 | iscsi: iscsid iscsi_eh 169 | 170 | # ----------------------------------------------------------------------------- 171 | # kubernetes 172 | 173 | kubelet: kubelet 174 | kube-dns: kube-dns 175 | kube-proxy: kube-proxy 176 | metrics-server: metrics-server 177 | heapster: heapster 178 | 179 | # ----------------------------------------------------------------------------- 180 | # containers & virtual machines 181 | 182 | containers: lxc* docker* balena* 183 | VMs: vbox* VBox* qemu* 184 | 185 | # ----------------------------------------------------------------------------- 186 | # ssh servers and clients 187 | 188 | ssh: ssh* scp dropbear 189 | 190 | # ----------------------------------------------------------------------------- 191 | # print servers and clients 192 | 193 | print: cups* lpd lpq 194 | 195 | # ----------------------------------------------------------------------------- 196 | # time servers and clients 197 | 198 | time: ntp* systemd-timesyn* chronyd 199 | 200 | # ----------------------------------------------------------------------------- 201 | # dhcp servers and clients 202 | 203 | dhcp: *dhcp* 204 | 205 | # ----------------------------------------------------------------------------- 206 | # name servers and clients 207 | 208 | dns: named unbound nsd pdns_server knotd gdnsd yadifad dnsmasq systemd-resolve* 209 | dnsdist: dnsdist 210 | 211 | # ----------------------------------------------------------------------------- 212 | # installation / compilation / debugging 213 | 214 | build: cc1 cc1plus as gcc* cppcheck ld make cmake automake autoconf autoreconf 215 | build: git gdb valgrind* 216 | 217 | # ----------------------------------------------------------------------------- 218 | # antivirus 219 | 220 | antivirus: clam* *clam imunify360* 221 | 222 | # ----------------------------------------------------------------------------- 223 | # torrent clients 224 | 225 | torrents: *deluge* transmission* *SickBeard* *CouchPotato* *rtorrent* 226 | 227 | # ----------------------------------------------------------------------------- 228 | # backup servers and clients 229 | 230 | backup: rsync lsyncd bacula* borg rclone 231 | 232 | # ----------------------------------------------------------------------------- 233 | # cron 234 | 235 | cron: cron* atd anacron systemd-cron* 236 | 237 | # ----------------------------------------------------------------------------- 238 | # UPS 239 | 240 | ups: upsmon upsd */nut/* 241 | 242 | # ----------------------------------------------------------------------------- 243 | # media players, servers, clients 244 | 245 | media: mplayer vlc xine mediatomb omxplayer* kodi* xbmc* mediacenter eventlircd 246 | media: mpd minidlnad mt-daapd avahi* Plex* jellyfin squeeze* jackett Ombi 247 | 248 | # ----------------------------------------------------------------------------- 249 | # java applications 250 | 251 | hdfsdatanode: *org.apache.hadoop.hdfs.server.datanode.DataNode* 252 | hdfsnamenode: *org.apache.hadoop.hdfs.server.namenode.NameNode* 253 | hdfsjournalnode: *org.apache.hadoop.hdfs.qjournal.server.JournalNode* 254 | hdfszkfc: *org.apache.hadoop.hdfs.tools.DFSZKFailoverController* 255 | 256 | yarnnode: *org.apache.hadoop.yarn.server.nodemanager.NodeManager* 257 | yarnmgr: *org.apache.hadoop.yarn.server.resourcemanager.ResourceManager* 258 | yarnproxy: *org.apache.hadoop.yarn.server.webproxy.WebAppProxyServer* 259 | 260 | sparkworker: *org.apache.spark.deploy.worker.Worker* 261 | sparkmaster: *org.apache.spark.deploy.master.Master* 262 | 263 | hbaseregion: *org.apache.hadoop.hbase.regionserver.HRegionServer* 264 | hbaserest: *org.apache.hadoop.hbase.rest.RESTServer* 265 | hbasethrift: *org.apache.hadoop.hbase.thrift.ThriftServer* 266 | hbasemaster: *org.apache.hadoop.hbase.master.HMaster* 267 | 268 | zookeeper: *org.apache.zookeeper.server.quorum.QuorumPeerMain* 269 | 270 | hive2: *org.apache.hive.service.server.HiveServer2* 271 | hivemetastore: *org.apache.hadoop.hive.metastore.HiveMetaStore* 272 | 273 | solr: *solr.install.dir* 274 | 275 | airflow: *airflow* 276 | 277 | # ----------------------------------------------------------------------------- 278 | # X 279 | 280 | X: X Xorg xinit lightdm xdm pulseaudio gkrellm xfwm4 xfdesktop xfce* Thunar 281 | X: xfsettingsd xfconfd gnome-* gdm gconf* dconf* xfconf* *gvfs gvfs* slim 282 | X: kdeinit* kdm plasmashell 283 | X: evolution-* firefox chromium opera vivaldi-bin epiphany WebKit* 284 | X: '*systemd --user*' chrome *chrome-sandbox* *google-chrome* *chromium* *firefox* 285 | 286 | # ----------------------------------------------------------------------------- 287 | # Kernel / System 288 | 289 | ksmd: ksmd 290 | 291 | system: systemd-* udisks* udevd* *udevd connmand ipv6_addrconf dbus-* rtkit* 292 | system: inetd xinetd mdadm polkitd acpid uuidd packagekitd upowerd colord 293 | system: accounts-daemon rngd haveged 294 | 295 | kernel: kthreadd kauditd lockd khelper kdevtmpfs khungtaskd rpciod 296 | kernel: fsnotify_mark kthrotld deferwq scsi_* 297 | 298 | # ----------------------------------------------------------------------------- 299 | # other application servers 300 | 301 | kafka: *kafka.Kafka* 302 | 303 | rabbitmq: *rabbitmq* 304 | 305 | sidekiq: *sidekiq* 306 | java: java 307 | ipfs: ipfs 308 | 309 | node: node* 310 | factorio: factorio 311 | 312 | p4: p4* 313 | 314 | git-services: gitea gitlab-runner 315 | -------------------------------------------------------------------------------- /root/etc/netdata/ebpf.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | ebpf load mode = entry 3 | disable apps = no 4 | 5 | [ebpf programs] 6 | process = yes 7 | network viewer = yes 8 | -------------------------------------------------------------------------------- /root/etc/netdata/exporting.conf: -------------------------------------------------------------------------------- 1 | [exporting:global] 2 | enabled = no 3 | # send configured labels = yes 4 | # send automatic labels = no 5 | # update every = 10 6 | 7 | [prometheus:exporter] 8 | # send names instead of ids = yes 9 | # send configured labels = yes 10 | # send automatic labels = no 11 | # send charts matching = * 12 | # send hosts matching = localhost * 13 | # prefix = netdata 14 | 15 | # An example configuration for graphite, json, opentsdb exporting connectors 16 | # [graphite:my_graphite_instance] 17 | # enabled = no 18 | # destination = localhost 19 | # data source = average 20 | # prefix = netdata 21 | # hostname = my_hostname 22 | # update every = 10 23 | # buffer on failures = 10 24 | # timeout ms = 20000 25 | # send names instead of ids = yes 26 | # send charts matching = * 27 | # send hosts matching = localhost * 28 | 29 | # [prometheus_remote_write:my_prometheus_remote_write_instance] 30 | # enabled = no 31 | # destination = localhost 32 | # remote write URL path = /receive 33 | # data source = average 34 | # prefix = netdata 35 | # hostname = my_hostname 36 | # update every = 10 37 | # buffer on failures = 10 38 | # timeout ms = 20000 39 | # send names instead of ids = yes 40 | # send charts matching = * 41 | # send hosts matching = localhost * 42 | 43 | # [kinesis:my_kinesis_instance] 44 | # enabled = no 45 | # destination = us-east-1 46 | # stream name = netdata 47 | # aws_access_key_id = my_access_key_id 48 | # aws_secret_access_key = my_aws_secret_access_key 49 | # data source = average 50 | # prefix = netdata 51 | # hostname = my_hostname 52 | # update every = 10 53 | # buffer on failures = 10 54 | # timeout ms = 20000 55 | # send names instead of ids = yes 56 | # send charts matching = * 57 | # send hosts matching = localhost * 58 | 59 | # [pubsub:my_pubsub_instance] 60 | # enabled = no 61 | # destination = pubsub.googleapis.com 62 | # credentials file = /etc/netdata/pubsub_credentials.json 63 | # project id = my_project 64 | # topic id = my_topic 65 | # data source = average 66 | # prefix = netdata 67 | # hostname = my_hostname 68 | # update every = 10 69 | # buffer on failures = 10 70 | # timeout ms = 20000 71 | # send names instead of ids = yes 72 | # send charts matching = * 73 | # send hosts matching = localhost * 74 | 75 | # [mongodb:my_mongodb_instance] 76 | # enabled = no 77 | # destination = localhost 78 | # database = my_database 79 | # collection = my_collection 80 | # data source = average 81 | # prefix = netdata 82 | # hostname = my_hostname 83 | # update every = 10 84 | # buffer on failures = 10 85 | # timeout ms = 20000 86 | # send names instead of ids = yes 87 | # send charts matching = * 88 | # send hosts matching = localhost * 89 | -------------------------------------------------------------------------------- /root/etc/netdata/netdata.conf: -------------------------------------------------------------------------------- 1 | # Full configuration can be retrieved from the running 2 | # server at http://localhost:19999/netdata.conf 3 | # 4 | # Example: 5 | # curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf 6 | # 7 | 8 | [global] 9 | update every = 2 10 | memory deduplication (ksm) = no 11 | debug log = syslog 12 | error log = syslog 13 | access log = none 14 | run as user = root 15 | 16 | [web] 17 | 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.* 18 | 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.* 19 | 20 | [plugins] 21 | cgroups = no 22 | apps = no 23 | charts.d = no 24 | fping = no 25 | node.d = no 26 | python.d = no 27 | 28 | [health] 29 | enabled = no 30 | 31 | [plugin:proc:ipc] 32 | shared memory totals = no 33 | -------------------------------------------------------------------------------- /root/etc/netdata/stream.conf: -------------------------------------------------------------------------------- 1 | # netdata configuration for aggregating data from remote hosts 2 | # 3 | # API keys authorize a pair of sending-receiving netdata servers. 4 | # Once their communication is authorized, they can exchange metrics for any 5 | # number of hosts. 6 | # 7 | # You can generate API keys, with the linux command: uuidgen 8 | 9 | 10 | # ----------------------------------------------------------------------------- 11 | # 1. ON CHILD NETDATA - THE ONE THAT WILL BE SENDING METRICS 12 | 13 | [stream] 14 | # Enable this on child nodes, to have them send metrics. 15 | enabled = no 16 | 17 | # Where is the receiving netdata? 18 | # A space separated list of: 19 | # 20 | # [PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL] 21 | # 22 | # If many are given, the first available will get the metrics. 23 | # 24 | # PROTOCOL = tcp, udp, or unix (only tcp and unix are supported by parent nodes) 25 | # HOST = an IPv4, IPv6 IP, or a hostname, or a unix domain socket path. 26 | # IPv6 IPs should be given with brackets [ip:address] 27 | # INTERFACE = the network interface to use (only for IPv6) 28 | # PORT = the port number or service name (/etc/services) 29 | # SSL = when this word appear at the end of the destination string 30 | # the Netdata will encrypt the connection with the parent. 31 | # 32 | # This communication is not HTTP (it cannot be proxied by web proxies). 33 | destination = 34 | 35 | # Skip Certificate verification? 36 | # 37 | # The netdata child is configurated to avoid invalid SSL/TLS certificate, 38 | # so certificates that are self-signed or expired will stop the streaming. 39 | # Case the server certificate is not valid, you can enable the use of 40 | # 'bad' certificates setting the next option as 'yes'. 41 | # 42 | #ssl skip certificate verification = yes 43 | 44 | # Certificate Authority Path 45 | # 46 | # OpenSSL has a default directory where the known certificates are stored, 47 | # case it is necessary it is possible to change this rule using the variable 48 | # "CApath" 49 | # 50 | #CApath = /etc/ssl/certs/ 51 | 52 | # Certificate Authority file 53 | # 54 | # When the Netdata parent has certificate, that is not recognized as valid, 55 | # we can add this certificate in the list of known certificates in CApath 56 | # and give for Netdata as argument. 57 | # 58 | #CAfile = /etc/ssl/certs/cert.pem 59 | 60 | # The API_KEY to use (as the sender) 61 | api key = 62 | 63 | # The timeout to connect and send metrics 64 | timeout seconds = 60 65 | 66 | # If the destination line above does not specify a port, use this 67 | default port = 19999 68 | 69 | # filter the charts to be streamed 70 | # netdata SIMPLE PATTERN: 71 | # - space separated list of patterns (use \ to include spaces in patterns) 72 | # - use * as wildcard, any number of times within each pattern 73 | # - prefix a pattern with ! for a negative match (ie not stream the charts it matches) 74 | # - the order of patterns is important (left to right) 75 | # To send all except a few, use: !this !that * (ie append a wildcard pattern) 76 | send charts matching = * 77 | 78 | # The buffer to use for sending metrics. 79 | # 1MB is good for 10-20 seconds of data, so increase this if you expect latencies. 80 | # The buffer is flushed on reconnects (this will not prevent gaps at the charts). 81 | buffer size bytes = 1048576 82 | 83 | # If the connection fails, or it disconnects, 84 | # retry after that many seconds. 85 | reconnect delay seconds = 5 86 | 87 | # Sync the clock of the charts for that many iterations, when starting. 88 | initial clock resync iterations = 60 89 | 90 | # ----------------------------------------------------------------------------- 91 | # 2. ON PARENT NETDATA - THE ONE THAT WILL BE RECEIVING METRICS 92 | 93 | # You can have one API key per child, 94 | # or the same API key for all child nodes. 95 | # 96 | # netdata searches for options in this order: 97 | # 98 | # a) parent netdata settings (netdata.conf) 99 | # b) [stream] section (above) 100 | # c) [API_KEY] section (below, settings for the API key) 101 | # d) [MACHINE_GUID] section (below, settings for each machine) 102 | # 103 | # You can combine the above (the more specific setting will be used). 104 | 105 | # API key authentication 106 | # If the key is not listed here, it will not be able to push metrics. 107 | 108 | # [API_KEY] is [YOUR-API-KEY], i.e [11111111-2222-3333-4444-555555555555] 109 | [API_KEY] 110 | # Default settings for this API key 111 | 112 | # You can disable the API key, by setting this to: no 113 | # The default (for unknown API keys) is: no 114 | enabled = no 115 | 116 | # A list of simple patterns matching the IPs of the servers that 117 | # will be pushing metrics using this API key. 118 | # The metrics are received via the API port, so the same IPs 119 | # should also be matched at netdata.conf [web].allow connections from 120 | allow from = * 121 | 122 | # The default history in entries, for all hosts using this API key. 123 | # You can also set it per host below. 124 | # If you don't set it here, the history size of the central netdata 125 | # will be used. 126 | default history = 3600 127 | 128 | # The default memory mode to be used for all hosts using this API key. 129 | # You can also set it per host below. 130 | # If you don't set it here, the memory mode of netdata.conf will be used. 131 | # Valid modes: 132 | # save save on exit, load on start 133 | # map like swap (continuously syncing to disks - you need SSD) 134 | # ram keep it in RAM, don't touch the disk 135 | # none no database at all (use this on headless proxies) 136 | # dbengine like a traditional database 137 | default memory mode = ram 138 | 139 | # Shall we enable health monitoring for the hosts using this API key? 140 | # 3 possible values: 141 | # yes enable alarms 142 | # no do not enable alarms 143 | # auto enable alarms, only when the sending netdata is connected. For ephemeral child nodes or child system restarts, 144 | # ensure that the netdata process on the child is gracefully stopped, to prevent invalid last_collected alarms 145 | # You can also set it per host, below. 146 | # The default is taken from [health].enabled of netdata.conf 147 | health enabled by default = auto 148 | 149 | # postpone alarms for a short period after the sender is connected 150 | default postpone alarms on connect seconds = 60 151 | 152 | # need to route metrics differently? set these. 153 | # the defaults are the ones at the [stream] section (above) 154 | #default proxy enabled = yes | no 155 | #default proxy destination = IP:PORT IP:PORT ... 156 | #default proxy api key = API_KEY 157 | #default proxy send charts matching = * 158 | 159 | 160 | # ----------------------------------------------------------------------------- 161 | # 3. PER SENDING HOST SETTINGS, ON PARENT NETDATA 162 | # THIS IS OPTIONAL - YOU DON'T HAVE TO CONFIGURE IT 163 | 164 | # This section exists to give you finer control of the parent settings for each 165 | # child host, when the same API key is used by many netdata child nodes / proxies. 166 | # 167 | # Each netdata has a unique GUID - generated the first time netdata starts. 168 | # You can find it at /var/lib/netdata/registry/netdata.public.unique.id 169 | # (at the child). 170 | # 171 | # The host sending data will have one. If the host is not ephemeral, 172 | # you can give settings for each sending host here. 173 | 174 | [MACHINE_GUID] 175 | # enable this host: yes | no 176 | # When disabled, the parent will not receive metrics for this host. 177 | # THIS IS NOT A SECURITY MECHANISM - AN ATTACKER CAN SET ANY OTHER GUID. 178 | # Use only the API key for security. 179 | enabled = no 180 | 181 | # A list of simple patterns matching the IPs of the servers that 182 | # will be pushing metrics using this MACHINE GUID. 183 | # The metrics are received via the API port, so the same IPs 184 | # should also be matched at netdata.conf [web].allow connections from 185 | # and at stream.conf [API_KEY].allow from 186 | allow from = * 187 | 188 | # The number of entries in the database 189 | history = 3600 190 | 191 | # The memory mode of the database: save | map | ram | none | dbengine 192 | memory mode = save 193 | 194 | # Health / alarms control: yes | no | auto 195 | health enabled = yes 196 | 197 | # postpone alarms when the sender connects 198 | postpone alarms on connect seconds = 60 199 | 200 | # need to route metrics differently? 201 | # the defaults are the ones at the [API KEY] section 202 | #proxy enabled = yes | no 203 | #proxy destination = IP:PORT IP:PORT ... 204 | #proxy api key = API_KEY 205 | #proxy send charts matching = * 206 | -------------------------------------------------------------------------------- /root/etc/uci-defaults/40_luci-app-netdata: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | [ -f /usr/share/netdata/webcn/dashboard.js ] && mv -f /usr/share/netdata/webcn/dashboard.js /usr/share/netdata/web/dashboard.js 3 | [ -f /usr/share/netdata/webcn/dashboard_info.js ] && mv -f /usr/share/netdata/webcn/dashboard_info.js /usr/share/netdata/web/dashboard_info.js 4 | [ -f /usr/share/netdata/webcn/main.js ] && mv -f /usr/share/netdata/webcn/main.js /usr/share/netdata/web/main.js 5 | [ -f /usr/share/netdata/webcn/index.html ] && mv -f /usr/share/netdata/webcn/index.html /usr/share/netdata/web/index.html 6 | 7 | rm -rf /tmp/luci-modulecache /tmp/luci-indexcache* 8 | exit 0 9 | -------------------------------------------------------------------------------- /root/usr/share/netdata/webcn/index.html: -------------------------------------------------------------------------------- 1 | netdata dashboard
You must enable JavaScript in order to use Netdata!
You can do this in your browser settings.
-------------------------------------------------------------------------------- /root/usr/share/rpcd/acl.d/luci-app-netdata.json: -------------------------------------------------------------------------------- 1 | { 2 | "luci-app-nedata": { 3 | "description": "Grant UCI access for luci-app-netdata", 4 | "read": { 5 | "uci": [ "netdata" ] 6 | }, 7 | "write": { 8 | "uci": [ "netdata" ] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | netdata dashboard
You must enable JavaScript in order to use Netdata!
You can do this in your browser settings.
--------------------------------------------------------------------------------