Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd number of elements in anonymous hash at ./check_datadomain #5

Open
jpvhack opened this issue Feb 19, 2019 · 4 comments
Open

Odd number of elements in anonymous hash at ./check_datadomain #5

jpvhack opened this issue Feb 19, 2019 · 4 comments

Comments

@jpvhack
Copy link

jpvhack commented Feb 19, 2019

Hello,

I find this problem when testing the script.

Odd number of elements in anonymous hash at ./check_datadomain line 537.Can't use string ("serial") as a HASH ref while "strict refs" in use at ./check_datadomain line 541.

./check_datadomain -H x.x.x.x -C testing -m DISKSTATE

Thanks
Javier

@TompaHompa
Copy link

Hi, I get this error for FSSPACE

./check_datadomain.pl -H x.x.x.x -C someting -m FSSPACE
Can't use an undefined value as an ARRAY reference at ./check_datadomain.pl line 668.

Thanks
/Tommy

@andreas5232
Copy link

Hi, I get this error for FSSPACE

./check_datadomain.pl -H x.x.x.x -C someting -m FSSPACE
Can't use an undefined value as an ARRAY reference at ./check_datadomain.pl line 668.

same here.

Workarounded it by using the following lines:
my @fsid = qw/1 2 4/;
my @o = map { ( $oids->{fsname}.".".$_, $oids->{fssize}.".".$_, $oids->{fsused}.".".$_, $oids->{fsavail}.".".$_, $oids->{fsperc}.".".$_) } @fsid;
$result = $session->get_request(@o);

Didn't have any luck with debugging it further, seems to have something to do with an empty result in
my $req = $oids->{'fsid'};
my $result = $session->get_table($req);

Thanks
Andreas

@habo105
Copy link

habo105 commented Sep 17, 2019

Same problem here with DISKSTATE. It seems this issue occurs with a large amount of disks. When you manually check this is happening about every fifth time.

When you check again it is giving normal output. Changing timeout setting is not solving this.

@Klmakke
Copy link

Klmakke commented Feb 24, 2020

Was getting this,
./check_datadomain.pl -H x.x.x.x -C snmpcom -m FSSPACE
Can't use an undefined value as an ARRAY reference at ./check_datadomain.pl line 743.

The scripts looks for fsid at 1.3.6.1.4.1.19746.1.3.2.1.1.1
line 220:
fsid => ".1.3.6.1.4.1.19746.1.3.2.1.1.1",

But apperently i had no object on that oid
snmpwalk -v 2c -c snmpcom x.x.x.x 1.3.6.1.4.1.19746.1.3.2.1.1.1
SNMPv2-SMI::enterprises.19746.1.3.2.1.1.1 = No Such Object available on this agent at this OID

Did a walk on the file system resource trap index 1.3.6.1.4.1.19746.1.3.2.1.1.2 instead

$ snmpwalk -v 2c -c snmpcom x.x.x.x 1.3.6.1.4.1.19746.1.3.2.1.1.2
SNMPv2-SMI::enterprises.19746.1.3.2.1.1.2.1 = INTEGER: 1
SNMPv2-SMI::enterprises.19746.1.3.2.1.1.2.2 = INTEGER: 2
SNMPv2-SMI::enterprises.19746.1.3.2.1.1.2.3 = INTEGER: 3
SNMPv2-SMI::enterprises.19746.1.3.2.1.1.2.4 = INTEGER: 4
SNMPv2-SMI::enterprises.19746.1.3.2.1.1.2.5 = INTEGER: 5

So i changed line 220 to,
fsid => ".1.3.6.1.4.1.19746.1.3.2.1.1.2",

And are now getting a correct value:
$ ./check_datadomain.pl -H x.x.x.x -C snmpcom -m FSSPACE
OK - 5 filesystem(s) ok
OK - Filesystem Index filled 70% 68.40G available
OK - Filesystem /data: post-comp filled 26% 71868.10G available
OK - Filesystem /data: pre-comp filled 0% 0.00G available
OK - Filesystem /ddvar filled 19% 36.50G available
OK - Filesystem /ddvar/core filled 0% 102.60G available
| 'Index_perc'=70%;75;90;0;100 'Index_avail'=68.4;;;; '/data: post-comp_perc'=26%;75;90;0;100 '/data: post-comp_avail'=71868.1;;;; '/data: pre-comp_perc'=0%;75;90;0;100 '/data: pre-comp_avail'=0.0;;;; '/ddvar_perc'=19%;75;90;0;100 '/ddvar_avail'=36.5;;;; '/ddvar/core_perc'=0%;75;90;0;100 '/ddvar/core_avail'=102.6;;;;

dmartinb added a commit to dmartinb/datadomain-monitoring that referenced this issue Jan 25, 2021
- applied this patch: fatz#5 (comment)
- fix ddversion oid
- it seems that status idle is OK as long as state is normal
@dmartinb dmartinb mentioned this issue Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants