[note -- sorry if this is a duplicate, I had trouble sending the first time]

Hi all,
        I think I fixed what may be considered a bug in mon.  It causes unexpected results, so that's how I would classify it.  We are currently testing mon 1.1.0-pre1, but the same problem existed in the previous version we used, 1.0.0-pre4.

        It appears that the environment variable MON_LAST_OUTPUT doesn't get set until after the first alert has already been called.  This was causing a problem where our alert script could not run because it couldn't find the (MON_LAST_)output that was supposed to have been generated by the monitor script until the SECOND alert was triggered.  We would never actually receive the first alert because our alert script couldn't find the MON_LAST_OUTPUT variable.

        I find it hard to believe that nobody else has had this problem.  Are we doing something wrong?  Was this done this way by design?

Here is a diff of the changes I made to v1.1.0-pre1...
       
3219a3220,3223
>     $sref->{"_last_output"} = $output;
>     $sref->{"_last_summary"} = $summary;
>     $sref->{"_last_detail"} = $detail;
>
3349,3355d3352
<
<     #
<     # save the output
<     #
<     $sref->{"_last_output"} = $output;
<     $sref->{"_last_summary"} = $summary;
<     $sref->{"_last_detail"} = $detail;
_______________________________________________
mon mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to