<?php
# Plugin: check_snmp_brocade_fcport
# Copyright (2009): Christian Heim <christian.heim@barfoo.org>
 
$opt[1] = "--title \"Switchport performance indicators for ". str_replace("_","/",$servicedesc) ." on $hostname\" ";
 
$def[1]  = "DEF:bytes_tx=$RRDFILE[1]:$DS[1]:AVERAGE ";
$def[1] .= "DEF:bytes_rx=$RRDFILE[1]:$DS[2]:AVERAGE ";
$def[1] .= "CDEF:bytes_all=bytes_tx,bytes_rx,+ ";
$def[1] .= "DEF:err_enc_in=$RRDFILE[1]:$DS[5]:AVERAGE ";
$def[1] .= "DEF:err_enc_out=$RRDFILE[1]:$DS[10]:AVERAGE ";
$def[1] .= "DEF:err_crc=$RRDFILE[1]:$DS[6]:AVERAGE ";
$def[1] .= "DEF:err_trunc=$RRDFILE[1]:$DS[7]:AVERAGE ";
$def[1] .= "DEF:err_toolong=$RRDFILE[1]:$DS[8]:AVERAGE ";
$def[1] .= "DEF:err_bad_eof=$RRDFILE[1]:$DS[9]:AVERAGE ";
$def[1] .= "DEF:err_c3_timeout=$RRDFILE[1]:$DS[11]:AVERAGE ";
 
$def[1] .= "LINE1:bytes_all#FF007F:\"Throughput\" " ;
$def[1] .= "GPRINT:bytes_all:LAST:\"%6.2lf%sB last\" " ;
$def[1] .= "GPRINT:bytes_all:AVERAGE:\"%6.2lf%sB avg\" " ;
$def[1] .= "GPRINT:bytes_all:MAX:\"%6.2lf%sB max\\l\" ";
 
$def[1] .= "LINE1:bytes_rx#157419FF:\"Throughput\: RX\" " ;
$def[1] .= "GPRINT:bytes_rx:LAST:\"%6.2lf%sB last\" " ;
$def[1] .= "GPRINT:bytes_rx:AVERAGE:\"%6.2lf%sB avg\" " ;
$def[1] .= "GPRINT:bytes_rx:MAX:\"%6.2lf%sB max\\n\" ";
 
$def[1] .= "LINE1:bytes_tx#0000EF:\"Throughput\: TX\" " ;
$def[1] .= "GPRINT:bytes_tx:LAST:\"%6.2lf%s last\" " ;
$def[1] .= "GPRINT:bytes_tx:AVERAGE:\"%6.2lf%s avg\" " ;
$def[1] .= "GPRINT:bytes_tx:MAX:\"%6.2lf%s max\\n\" ";
 
$def[1] .= "LINE1:err_enc_in#EACC00:\"Errors\: Encoded In\" " ;
$def[1] .= "GPRINT:err_enc_in:LAST:\"%0.2lf last\" " ;
$def[1] .= "GPRINT:err_enc_in:AVERAGE:\"%6.2lf avg\" " ;
$def[1] .= "GPRINT:err_enc_in:MAX:\"%6.2lf max\\n\" ";
 
$def[1] .= "LINE1:err_enc_out#EA8F00:\"Errors\: Encoded Out\" " ;
$def[1] .= "GPRINT:err_enc_out:LAST:\"%6.2lf last\" " ;
$def[1] .= "GPRINT:err_enc_out:AVERAGE:\"%6.2lf avg\" " ;
$def[1] .= "GPRINT:err_enc_out:MAX:\"%6.2lf max\\n\" " ;
 
$def[1] .= "LINE1:err_trunc#CAF100:\"Errors\: Truncated\" " ;
$def[1] .= "GPRINT:err_trunc:LAST:\"%6.2lf last\" " ;
$def[1] .= "GPRINT:err_trunc:AVERAGE:\"%6.2lf avg\" " ;
$def[1] .= "GPRINT:err_trunc:MAX:\"%6.2lf max\\n\" ";
 
$def[1] .= "LINE1:err_crc#FF0000:\"Errors\: CRC\" " ;
$def[1] .= "GPRINT:err_crc:LAST:\"%6.2lf last\" " ;
$def[1] .= "GPRINT:err_crc:AVERAGE:\"%6.2lf avg\" " ;
$def[1] .= "GPRINT:err_crc:MAX:\"%6.2lf max\\n\" ";
 
$def[1] .= "LINE1:err_toolong#008A6D:\"Errors\: TooLong\" " ;
$def[1] .= "GPRINT:err_toolong:LAST:\"%6.2lf last\" " ;
$def[1] .= "GPRINT:err_toolong:AVERAGE:\"%6.2lf avg\" " ;
$def[1] .= "GPRINT:err_toolong:MAX:\"%6.2lf max\\n\" ";
 
$def[1] .= "LINE1:err_bad_eof#942D0C:\"Errors\: Bad EOF\" " ;
$def[1] .= "GPRINT:err_bad_eof:LAST:\"%6.2lf last\" " ;
$def[1] .= "GPRINT:err_bad_eof:AVERAGE:\"%6.2lf avg\" " ;
$def[1] .= "GPRINT:err_bad_eof:MAX:\"%6.2lf max\\n\" ";
 
$def[1] .= "LINE1:err_c3_timeout#C11700:\"Errors\: C3 Timeout\" " ;
$def[1] .= "GPRINT:err_c3_timeout:LAST:\"%6.2lf last\" " ;
$def[1] .= "GPRINT:err_c3_timeout:AVERAGE:\"%6.2lf avg\" " ;
$def[1] .= "GPRINT:err_c3_timeout:MAX:\"%6.2lf max\\n\" " ;
 
?>
