ThreshDir: /path/to/temp/directory
    ThreshMaxI[target.name]: 1234
    ThreshMinI[target.name]: 99
    ThreshMaxO[target.name]: 8259
    ThreshMinO[target.name]: 1
    ThreshProgI[target.name]: /path/to/some/scripts/threshprogramname
    ThreshProgO[target.name]: /path/to/some/scripts/anotherprogramname
    ThreshProgOKI[target.name]: /path/to/some/scripts/yetanotherthreshprogramname
    ThreshProgOKO[target.name]: /path/to/some/scripts/andanotherprogramname
    #!/usr/local/bin/perl
    #
    # Called when MRTG detects a threshold problem for a variable.
    # ARGV[0] = Parameter name, such as 'wanrouter.cpu'.
    # ARGV[1] = Threshold value which was breached, such as "99".
    # ARGV[2] = Actual current value of the parameter, such as "100".
    #
    # Command line looks like:
    # thisprogram wanrouter.cpu 99 100
    #
    my($timestr, $param, $thresh, $value, $message, $logfile);
    $timestr = localtime(time);
    $param = $ARGV[0];
    $thresh = $ARGV[1];
    $value = $ARGV[2];
   
    $logfile = "/tmp/mrtgthresh.log";
    $emailprog = "/usr/ucb/mail -s 'MRTG Thresh'";
    $emailuser = "adminuser@mycompany.com";
   
    #
    # Do something meaningful with the information.
    # Send an email message, log to a file, execute some script...
    #
   
    if ($thresh > $value) { $abovebelow = "below"; }
    else { $abovebelow = "above"; }
    $message .= "$param ($value) is $abovebelow threshold ($thresh)";
   
    # Log it.
    open(LOG, ">>$logfile");
    print LOG "$timestr $message\n";
    close(LOG);
   
    # Email it.
    system("echo '$message' | $emailprog $emailuser");
   
    exit(0);
    c:\path\to\perl c:\path\to\some\script\programname %1 %2 %3     exit
    WorkDir: /usr/mrtg/data/wanrouter     ThreshDir: /usr/mrtg/tmp-thresh         Target[wanrouter.cpu]: 1.3.6.1.4.1.9.2.1.56.0&1.3.6.1.4.1.9.2.1.56.0:public@wanrouter     MaxBytes[wanrouter.cpu]: 100     Title[wanrouter.cpu]: wanrouter - CPU Usage (%)     PageTop[wanrouter.cpu]: <H2>wanrouter - CPU Usage (%)</H2>     YLegend[wanrouter.cpu]: CPU Usage (%)     ShortLegend[wanrouter.cpu]: %     Legend2[wanrouter.cpu]: CPU Usage     LegendO[wanrouter.cpu]: Usage:     Options[wanrouter.cpu]: growright, nopercent, gauge     ThreshMaxI[wanrouter.cpu]: 95     ThreshProgI[wanrouter.cpu]: /usr/mrtg/script/threshprogi     ThreshProgOKI[wanrouter.cpu]: /usr/mrtg/script/threshprogoki
    /usr/mrtg/script/threshprogi wanrouter.cpu 95 98
    /usr/mrtg/script/threshprogoki wanrouter.cpu 55