--- /dev/null
+/* Licensed to the public under the Apache License 2.0. */
+
+'use strict';
+'require baseclass';
+
+return baseclass.extend({
+ title: _('DHCP Leases'),
+
+ rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
+ return {
+ title: "%H: DHCP leases",
+ alt_autoscale_max: true,
+ vlabel: "Leases given",
+ number_format: "%3.0lf",
+ data: {
+ types: [ "count" ],
+ options: {
+ count: {
+ title: "Leases"
+ }
+ }
+ }
+ };
+ }
+});
--- /dev/null
+'use strict';
+'require baseclass';
+'require form';
+
+return baseclass.extend({
+ title: _('DHCP Leases Plugin Configuration'),
+ description: _('The dhcpleases plugin collects information about assigned DHCP leases.'),
+
+ addFormOptions: function(s) {
+ var o;
+
+ o = s.option(form.Flag, 'enable', _('Enable this plugin'));
+
+ o = s.option(form.Value, 'Path', _('DHCP leases file'));
+ o.default = '/tmp/dhcp.leases';
+ },
+
+ configSummary: function(section) {
+ return _('Monitoring DHCP leases enabled');
+ }
+});
option IgnoreSelected '0'
option ValuesPercentage '0'
+config statistics 'collectd_dhcpleases'
+ option enable '0'
+ option Path '/tmp/dhcp.leases'
+
config statistics 'collectd_disk'
option enable '0'
option Disks 'hda1 hdb'
--- /dev/null
+{
+ "title": "Dhcpleases",
+ "category": "network",
+ "legend": [
+ [],
+ [],
+ ["Path"]
+ ]
+}