#3867 errors in monitor.pl preventing pager notifications

1.530
closed-fixed
Jamie Cameron
5
2011-03-15
2011-03-14
SKaLVaRo
No

OS: CentOS (2.6.18-194.32.1.el5)
Webmin: 1.530

Some errors in monitor.pl prevent notifications to be sent to a pager.
1. The message for the pager is never created as there is no section in sub make_message for the pager message if one uses the built-in webmin templates
Solution insert below code in sub make_message.
elsif ($type eq 'pager') {
return &text('monitor_pager_'.$suffix,
$host, $serv->{'desc'}, $now);
}

2. The command for the pager is never executed because a test before the command always fails in sub send_status_pager.
Solution: substitute the test
return if (!&has_command($config{'pager_cmd'}));
with
return if (!$config{'pager_cmd'});

Kr,
SKaLVaRo

Discussion

  • Jamie Cameron
    Jamie Cameron
    2011-03-15

    Thanks! I will include this fix in Webmin 1.540.

     
  • Jamie Cameron
    Jamie Cameron
    2011-03-15

    • status: open --> closed-fixed