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
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