ebc37ef3a4c3b1d251a8a0e317afddebd04e89e4
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / disk.lua
1 --[[
2
3 Luci statistics - df 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: df.lua 2274 2008-06-03 23:15:16Z jow $
13
14 ]]--
15
16 module("luci.statistics.rrdtool.definitions.disk", package.seeall)
17
18 function rrdargs( graph, plugin, plugin_instance, dtype )
19         return {
20                 {
21                         title = "%H: Disk I/O operations on %pi",
22                         vlabel = "Operations/s",
23                         number_format = "%5.1lf%sOp/s",
24
25                         data = {
26                                 types = { "disk_ops" },
27                                 sources = {
28                                         disk_ops = { "read", "write" },
29                                 },
30
31                                 options = {
32                                         disk_ops__read = {
33                                                 title = "Reads",
34                                                 color = "00ff00",
35                                                 flip  = false
36                                         },
37
38                                         disk_ops__write = {
39                                                 title = "Writes",
40                                                 color = "ff0000",
41                                                 flip  = true
42                                         }
43                                 }
44                         }
45                 },
46
47                 {
48                         title = "%H: Disk I/O bandwidth on %pi",
49                         vlabel = "Bytes/s",
50                         number_format = "%5.1lf%sB/s",
51
52                         detail = true,
53
54                         data = {
55                                 types = { "disk_octets" },
56                                 sources = {
57                                         disk_octets = { "read", "write" }
58                                 },
59                                 options = {
60                                         disk_octets__read = {
61                                                 title = "Read",
62                                                 color = "00ff00",
63                                                 flip  = false
64                                         },
65                                         disk_octets__write = {
66                                                 title = "Write",
67                                                 color = "ff0000",
68                                                 flip  = true
69                                         }
70                                 }
71                         }
72                 }
73         }
74 end