Announcement

Collapse
No announcement yet.

Bug check_graph_nrpe.pl...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug check_graph_nrpe.pl...

    Bonjour,

    il apparait que si on obtient connection refused by host, nagios reste en status OK avec le check_graph_nrpe.

    Pour pallier a cela voici la modification a effectuer :

    original :

    ......
    my $result = `/etc/nagios/libexec/check_nrpe -H $opt_H -c $opt_c`;
    my $return_result = $result;
    $return_result =~ /([0-9]+)/;
    $return_result = $1;

    #=== RRDtools update ====

    if ($opt_g) {
    $start=time;
    update_rrd($rrd,$start,$return_result);
    }

    print " $result ";
    .........

    corrigé :

    .........
    my $result = `/etc/nagios/libexec/check_nrpe -H $opt_H -c $opt_c`;
    my $rc = $? / 256;
    my $return_result = $result;
    $return_result =~ /([0-9]+)/;
    $return_result = $1;
    #=== RRDtools update ====

    if ($opt_g) {
    $start=time;
    update_rrd($rrd,$start,$return_result);
    }

    print " $result ";
    exit $rc;
    .......

    voila en espérant que ca arrange certains...

    @++

    Romain
    Cop3rfi3ld


    Nagios 2.2 - Oreon 1.3 RC1 - Mandrake 10.2
Working...
X