Collectd-mod-nut and collectd-mod-ping not working

I managed to get this working… that’s good enough for me now!
/usr/lib/lua/luci/statistics/rrdtool/definitions/nut.lua

-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.nut",package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
	local voltage1 = {
		title = "%H: Battery Voltage on UPS \"%pi\"",
		vlabel = "Volt",
		number_format = "%5.1lfV",
		data = {
			instances = {
				voltage = { "battery" }
			},
			options = {
				voltage_battery = { color = "0000ff", title = "Battery voltage", noarea=true, overlay=true }
			}
		}
	}
	local voltage2 = {
                title = "%H: Power Voltage on UPS \"%pi\"",
                vlabel = "Volt",
                number_format = "%5.1lfV",
                data = {
                        instances = {
                                voltage = { "input" }
                        },
                        options = {
                                voltage_input   = { color = "ffb000", title = "Input voltage", noarea=true,             overlay=true }
                        }
                }
        }
	return { voltage2, voltage1 }
end