3 Luci configuration model for statistics - collectd exec plugin configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
16 m = Map("luci_statistics", "Exec Plugin",
17 [[Das Exec-Plugin ermöglicht das Ausführen von externen Programmen um Werte einzulesen
18 oder Aktionen beim Eintreten bestimmter Ereignisse anzustoßen.]])
20 -- collectd_exec config section
21 s = m:section( NamedSection, "collectd_exec", "luci_statistics", "Pluginkonfiguration" )
23 -- collectd_exec.enable
24 enable = s:option( Flag, "enable", "Plugin aktivieren" )
28 -- collectd_exec_input config section (Exec directives)
29 exec = m:section( TypedSection, "collectd_exec_input", "Befehl zum Einlesen von Daten hinzufügen",
30 [[Hier können externe Kommandos definiert werden welche durch collectd gestartet werden um bestimmte
31 Daten zu sammeln. Die Werte werden dabei von der Standardausgabe des Programmes gelesen.]])
35 -- collectd_exec_input.cmdline
36 exec_cmdline = exec:option( Value, "cmdline", "Kommandozeile" )
37 exec_cmdline.default = "/usr/bin/stat-dhcpusers"
39 -- collectd_exec_input.cmdline
40 exec_cmduser = exec:option( Value, "cmduser", "Als anderer Benutzer ausführen" )
41 exec_cmduser.default = "nobody"
42 exec_cmduser.rmempty = true
43 exec_cmduser.optional = true
45 -- collectd_exec_input.cmdline
46 exec_cmdgroup = exec:option( Value, "cmdgroup", "Als andere Gruppe ausführen" )
47 exec_cmdgroup.default = "nogroup"
48 exec_cmdgroup.rmempty = true
49 exec_cmdgroup.optional = true
52 -- collectd_exec_notify config section (NotifyExec directives)
53 notify = m:section( TypedSection, "collectd_exec_notify", "Befehl zum Ausgeben von Daten hinzufügen",
54 [[Hier können externe Kommandos definiert werden welche zur Ausführung kommen sobald bestimmte
55 Ereignise eintreten. Die Daten werden dabei an die Standardeingabe des aufgerufenen Programmes gesendet.
56 Siehe dazu auch die Sektion "Limits".]])
57 notify.addremove = true
58 notify.anonymous = true
60 -- collectd_notify_input.cmdline
61 notify_cmdline = notify:option( Value, "cmdline", "Kommandozeile" )
62 notify_cmdline.default = "/usr/bin/stat-dhcpusers"
64 -- collectd_notify_input.cmdline
65 notify_cmduser = notify:option( Value, "cmduser", "Als anderer Benutzer ausführen" )
66 notify_cmduser.default = "nobody"
67 notify_cmduser.rmempty = true
68 notify_cmduser.optional = true
70 -- collectd_notify_input.cmdline
71 notify_cmdgroup = notify:option( Value, "cmdgroup", "Als andere Gruppe ausführen" )
72 notify_cmdgroup.default = "nogroup"
73 notify_cmdgroup.rmempty = true
74 notify_cmdgroup.optional = true