1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
|
#!@@GOODSH@@
# Plugin to test complex multigraph thingies
# This plugin, ideally, creates a multigraph tree that is 3 levels deep. The
# top level should have 6 fields (fake{1,2,3}_{in,out}), the second level
# should have three graphs (fake{1,2,3}) with two fields each (in, out). The
# third level should have in and out in their own graph for each of
# fake{1,2,3}.
#
# While a three layer multigraph is cool, the real magic intended in this test
# graph is data borrowing within multigraph. Specifically, the first and
# second tier graphs should be borrowing all of their data (through the use of
# graph_order) from the third tier graphs, so that we don't unnecessarily
# create RRDs for each level.
#
# Currently, the second tier borrows and renders fine, but the first tier
# breaks mysteriously with Perl warnings, implying that we don't handle missing
# borrowed data very well and that we can't seem to find this data even though
# the second tier is able to. XXX: Edit this paragraph when we fix it. :)
[ "$1" = "config" ] && cat <<EOF
multigraph multigraph_complex
graph_title Testing multigraph
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
graph_order \
fake1_out=multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_out.fake1_out \
fake1_in=multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_in.fake1_in \
fake2_out=multigraph_complex.multigraph_complex_fake2.multigraph_complex_fake2_out.fake2_out \
fake2_in=multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake2_in.fake2_in \
fake3_out=multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_out.fake3_out \
fake3_in=multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_in.fake3_in
fake2_out.label fake2
fake2_out.type GAUGE
fake2_out.draw LINE2
fake2_out.min 0
fake2_out.info widgets out by fake2
fake2_out.update no
fake2_out.cdef fake2_out,8,*
fake2_in.label fake2
fake2_in.type GAUGE
fake2_in.draw LINE2
fake2_in.min 0
fake2_in.info widgets in by fake2
fake2_in.update no
fake2_in.cdef fake2_in,8,*
fake3_out.label fake3
fake3_out.type GAUGE
fake3_out.draw LINE2
fake3_out.min 0
fake3_out.info widgets out by fake3
fake3_out.update no
fake3_out.cdef fake3_out,8,*
fake3_in.label fake3
fake3_in.type GAUGE
fake3_in.draw LINE2
fake3_in.min 0
fake3_in.info widgets in by fake3
fake3_in.update no
fake3_in.cdef fake3_in,8,*
fake1_out.label fake1
fake1_out.type GAUGE
fake1_out.draw LINE2
fake1_out.min 0
fake1_out.info widgets out by fake1
fake1_out.update no
fake1_out.cdef fake1_out,8,*
fake1_in.label fake1
fake1_in.type GAUGE
fake1_in.draw LINE2
fake1_in.min 0
fake1_in.info widgets in by fake1
fake1_in.update no
fake1_in.cdef fake1_in,8,*
multigraph multigraph_complex.multigraph_complex_fake2
graph_title fake2 widgets per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
graph_order \
fake2_out=multigraph_complex.multigraph_complex_fake2.multigraph_complex_fake2_out.fake2_out \
fake2_in=multigraph_complex.multigraph_complex_fake2.multigraph_complex_fake2_in.fake2_in
fake2_out.label fake2
fake2_out.type GAUGE
fake2_out.draw LINE2
fake2_out.min 0
fake2_out.update no
fake2_out.cdef fake2_out,8,*
fake2_in.label fake2
fake2_in.type GAUGE
fake2_in.draw LINE2
fake2_in.min 0
fake2_in.update no
fake2_in.cdef fake2_in,8,*
multigraph multigraph_complex.multigraph_complex_fake3
graph_title fake3 widgets per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
graph_order \
fake3_out=multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_out.fake3_out \
fake3_in=multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_in.fake3_in
fake3_out.label fake3
fake3_out.type GAUGE
fake3_out.draw LINE2
fake3_out.min 0
fake3_out.update no
fake3_out.cdef fake3_out,8,*
fake3_in.label fake3
fake3_in.type GAUGE
fake3_in.draw LINE2
fake3_in.min 0
fake3_in.update no
fake3_in.cdef fake3_in,8,*
multigraph multigraph_complex.multigraph_complex_fake1
graph_title fake1 widgets per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
graph_order \
fake1_out=multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_out.fake1_out \
fake1_in=multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_in.fake1_in
fake1_out.label fake1
fake1_out.type GAUGE
fake1_out.draw LINE2
fake1_out.min 0
fake1_out.update no
fake1_out.cdef fake1_out,8,*
fake1_in.label fake1
fake1_in.type GAUGE
fake1_in.draw LINE2
fake1_in.min 0
fake1_in.update no
fake1_in.cdef fake1_in,8,*
multigraph multigraph_complex.multigraph_complex_fake2.multigraph_complex_fake2_out
graph_title fake2 widgets out per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
fake2_out.label fake2
fake2_out.type GAUGE
fake2_out.min 0
fake2_out.draw AREA
fake2_out.cdef fake2_out,8,*
multigraph multigraph_complex.multigraph_complex_fake2.multigraph_complex_fake2_in
graph_title fake2 widgets in per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
fake2_in.label fake2
fake2_in.type GAUGE
fake2_in.min 0
fake2_in.draw AREA
fake2_in.cdef fake2_in,8,*
multigraph multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_out
graph_title fake3 widgets out per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
fake3_out.label fake3
fake3_out.type GAUGE
fake3_out.min 0
fake3_out.draw AREA
fake3_out.cdef fake3_out,8,*
multigraph multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_in
graph_title fake3 widgets in per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
fake3_in.label fake3
fake3_in.type GAUGE
fake3_in.min 0
fake3_in.draw AREA
fake3_in.cdef fake3_in,8,*
multigraph multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_out
graph_title fake1 widgets out per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
fake1_out.label fake1
fake1_out.type GAUGE
fake1_out.min 0
fake1_out.draw AREA
fake1_out.cdef fake1_out,8,*
multigraph multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_in
graph_title fake1 widgets in per second
graph_args --base 1000
graph_vlabel widgets per second
graph_category testing
fake1_in.label fake1
fake1_in.type GAUGE
fake1_in.min 0
fake1_in.draw AREA
fake1_in.cdef fake1_in,8,*
EOF
[ "$1" = "" ] && cat <<EOF
multigraph multigraph_complex.multigraph_complex_fake2.multigraph_complex_fake2_out
fake2_out.value 728
multigraph multigraph_complex.multigraph_complex_fake2.multigraph_complex_fake2_in
fake2_in.value 1188
multigraph multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_out
fake3_out.value 549
multigraph multigraph_complex.multigraph_complex_fake3.multigraph_complex_fake3_in
fake3_in.value 414
multigraph multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_out
fake1_out.value 1659
multigraph multigraph_complex.multigraph_complex_fake1.multigraph_complex_fake1_in
fake1_in.value 5076
EOF
exit 0
|