Skip to content

Commit

Permalink
REPLICATION
Browse files Browse the repository at this point in the history
- applied this patch: fatz#5 (comment)
- fix ddversion oid
- it seems that status idle is OK as long as state is normal
  • Loading branch information
dmartinb committed Jan 25, 2021
1 parent d19d269 commit 175756b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nagios_check/check_datadomain
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ GetOptions(
#OIDs
$oids = {
sysname => ".1.3.6.1.2.1.1.5.0",
ddversion => ".1.3.6.1.4.1.19746.1.1.13.1.3",
ddversion => ".1.3.6.1.4.1.19746.1.13.1.3.0",
enclosures => ".1.3.6.1.4.1.19746.1.1.1.1.1.1.1",
psu => ".1.3.6.1.4.1.19746.1.1.1.1.1.1.4",
nvram => ".1.3.6.1.4.1.19746.1.2.3.1.1.3.1",
Expand All @@ -217,7 +217,7 @@ $oids = {
ifname => ".1.3.6.1.2.1.31.1.1.1.1",
ifadstatus => ".1.3.6.1.2.1.2.2.1.7",
ifopstatus => ".1.3.6.1.2.1.2.2.1.8",
fsid => ".1.3.6.1.4.1.19746.1.3.2.1.1.1",
fsid => ".1.3.6.1.4.1.19746.1.3.2.1.1.2",
fsname => ".1.3.6.1.4.1.19746.1.3.2.1.1.3",
fssize => ".1.3.6.1.4.1.19746.1.3.2.1.1.4",
fsused => ".1.3.6.1.4.1.19746.1.3.2.1.1.5",
Expand Down Expand Up @@ -619,7 +619,8 @@ if ($opt_m eq "PSU") {
my $perfname;
foreach (@repl) {
$reason = "";
if ($result->{$oids->{replstatus}.".".$_} == "1") {
if ($result->{$oids->{replstatus}.".".$_} == "1" ||
$result->{$oids->{replstatus}.".".$_} == "6") {
if ($replState->{$replStateTable}->{$result->{$oids->{replstate}.".".$_}} eq "enabled" ||
$replState->{$replStateTable}->{$result->{$oids->{replstate}.".".$_}} eq "normal" ) {
$state = $ERRORS{'OK'};
Expand All @@ -628,8 +629,7 @@ if ($opt_m eq "PSU") {
$reason = "replication pair is not enabled or in a 'normal' state, ";
}
} elsif ($result->{$oids->{replstatus}.".".$_} == "3" ||
$result->{$oids->{replstatus}.".".$_} == "4" ||
$result->{$oids->{replstatus}.".".$_} == "6") {
$result->{$oids->{replstatus}.".".$_} == "4") {
$state = $ERRORS{'WARNING'};
$reason = "status is '".$replStatus->{$result->{$oids->{replstatus}.".".$_}}."', ";
} else {
Expand Down

0 comments on commit 175756b

Please sign in to comment.