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

[check_fortigate.pl]: unkown mem-sys #75

Closed
sgruber94 opened this issue Oct 14, 2021 · 6 comments · May be fixed by #76
Closed

[check_fortigate.pl]: unkown mem-sys #75

sgruber94 opened this issue Oct 14, 2021 · 6 comments · May be fixed by #76

Comments

@sgruber94
Copy link
Contributor

Hi,
sorry for the delay.
i have try the new script but i have a mistake

./check_fortigate.pl -H A.B.C.D -C [COMUNITY] -p [FORTISERIAL_PATH] -T mem-sys
UNKNOWN: OID .1.3.6.1.4.1.12356.101.4.1.4.0.1 does not exist

The script add the .1 for the master and .2 for the slave, but this OID doesn't exist

Originally posted by @VincentROLLAND in #59 (comment)

@sgruber94
Copy link
Contributor Author

sgruber94 commented Oct 14, 2021

I opened a new issue for tracking this issue down.

I discovered the problem of that. It's the handling about the health check.
Sadly I haven't any FGT 201 or FGT 60 Cluster, so I can't verify Cluster State

The Issue is, that the Value adds an .1 and .2 instead of nothing.

We can replace the HC with another function (internal change) or adding a Mode to the health check and try to call a "mode" for particular checks)

if ( $slave == 1 ) {
$oid = $_[0] . ".2";
$label = "slave_" . $label;
} elsif ( $curr_serial =~ /^FG100A/ ) {
$oid = $_[0];
} elsif ( $curr_serial =~ /^FG201/ ) {
$oid = $_[0];
} elsif ( $curr_serial =~ /^FG/ ) {
$oid = $_[0] . ".1";
} else {
$oid = $_[0];
}

@sgruber94 sgruber94 changed the title unkown mem-sys [check_fortigate.pl]: unkown mem-sys Oct 14, 2021
@sgruber94
Copy link
Contributor Author

@VincentROLLAND take a look and test it please.

@VincentROLLAND
Copy link

Hi,

Sorry i was out of office, i have try the scrypt with 0e9b802, but it add again the .1 for master and .2 for slave:

./check_fortigate.pl -H A.B.C.D -C [COMMUNITY] -p [FORTISERIAL_PATH] -T cpu-sys
UNKNOWN: OID .1.3.6.1.4.1.12356.101.4.1.3.0.1 does not exist

./check_fortigate.pl -H A.B.C.D -C [COMMUNITY] -p [FORTISERIAL_PATH] -T mem-sys
UNKNOWN: OID .1.3.6.1.4.1.12356.101.4.1.4.0.1 does not exist

./check_fortigate.pl -H A.B.C.D -C [COMMUNITY] -p [FORTISERIAL_PATH] -T cpu-sys -s
UNKNOWN: OID .1.3.6.1.4.1.12356.101.4.1.3.0.2 does not exist

./check_fortigate.pl -H A.B.C.D -C [COMMUNITY] -p [FORTISERIAL_PATH] -T mem-sys -s
UNKNOWN: OID .1.3.6.1.4.1.12356.101.4.1.4.0.2 does not exist

@VincentROLLAND
Copy link

in fact i have try the same script than 1.8.10 with this link

if ( $slave == 1 ) {
$oid = $_[0] . ".2";
$label = "slave_" . $label;
} elsif ( $curr_serial =~ /^FG100A/ ) {
$oid = $_[0];
} elsif ( $curr_serial =~ /^FG201/ ) {
$oid = $_[0];
} elsif ( $curr_serial =~ /^FG/ ) {
$oid = $_[0] . ".1";
} else {
$oid = $_[0];
}

i'm not used to with github...
Could you provide me the link?

@sgruber94
Copy link
Contributor Author

@VincentROLLAND
Copy link

Hi,
it's OK and reflect the memory form fortigate GUI:
./check_fortigate.pl.1 -H A.B.C.D -C [COMMUNITY] -p [FORTISERIAL_PATH] -T mem-sys
OK: A.B.C.D (Current device: [FORTISERIAL]) Memory is okay: 60%|'memory'=60%;80;90

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

Successfully merging a pull request may close this issue.

3 participants