RAIDIX Health event spam
We have RAIDIX 4.7.1 and stor2rrd 7.00
Every 5min stor2rrd sent empy HW event mail for RAIDIX.
In file /home/stor2rrd/stor2rrd/bin/raidixperf.pl i find string:
When executing this command on RAIDIX, I get response:
Now I change string to:
...and i have nomaly output in "Health status" menu.
Is this change correct for the algoritm of stor2rrd ?
Every 5min stor2rrd sent empy HW event mail for RAIDIX.
In file /home/stor2rrd/stor2rrd/bin/raidixperf.pl i find string:
my $cmd = "jq '[.[] | select(.end == null) | select(.status != \\\"ok\\\")]' /var/lib/raidix/alerts.json;";
When executing this command on RAIDIX, I get response:
raidix-node# jq '[.[] | select(.end == null) | select(.status != "ok")]' /var/lib/raidix/alerts.json
[]
Now I change string to:
my $cmd = "jq '[.[] | select(.end == null) | select(.status)]' /var/lib/raidix/alerts.json;";
...and i have nomaly output in "Health status" menu.
Is this change correct for the algoritm of stor2rrd ?
Comments
-
Hi,we present only NOK alerts, it is how we do that for all storage devices we support.We do not care about "ok" alerts
-
when i use != "ok" shell command output is empty ([]), and stor2rrd does not correctly process this situation: "Health status" empty + e-mail every 5 min.
-
file /home/stor2rrd/stor2rrd/bin/raidixperf.pl:
in sub health_statusmy $cmd = "jq '[.[] | select(.end == null) | select(.status != \\\"ok\\\")]' /var/lib/raidix/alerts.json;";
return - []
...then :my $return = run_ssh_cmd_json($ip,$user,$port,$cmd);
my $scalar = 0;
if (defined $return && $return ne "" && ref($return) eq "ARRAY"){
$scalar = @{$return};
}$scalar = 0 , and we get out of sub health_status
...then in line 135:going to "sub alerts"alerts();
#print Dumper %volumes_stats;
#print "#### volume ip 96/94\n";
#print Dumper $conf;
#print "#### volume ip 100\n";
#print Dumper $conf2;
exit;sub alerts{
my $status = "";By default $status not defined.foreach my $host (keys (%alerts)){
if (defined $alerts{$host} && $alerts{$host} ne ""){
foreach my $errors (keys (%{$alerts{$host}})){
if (defined $alerts{$host}{$errors}{'status'} && $alerts{$host}{$errors}{'status'} ne ""){
if ($alerts{$host}{$errors}{'status'} eq "error" || $status eq "error"){
$status = "error";
}else{
$status = "OK";
}
}
if (defined $alerts->{$host}->{$errors}->{'msg'} && $alerts->{$host}->{$errors}->{'msg'} ne ""){
$error_message[$errors] = $alerts->{$host}->{$errors}->{'msg'};
}
}
}
}And then in the line 1275:
After this code $status remains unchanged because we do not have %alerts## WARNING
if ( $status ne "error" && $status ne "OK" ) {
if ( exists &Xorux_lib::health_status_alerting ) {
Xorux_lib::health_status_alerting($component_name,\@error_message);
}
}
... e-mail for you..
i changed 1276 line toif ( $status ne "error" && $status ne "OK" && $status ne "" ){
... -
Hi @IaroslavB,
you are right, there is a bug. Thank you for reporting this issue.
Here is a fix intended to version 7.00:
NOTE: next version 7.10 which will be released soon will contain this fix as well and some additional changes in that code which will not be compatible with version 7.00. So do not use it for versions 7.10+.Gunzip it and copy to /home/stor2rrd/stor2rrd/bin (755, stor2rrd owner)-rwxrwxr-x 1 stor2rrd stor2rrd 51568 Jan 26 09:48 raidixperf.plIf your web browser gunzips it automatically then just rename it: mv raidixperf.pl.gz raidixperf.plAssure that file size is the same as on above example
Howdy, Stranger!
Categories
- 1.6K All Categories
- 48 XORMON NG
- 25 XORMON
- 153 LPAR2RRD
- 13 VMware
- 16 IBM i
- 2 oVirt / RHV
- 4 MS Windows and Hyper-V
- Solaris / OracleVM
- XenServer / Citrix
- Nutanix
- 7 Database
- 2 Cloud
- 10 Kubernetes / OpenShift / Docker
- 124 STOR2RRD
- 19 SAN
- 7 LAN
- 17 IBM
- 3 EMC
- 12 Hitachi
- 5 NetApp
- 15 HPE
- Lenovo
- 1 Huawei
- 2 Dell
- Fujitsu
- 2 DataCore
- INFINIDAT
- 3 Pure Storage
- Oracle