4cb4795ef6465cef14eda3747cd721d8deadf83b
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / load.lua
1 --[[
2
3 Luci statistics - load plugin diagram definition
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
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
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id: load.lua 2329 2008-06-08 21:51:55Z jow $
13
14 ]]--
15
16 module("luci.statistics.rrdtool.definitions.load", package.seeall)
17
18 function rrdargs( graph, plugin, plugin_instance, dtype )
19
20         return {
21                 title = "%H: Load", vlabel = "Load",
22                 y_min = "0",
23                 units_exponent = "0",
24                 number_format = "%5.2lf", data = {
25                         sources = {
26                                 load = { "shortterm", "midterm", "longterm" }
27                         },
28
29                         options = {
30                                 load__shortterm = { color = "ff0000", title = "1 minute", noarea = true },
31                                 load__midterm   = { color = "ff6600", title = "5 minutes", noarea = true },
32                                 load__longterm  = { color = "ffaa00", title = "15 minutes", noarea = true }
33                         }
34                 }
35         }
36 end