mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-29 08:34:46 +02:00
will not write into cache file if snmpwalk fails
git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@10176 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
8d77c29604
commit
11bb7f796d
@ -240,6 +240,7 @@ else {
|
|||||||
|
|
||||||
if ($mustCreateFile) {
|
if ($mustCreateFile) {
|
||||||
$result = $session->get_table(Baseoid => $OID_DESC);
|
$result = $session->get_table(Baseoid => $OID_DESC);
|
||||||
|
if (defined($result)) {
|
||||||
unless (open(FILE,">".$cacheFile)){
|
unless (open(FILE,">".$cacheFile)){
|
||||||
print "Check mod for temporary file : ".$cacheFile."...\n";
|
print "Check mod for temporary file : ".$cacheFile."...\n";
|
||||||
exit $ERRORS{"UNKNOWN"};
|
exit $ERRORS{"UNKNOWN"};
|
||||||
@ -253,6 +254,7 @@ if ($mustCreateFile) {
|
|||||||
}
|
}
|
||||||
close(FILE);
|
close(FILE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#getting interface using its name instead of its oid index
|
#getting interface using its name instead of its oid index
|
||||||
|
Loading…
x
Reference in New Issue
Block a user