collectd: add uci config support
authorFlorian Eckert <redacted>
Wed, 27 Feb 2019 11:09:23 +0000 (12:09 +0100)
committerFlorian Eckert <redacted>
Thu, 25 Apr 2019 11:01:42 +0000 (13:01 +0200)
Add uci config support.

Signed-off-by: Florian Eckert <redacted>
33 files changed:
utils/collectd/Makefile
utils/collectd/files/collectd.conf [deleted file]
utils/collectd/files/collectd.init
utils/collectd/files/collectd.uci [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/conntrack.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/contextswitch.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/cpu.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/cpufreq.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/csv.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/df.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/disk.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/dns.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/email.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/entropy.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/exec.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/interface.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/irq.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/iwinfo.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/load.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/lua.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/memory.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/netlink.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/nut.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/olsrd.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/openvpn.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/ping.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/processes.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/rrdtool.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/sensors.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/tcpconns.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/thermal.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/unixsock.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/uptime.json [new file with mode: 0644]

index 4d88af1a888d9486afd01e25ac78cf18a5135073..232225e45adb4a494969463252e9ad5b37339a47 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
 PKG_VERSION:=5.8.1
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://collectd.org/files/ \
@@ -200,6 +200,7 @@ $(call Package/collectd/Default)
          +zlib \
          +libltdl \
          +libip4tc \
+         +jshn \
          +PACKAGE_collectd-mod-lua:liblua
   MENU:=1
 endef
@@ -298,18 +299,21 @@ endif
 
 define Package/collectd/conffiles
 /etc/collectd.conf
+/etc/config/collectd
 endef
 
 define Package/collectd/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
+
        $(INSTALL_DIR) $(1)/usr/share/collectd
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/collectd/types.db $(1)/usr/share/collectd/
-       $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) ./files/collectd.conf $(1)/etc/
+
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/collectd.init $(1)/etc/init.d/collectd
-       $(INSTALL_DIR) $(1)/etc/collectd/conf.d
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) files/collectd.uci $(1)/etc/config/collectd
 endef
 
 # 1: plugin name
@@ -333,6 +337,11 @@ define BuildPlugin
                        $(PKG_INSTALL_DIR)/usr/lib/collectd/$$$$$$$${m}.so \
                        $$(1)/usr/lib/collectd/ ; \
        done
+       if [ -f ./files/usr/share/collectd/plugin/$(1).json ]; then \
+               $(INSTALL_DIR) $$(1)/usr/share/collectd/plugin ; \
+               $(INSTALL_DATA) ./files/usr/share/collectd/plugin/$(1).json \
+                       $$(1)/usr/share/collectd/plugin/$(1).json ; \
+       fi
   endef
 
   $$(eval $$(call BuildPackage,collectd-mod-$(1)))
diff --git a/utils/collectd/files/collectd.conf b/utils/collectd/files/collectd.conf
deleted file mode 100644 (file)
index 3afbfad..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# Config file for collectd. More info: https://collectd.org/
-# Note: Luci statistics will generate a new config and overwrite this file.
-
-#Hostname   "localhost"
-#FQDNLookup  true
-BaseDir "/var/run/collectd"
-Include "/etc/collectd/conf.d"
-PIDFile "/var/run/collectd.pid"
-PluginDir "/usr/lib/collectd"
-TypesDB "/usr/share/collectd/types.db"
-Interval    30
-ReadThreads 2
-
-LoadPlugin interface
-LoadPlugin load
-#LoadPlugin ping
-LoadPlugin rrdtool
-
-<Plugin rrdtool>
-       DataDir "/tmp/rrd"
-       RRARows 100
-       RRASingle true
-       RRATimespan 3600
-       RRATimespan 86400
-       RRATimespan 604800
-       RRATimespan 2678400
-       RRATimespan 31622400
-</Plugin>
-
-<Plugin interface>
-       IgnoreSelected false
-       Interface "br-lan"
-</Plugin>
-
-#<Plugin ping>
-#      Host "host.foo.bar"
-#      Interval 30
-#      TTL 127
-#</Plugin>
index 668858b90266c24f97c4109ce7aab908eb782632..a0029267a7aafc6acd70213e114cdce2e06c7a1a 100644 (file)
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006-2016 OpenWrt.org
 
+. "/usr/share/libubox/jshn.sh"
+
 START=80
 STOP=10
 
 USE_PROCD=1
+COLLECTD_CONF="/tmp/collectd.conf"
+LOG="logger -t collectd[$$] -p"
 NICEPRIO=5
 
