#!/usr/bin/perl
$CheckNTPath='/usr/lib/nagios/plugins';

$PingCommandsPending  = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\MSExchange ActiveSync\\Ping Commands Pending"`;
chomp $PingCommandsPending;
$SyncCommandsPending      = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\MSExchange ActiveSync\\Sync Commands Pending"`;
chomp $SyncCommandsPending;
$RequestsQueued      = `$CheckNTPath/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\MSExchange ActiveSync\\Requests Queued"`;
chomp $RequestsQueued;

print "PingCommandsPending:"      . $PingCommandsPending .
     " SyncCommandsPending:"	   . $SyncCommandsPending .
     " RequestsQueued:"            . $RequestsQueued .
     "\n";
