#!/usr/bin/perl
$CheckNTPath='/usr/lib/nagios/plugins';

$RPCAverageLatency  = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\MSExchangeIS Client (*)\\RPC Average Latency"`;
chomp $RPCAverageLatency;
$ClientRPCsFailedServerTooBusysec      = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\MSExchangeIS\\Client: RPCs Failed:Server Too Busy/sec"`;
chomp $ClientRPCsFailedServerTooBusysec;

print "RPCAverageLatency:"    					  . $RPCAverageLatency .
     " ClientRPCsFailedServerTooBusysec:"   	  . $ClientRPCsFailedServerTooBusysec .
     "\n";
