mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-23 05:35:01 +02:00
align data -> indompting
git-svn-id: http://svn.centreon.com/Plugins/Dev@2445 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
65435306cf
commit
c30f7e7d00
@ -81,9 +81,7 @@ print_usage();
|
|||||||
exit $ERRORS{'OK'};
|
exit $ERRORS{'OK'};
|
||||||
}
|
}
|
||||||
my $snmp = "1";
|
my $snmp = "1";
|
||||||
if ($opt_v && $opt_v =~ /^[0-9]$/) {
|
$snmp = $opt_v if ($opt_v && $opt_v =~ /^[0-9]$/);
|
||||||
$snmp = $opt_v;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($snmp eq "3") {
|
if ($snmp eq "3") {
|
||||||
if (!$opt_u) {
|
if (!$opt_u) {
|
||||||
@ -99,9 +97,7 @@ exit $ERRORS{'OK'};
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$opt_C) {
|
$opt_C = "public" if (!$opt_C);
|
||||||
$opt_C = "public";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $process;
|
my $process;
|
||||||
if(!$opt_p) {
|
if(!$opt_p) {
|
||||||
@ -154,16 +150,13 @@ foreach my $key (oid_lex_sort(keys %$result)) {
|
|||||||
my @oid_list = split (/\./,$key);
|
my @oid_list = split (/\./,$key);
|
||||||
$process_list{$$result{$key}} = pop (@oid_list) ;
|
$process_list{$$result{$key}} = pop (@oid_list) ;
|
||||||
if (defined($opt_p) && $opt_p ne ""){
|
if (defined($opt_p) && $opt_p ne ""){
|
||||||
if ($$result{$key} eq $opt_p){
|
$proc++ if ($$result{$key} eq $opt_p);
|
||||||
$proc++;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$proc++;
|
$proc++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($opt_n))
|
if (!($opt_n)) {
|
||||||
{
|
|
||||||
if ($process_list{$process}) {
|
if ($process_list{$process}) {
|
||||||
$result = $session->get_request(-varbindlist => [$OID_SW_RunStatus . "." . $process_list{$process}]);
|
$result = $session->get_request(-varbindlist => [$OID_SW_RunStatus . "." . $process_list{$process}]);
|
||||||
if (!defined($result)) {
|
if (!defined($result)) {
|
||||||
@ -212,4 +205,3 @@ sub print_help () {
|
|||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user