+CONFIG_STRING=""
+
+process_exec() {
+       printf "<Plugin exec>\n" >> "$COLLECTD_CONF"
+       config_foreach process_exec_sections exec_input "Exec"
+       config_foreach process_exec_sections exec_notify "NotificationExec"
+       printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_exec_sections() {
+       local cfg="$1"
+       local section="$2"
+
+       local cmdline cmduser cmdgroup
+
+       config_get cmdline "$cfg" cmdline
+       [ -z "$cmdline" ] && {
+               $LOG notice "No cmdline option in config $cfg defined"
+               return 0
+       }
+
+       config_get cmduser "$cfg" cmduser
+       [ -z "$cmduser" ] && {
+               $LOG notice "No cmduser option in config $cfg defined"
+               return 0
+       }
+
+       config_get cmdgroup "$cfg" cmdgroup
+       if [ -z "$cmdgroup" ]; then
+               printf "\\t%s \"%s\" \"%s\"\n" "${section}" "${cmduser}" "${cmdline}" >> "$COLLECTD_CONF"
+       else
+               printf "\\t%s \"%s:%s\" \"%s\"\n" "${section}" "${cmduser}" "${cmdgroup}" "${cmdline}" >> "$COLLECTD_CONF"
+       fi
+}
+
+CONFIG_LIST=""
+add_list_option() {
+       local value="$1"
+       local option="$2"
+       local indent="$3"
+
+       CONFIG_LIST="${CONFIG_LIST}${indent}${option} \"$value\"\n"
+}
+
+process_generic() {
+       local cfg="$1"
+       local indent="$2"
+       local json="$3"
+
+       local config=""
+
+       json_init
+       json_load_file "$json"
+
+       json_select string 1>/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               json_get_keys keys
+               for key in ${keys}; do
+                       json_get_var option "$key"
+                       config_get value "$cfg" "$option" ""
+                       [ -z "$value" ] || {
+                               config="${config}${indent}${option} \"${value}\"\n"
+                       }
+               done
+               json_select ..
+       fi
+
+       json_select bool 1>/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               json_get_keys keys
+               for key in ${keys}; do
+                       json_get_var option "$key"
+                       config_get_bool value "$cfg" "$option"
+                       if [ "$value" = "0" ]; then
+                               config="${config}${indent}${option} false\n"
+                       fi
+
+                       if [ "$value" = "1" ]; then
+                               config="${config}${indent}${option} true\n"
+                       fi
+               done
+               json_select ..
+       fi
+
+       json_select list 1>/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               json_get_keys keys
+               for key in ${keys}; do
+                       json_get_var option "$key"
+                       CONFIG_LIST=""
+                       config_list_foreach "$cfg" "$option" add_list_option "$option" "$indent"
+                       config="${config}${CONFIG_LIST}"
+               done
+               json_select ..
+       fi
+
+       [ -z "$config" ] || {
+               printf "%s<Plugin %s>\n" "${CONFIG_STRING}" "$cfg" >> "$COLLECTD_CONF"
+               echo -e "${config}" >> "$COLLECTD_CONF"
+               printf "%s</Plugin>\n" "${CONFIG_STRING}" >> "$COLLECTD_CONF"
+       }
+
+       printf "\n" >> "$COLLECTD_CONF"
+}
+
+process_plugins() {
+       local cfg="$1"
+
+       local enable keys key option value
+
+       config_get enable "$cfg" enable 0
+       [ "$enable" = "1" ] || return 0
+
+       [ -f "/usr/lib/collectd/$cfg.so" ] || {
+               $LOG notice "Plugin collectd-mod-$cfg not installed"
+               return 0
+       }
+
+       [ -f "/usr/share/collectd/plugin/$cfg.json" ] || {
+               $LOG notice "Configuration definition file for $cfg not found"
+               return 0
+       }
+
+       printf "LoadPlugin %s\n" "$cfg" >> "$COLLECTD_CONF"
+       case "$cfg" in
+               exec)
+                       CONFIG_STRING=""
+                       process_exec
+                       ;;
+               *)
+                       CONFIG_STRING=""
+                       process_generic "$cfg" "\\t" "/usr/share/collectd/plugin/$cfg.json"
+               ;;
+       esac
+}
+
+process_config() {
+       local alt_config_file BaseDir Include PIDFile PluginDir TypesDB
+       local Interval ReadThreads Hostname
+
+       rm -f "$COLLECTD_CONF"
+
+       [ -f /etc/config/collectd ] || {
+               $LOG notice "UCI config not found"
+               return 0
+       }
+       config_load collectd
+       config_get alt_config_file globals alt_config_file
+
+       # If "alt_config_file" specified, use that instead
+       [ -n "$alt_config_file" ] && [ -f "$alt_config_file" ] && {
+               rm -f "$COLLECTD_CONF"
+               ln -s "$alt_config_file" "$COLLECTD_CONF"
+               return 0
+       }
+
+       # GOBAL CONFIG
+       config_get BaseDir globals BaseDir "/var/run/collectd"
+       printf "BaseDir \"%s\"\n" "$BaseDir" >> "$COLLECTD_CONF"
+
+       config_get Include globals Include "/tmp/collectd.d"
+       printf "Include \"%s\"\n" "$Include" >> "$COLLECTD_CONF"
+       mkdir -p "$Include"
+
+       config_get PIDFile globals PIDFile "/var/run/collectd.pid"
+       printf "PIDFile \"%s\"\n" "$PIDFile" >> "$COLLECTD_CONF"
+
+       config_get PluginDir globals PluginDir "/usr/lib/collectd"
+       printf "PluginDir \"%s\"\n" "$PluginDir" >> "$COLLECTD_CONF"
+
+       config_get TypesDB globals TypesDB "/usr/share/collectd/types.db"
+       printf "TypesDB \"%s\"\n" "$TypesDB" >> "$COLLECTD_CONF"
+
+       config_get Interval globals Interval 30
+       printf "Interval \"%s\"\n" "$Interval" >> "$COLLECTD_CONF"
+
+       config_get ReadThreads globals ReadThreads 2
+       printf "ReadThreads \"%s\"\n" "$ReadThreads" >> "$COLLECTD_CONF"
+
+       config_get Hostname globals Hostname "$(hostname)"
+       printf "Hostname \"%s\"\n" "$Hostname" >> "$COLLECTD_CONF"
+
+       printf "\n" >> "$COLLECTD_CONF"
+
+       # PLUGIN CONFIG
+       config_foreach process_plugins plugin
+}
+
 start_service() {
-       mkdir -m 0755 -p /var/lib/collectd
        procd_open_instance
-       procd_set_param command /usr/sbin/collectd -f
+       procd_set_param command /usr/sbin/collectd
+       procd_append_param command -C "$COLLECTD_CONF"
+       procd_append_param command -f # don't daemonize, procd will handle that for us
        procd_set_param nice "$NICEPRIO"
+
+       process_config
+
+       # set auto respawn behavior
+       procd_set_param respawn
        procd_close_instance
 }
 
