| 229 | '''Solution''': Edit the defMetric under the Application Definition and Edit defGraph to show you the required parameters |
| 230 | |
| 231 | {{{ |
| 232 | defApplication('ofstats') do |app| |
| 233 | app.description = 'Simple Definition for the of-collect application' |
| 234 | # Define the path to the binary executable for this application |
| 235 | app.binary_path = '/usr/local/bin/learn_ofcollect.rb' |
| 236 | app.defProperty('target', 'Address to output file', '-f', {:type => :string}) |
| 237 | app.defProperty("interval","Interval",'-i', {:type => :string}) |
| 238 | app.defMeasurement('wrapper_ofthroughput') do |m| |
| 239 | m.defMetric(':srcaddr', :string) |
| 240 | m.defMetric('numflows',:int64) |
| 241 | m.defMetric('throughput',:int64) |
| 242 | end |
| 243 | end |
| 244 | |
| 245 | }}} |
| 246 | |
| 247 | Graph: |
| 248 | |
| 249 | |
| 250 | {{{ |
| 251 | defGraph 'Throughput' do |g| |
| 252 | g.ms('wrapper_ofthroughput').select(:oml_ts_client, :numflows, :srcaddr) |
| 253 | g.caption "Throughput of Flows" |
| 254 | g.type 'line_chart3' |
| 255 | g.mapping :x_axis => :oml_ts_client, :y_axis => :numflows, :group_by => :srcaddr |
| 256 | g.xaxis :legend => 'oml_ts' |
| 257 | g.yaxis :legend => 'Throughput', :ticks => {:format => 's'} |
| 258 | end |
| 259 | }}} |