1 25 26 package org.jrobin.mrtg; 27 28 public interface MrtgConstants { 29 String BACKEND_FACTORY_NAME = "NIO"; 34 35 boolean DEBUG = false; 37 38 int SERVER_PORT = 35353; 40 41 int SCHEDULER_RESOLUTION = 5; 43 44 int SCHEDULER_DELAY = 20; 46 47 int POOL_CAPACITY = 100; 49 50 int GRAPH_WIDTH = 502, GRAPH_HEIGHT = 234; 52 53 boolean REMOVE_RRD_FOR_DEACTIVATED_LINK = true; 55 56 String RRD_TEMPLATE_STR = 58 "<rrd_def> \n" + 59 " <path>${path}</path> \n" + 60 " <step>300</step> \n" + 61 " <datasource> \n" + 62 " <name>in</name> \n" + 63 " <type>COUNTER</type> \n" + 64 " <heartbeat>6000</heartbeat> \n" + 65 " <min>U</min> \n" + 66 " <max>U</max> \n" + 67 " </datasource> \n" + 68 " <datasource> \n" + 69 " <name>out</name> \n" + 70 " <type>COUNTER</type> \n" + 71 " <heartbeat>6000</heartbeat> \n" + 72 " <min>U</min> \n" + 73 " <max>U</max> \n" + 74 " </datasource> \n" + 75 " <archive> \n" + 76 " <cf>AVERAGE</cf> \n" + 77 " <xff>0.5</xff> \n" + 78 " <steps>1</steps> \n" + 79 " <rows>600</rows> \n" + 80 " </archive> \n" + 81 " <archive> \n" + 82 " <cf>AVERAGE</cf> \n" + 83 " <xff>0.5</xff> \n" + 84 " <steps>6</steps> \n" + 85 " <rows>700</rows> \n" + 86 " </archive> \n" + 87 " <archive> \n" + 88 " <cf>AVERAGE</cf> \n" + 89 " <xff>0.5</xff> \n" + 90 " <steps>24</steps> \n" + 91 " <rows>775</rows> \n" + 92 " </archive> \n" + 93 " <archive> \n" + 94 " <cf>AVERAGE</cf> \n" + 95 " <xff>0.5</xff> \n" + 96 " <steps>288</steps> \n" + 97 " <rows>797</rows> \n" + 98 " </archive> \n" + 99 " <archive> \n" + 100 " <cf>MAX</cf> \n" + 101 " <xff>0.5</xff> \n" + 102 " <steps>1</steps> \n" + 103 " <rows>600</rows> \n" + 104 " </archive> \n" + 105 " <archive> \n" + 106 " <cf>MAX</cf> \n" + 107 " <xff>0.5</xff> \n" + 108 " <steps>6</steps> \n" + 109 " <rows>700</rows> \n" + 110 " </archive> \n" + 111 " <archive> \n" + 112 " <cf>MAX</cf> \n" + 113 " <xff>0.5</xff> \n" + 114 " <steps>24</steps> \n" + 115 " <rows>775</rows> \n" + 116 " </archive> \n" + 117 " <archive> \n" + 118 " <cf>MAX</cf> \n" + 119 " <xff>0.5</xff> \n" + 120 " <steps>288</steps> \n" + 121 " <rows>797</rows> \n" + 122 " </archive> \n" + 123 " <archive> \n" + 124 " <cf>MIN</cf> \n" + 125 " <xff>0.5</xff> \n" + 126 " <steps>1</steps> \n" + 127 " <rows>600</rows> \n" + 128 " </archive> \n" + 129 " <archive> \n" + 130 " <cf>MIN</cf> \n" + 131 " <xff>0.5</xff> \n" + 132 " <steps>6</steps> \n" + 133 " <rows>700</rows> \n" + 134 " </archive> \n" + 135 " <archive> \n" + 136 " <cf>MIN</cf> \n" + 137 " <xff>0.5</xff> \n" + 138 " <steps>24</steps> \n" + 139 " <rows>775</rows> \n" + 140 " </archive> \n" + 141 " <archive> \n" + 142 " <cf>MIN</cf> \n" + 143 " <xff>0.5</xff> \n" + 144 " <steps>288</steps> \n" + 145 " <rows>797</rows> \n" + 146 " </archive> \n" + 147 "</rrd_def> "; 148 149 String GRAPH_TEMPLATE_STR = 151 "<rrd_graph_def> \n" + 152 " <span> \n" + 153 " <start>${start}</start> \n" + 154 " <end>${end}</end> \n" + 155 " </span> \n" + 156 " <options> \n" + 157 " <anti_aliasing>off</anti_aliasing> \n" + 158 " <border> \n" + 159 " <color>#FFFFFF</color> \n" + 160 " <width>0</width> \n" + 161 " </border> \n" + 162 " <title>${interface} at ${host}</title> \n" + 163 " <vertical_label>transfer speed [bits/sec]</vertical_label> \n" + 164 " </options> \n" + 165 " <datasources> \n" + 166 " <def> \n" + 167 " <name>in</name> \n" + 168 " <rrd>${rrd}</rrd> \n" + 169 " <source>in</source> \n" + 170 " <cf>AVERAGE</cf> \n" + 171 " </def> \n" + 172 " <def> \n" + 173 " <name>out</name> \n" + 174 " <rrd>${rrd}</rrd> \n" + 175 " <source>out</source> \n" + 176 " <cf>AVERAGE</cf> \n" + 177 " </def> \n" + 178 " <def> \n" + 179 " <name>in8</name> \n" + 180 " <rpn>in,8,*</rpn> \n" + 181 " </def> \n" + 182 " <def> \n" + 183 " <name>out8</name> \n" + 184 " <rpn>out,8,*</rpn> \n" + 185 " </def> \n" + 186 " </datasources> \n" + 187 " <graph> \n" + 188 " <area> \n" + 189 " <datasource>out8</datasource> \n" + 190 " <color>#00FF00</color> \n" + 191 " <legend>output traffic</legend> \n" + 192 " </area> \n" + 193 " <line> \n" + 194 " <datasource>in8</datasource> \n" + 195 " <color>#0000FF</color> \n" + 196 " <legend>input traffic@l</legend> \n" + 197 " </line> \n" + 198 " <gprint> \n" + 199 " <datasource>out8</datasource> \n" + 200 " <cf>AVERAGE</cf> \n" + 201 " <format>Average output:@7.2 @sbits/s</format> \n" + 202 " </gprint> \n" + 203 " <gprint> \n" + 204 " <datasource>out8</datasource> \n" + 205 " <cf>MAX</cf> \n" + 206 " <format>Maximum output:@7.2 @Sbits/s</format> \n" + 207 " </gprint> \n" + 208 " <gprint> \n" + 209 " <datasource>out</datasource> \n" + 210 " <cf>TOTAL</cf> \n" + 211 " <format>Total output:@7.2 @sbytes@l</format> \n" + 212 " <base>1024</base> \n" + 213 " </gprint> \n" + 214 " <gprint> \n" + 215 " <datasource>in8</datasource> \n" + 216 " <cf>AVERAGE</cf> \n" + 217 " <format>Average input: @7.2 @sbits/s</format> \n" + 218 " </gprint> \n" + 219 " <gprint> \n" + 220 " <datasource>in8</datasource> \n" + 221 " <cf>MAX</cf> \n" + 222 " <format>Maximum input: @7.2 @Sbits/s</format> \n" + 223 " </gprint> \n" + 224 " <gprint> \n" + 225 " <datasource>in</datasource> \n" + 226 " <cf>TOTAL</cf> \n" + 227 " <format>Total input :@7.2 @sbytes@l</format> \n" + 228 " <base>1024</base> \n" + 229 " </gprint> \n" + 230 " <comment>@l</comment> \n" + 231 " <comment>Description on device: ${alias}@l</comment> \n" + 232 " <comment>[${date_start}] -- [${date_end}]</comment> \n" + 233 " </graph> \n" + 234 "</rrd_graph_def> "; 235 } 236 | Popular Tags |