diff --git a/utils/collectd/files/collectd.uci b/utils/collectd/files/collectd.uci
new file mode 100644 (file)
index 0000000..73e2c2a
--- /dev/null
@@ -0,0 +1,160 @@
+config globals 'globals'
+       option alt_config_file "/etc/collectd.conf"
+#      option BaseDir '/var/run/collectd'
+#      option Include '/tmp/collectd.d'
+#      option PIDFile '/var/run/collectd.pid'
+#      option PluginDir '/usr/lib/collectd'
+#      option TypesDB '/usr/share/collectd/types.db'
+#      option Interval '30'
+#      option ReadThreads '2'
+
+#config plugin 'conntrack'
+#      option enable '0'
+
+#config plugin 'contextswitch'
+#      option enable '0'
+
+#config plugin 'cpu'
+#      option enable '0'
+
+#config plugin 'cpufreq'
+#      option enable '0'
+
+#config plugin 'csv'
+#      option enable '0'
+#      option StoreRates '0'
+#      option DataDir '/tmp'
+
+#config plugin 'df'
+#      option enable '0'
+#      list Device '/dev/mtdblock/4'
+#      list MountPoint '/jffs'
+#      list FSType 'tmpfs'
+#      option IgnoreSelected '0'
+
+#config plugin 'disk'
+#      option enable '0'
+#      list Disk 'hda1'
+#      list Disk 'hdb'
+#      option IgnoreSelected '0'
+
+#config plugin 'dns'
+#      option enable '0'
+#      list Interface 'br-lan'
+#      list IgnoreSource '127.0.0.1'
+
+#config plugin 'email'
+#      option enable '0'
+#      option SocketFile '/var/run/collectd/email.sock'
+#      option SocketGroup 'nogroup'
+
+#config plugin 'entropy'
+#      option enable '0'
+
+#config plugin 'exec'
+#      option enable '0'
+
+#config exec_input
+#      option cmdline '/usr/bin/stat-dhcpusers'
+#      option cmduser 'nobody'
+#      option cmdgroup 'nogroup'
+
+#config exec_notify
+#      option cmdline '/usr/bin/stat-dhcpusers'
+#      option cmduser 'nobody'
+#      option cmdgroup 'nogroup'
+
+#config plugin 'interface'
+#      option enable '1'
+#      list Interface 'br-lan'
+#      option IgnoreSelected '0'
+
+#config plugin 'irq'
+#      option enable '0'
+#      list Irq '2'
+#      list Irq '3'
+#      list Irq '4'
+#      list Irq '7'
+
+#config plugin 'iwinfo'
+#      option enable '0'
+
+#config plugin 'load'
+#      option enable '0'
+
+#config plugin 'lua'
+#      option BasePath '/usr/share/collectd-mod-lua'
+#      list Script 'script1.lua'
+#      list Script 'script2.lua
+
+#config plugin 'memory'
+#      option enable '0'
+
+#config plugin 'netlink'
+#      option enable '0'
+#      option IgnoreSelected '0'
+#      list VerboseInterface 'br-lan'
+#      list QDisc 'br-lan'
+
+#config plugin 'nut'
+#      option enable '0'
+#      option UPS 'myupsname'
+
+#config plugin 'olsrd'
+#      option enable '0'
+#      option Port '2006'
+#      option Host '127.0.0.1'
+
+#config plugin 'openvpn'
+#      option enable '0'
+#      option StatusFile '/var/run/openvpn/openvpn.status'
+#      option CollectIndividualUsers '1'
+#      optoin CollectUserCount '1'
+#      optoin CollectCompression '1'
+#      option ImprovedNamingSchema '0'
+
+#config plugin 'ping'
+#      option enable '0'
+#      option TTL '127'
+#      option Interval '30'
+#      list Host '127.0.0.1'
+
+#config plugin 'processes'
+#      option enable '0'
+#      list Process 'uhttpd'
+#      list Process 'dnsmasq'
+#      list Process 'dropbear'
+
+#config plugin 'rrdtool'
+#      option enable '0'
+#      option DataDir '/tmp/rrd'
+#      option RRARows '100'
+#      option RRASingle '1'
+#      list RRATimespan '3600'
+#      list RRATimespan '86400'
+#      list RRATimespan '604800'
+#      list RRATimespan '2678400'
+#      list RRATimespan '31622400'
+
+#config plugin 'sensors'
+#      option enable '0'
+
+#config plugin 'tcpconns'
+#      option enable '0'
+#      list ListeningPort '0'
+#      list LocalPort '22'
+#      list LocalPort '80'
+
+#config plugin 'thermal'
+#      option enable '0'
+#      option IgnoreSelected '0'
+#      list Device ''
+
+#config plugin 'unixsock'
+#      option enable '0'
+#      option SocketFile '/var/run/collectd/query.sock'
+#      option SocketGroup 'nogroup'
+
+#config plugin 'uptime'
+#      option enable '0'
+
diff --git a/utils/collectd/files/usr/share/collectd/plugin/conntrack.json b/utils/collectd/files/usr/share/collectd/plugin/conntrack.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/contextswitch.json b/utils/collectd/files/usr/share/collectd/plugin/contextswitch.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/cpu.json b/utils/collectd/files/usr/share/collectd/plugin/cpu.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/cpufreq.json b/utils/collectd/files/usr/share/collectd/plugin/cpufreq.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/csv.json b/utils/collectd/files/usr/share/collectd/plugin/csv.json
new file mode 100644 (file)
index 0000000..3e89972
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "string": [
+               "DataDir"
+       ],
+       "bool": [
+               "StoreRates"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/df.json b/utils/collectd/files/usr/share/collectd/plugin/df.json
new file mode 100644 (file)
index 0000000..dde65fd
--- /dev/null
@@ -0,0 +1,10 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Device",
+               "MountPoint",
+               "FSType"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/disk.json b/utils/collectd/files/usr/share/collectd/plugin/disk.json
new file mode 100644 (file)
index 0000000..e7b9214
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Disk"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/dns.json b/utils/collectd/files/usr/share/collectd/plugin/dns.json
new file mode 100644 (file)
index 0000000..c9dacf1
--- /dev/null
@@ -0,0 +1,6 @@
+{
+       "list": [
+               "Interface",
+               "IgnoreSource"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/email.json b/utils/collectd/files/usr/share/collectd/plugin/email.json
new file mode 100644 (file)
index 0000000..eb6b3ef
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "string": [
+               "SocketFile",
+               "SocketGroup",
+               "SocketPerms",
+               "MaxConns"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/entropy.json b/utils/collectd/files/usr/share/collectd/plugin/entropy.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/exec.json b/utils/collectd/files/usr/share/collectd/plugin/exec.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/interface.json b/utils/collectd/files/usr/share/collectd/plugin/interface.json
new file mode 100644 (file)
index 0000000..aef2522
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Interface"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/irq.json b/utils/collectd/files/usr/share/collectd/plugin/irq.json
new file mode 100644 (file)
index 0000000..0f7e59c
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Irq"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/iwinfo.json b/utils/collectd/files/usr/share/collectd/plugin/iwinfo.json
new file mode 100644 (file)
index 0000000..aef2522
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Interface"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/load.json b/utils/collectd/files/usr/share/collectd/plugin/load.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/lua.json b/utils/collectd/files/usr/share/collectd/plugin/lua.json
new file mode 100644 (file)
index 0000000..2bc7b68
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "string": [
+               "BasePath"
+       ],
+       "list": [
+               "Script"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/memory.json b/utils/collectd/files/usr/share/collectd/plugin/memory.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/netlink.json b/utils/collectd/files/usr/share/collectd/plugin/netlink.json
new file mode 100644 (file)
index 0000000..7ef7b77
--- /dev/null
@@ -0,0 +1,12 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Interface",
+               "VerboseInterface",
+               "QDisc",
+               "Classe",
+               "Filter"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/nut.json b/utils/collectd/files/usr/share/collectd/plugin/nut.json
new file mode 100644 (file)
index 0000000..4cac99f
--- /dev/null
@@ -0,0 +1,5 @@
+{
+       "string": [
+               "UPS"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/olsrd.json b/utils/collectd/files/usr/share/collectd/plugin/olsrd.json
new file mode 100644 (file)
index 0000000..04c0438
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "string": [
+               "Host",
+               "Port",
+               "CollectLinks",
+               "CollectRoutes",
+               "CollectTopology"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/openvpn.json b/utils/collectd/files/usr/share/collectd/plugin/openvpn.json
new file mode 100644 (file)
index 0000000..87a3f16
--- /dev/null
@@ -0,0 +1,11 @@
+{
+       "string": [
+               "StatusFile"
+       ],
+       "bool": [
+               "CollectIndividualUsers",
+               "CollectUserCount",
+               "CollectCompression",
+               "ImprovedNamingSchema"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/ping.json b/utils/collectd/files/usr/share/collectd/plugin/ping.json
new file mode 100644 (file)
index 0000000..53bc88c
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "string": [
+               "TTL",
+               "Interval"
+       ],
+       "list": [
+               "Host"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/processes.json b/utils/collectd/files/usr/share/collectd/plugin/processes.json
new file mode 100644 (file)
index 0000000..6e38fa9
--- /dev/null
@@ -0,0 +1,5 @@
+{
+       "list": [
+               "Process"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/rrdtool.json b/utils/collectd/files/usr/share/collectd/plugin/rrdtool.json
new file mode 100644 (file)
index 0000000..339f6ac
--- /dev/null
@@ -0,0 +1,17 @@
+{
+       "string": [
+               "DataDir",
+               "StepSize",
+               "HeartBeat",
+               "RRARows",
+               "XFF",
+               "CacheFlush",
+               "CacheTimeout"
+       ],
+       "bool": [
+               "RRASingle"
+       ],
+       "list": [
+               "RRATimespan"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/sensors.json b/utils/collectd/files/usr/share/collectd/plugin/sensors.json
new file mode 100644 (file)
index 0000000..35915ba
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Sensor"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/tcpconns.json b/utils/collectd/files/usr/share/collectd/plugin/tcpconns.json
new file mode 100644 (file)
index 0000000..56a4c81
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "bool": [
+               "ListeningPorts"
+       ],
+       "list": [
+               "LocalPort",
+               "RemotePort"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/thermal.json b/utils/collectd/files/usr/share/collectd/plugin/thermal.json
new file mode 100644 (file)
index 0000000..cf93fc2
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Device"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/unixsock.json b/utils/collectd/files/usr/share/collectd/plugin/unixsock.json
new file mode 100644 (file)
index 0000000..6362a9d
--- /dev/null
@@ -0,0 +1,7 @@
+{
+       "string": [
+               "SocketFile",
+               "SocketGroup",
+               "SocketPerms"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/uptime.json b/utils/collectd/files/usr/share/collectd/plugin/uptime.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
git clone https://git.99rst.org/PROJECT