forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of adellam/ansible-roles into master
This commit is contained in:
commit
bbee6c924c
|
@ -609,7 +609,7 @@ if ($@) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
my $Version='2.4';
|
my $Version='2.4.1';
|
||||||
|
|
||||||
############### BASE DIRECTORY FOR TEMP FILE (override this with -F) ########
|
############### BASE DIRECTORY FOR TEMP FILE (override this with -F) ########
|
||||||
my $o_base_dir="/tmp/tmp_Nagios_int.";
|
my $o_base_dir="/tmp/tmp_Nagios_int.";
|
||||||
|
@ -1667,6 +1667,27 @@ sub getdata_localhost {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!$int_lines && scalar(@words)>2 && $words[1] =~ /flags=.*/) {
|
||||||
|
if (int_name_match($words[0])) {
|
||||||
|
$interfaces[$num_int] = {
|
||||||
|
'descr' => $words[0], 'admin_up'=> $status{'DOWN'}, 'oper_up'=> $status{'DOWN'}, # considered common between SNMP and local checks
|
||||||
|
'in_bytes' => 0, 'out_bytes' => 0, 'in_packets' => 0, 'out_packets' => 0, # considered common, but packets are not used
|
||||||
|
'in_errors' => 0, 'out_errors' => 0, # considered common
|
||||||
|
'in_dropped' => 0, 'out_dropped' => 0, # common, same as discards for SNMP
|
||||||
|
'in_overruns' => 0, 'out_overruns' => 0, # added to errors if not 0
|
||||||
|
'collisions' => 0, 'txqueuelen' => 0, 'metric' => 0, 'MTU'=>0 # linux-specific names, not really used
|
||||||
|
};
|
||||||
|
foreach(@words) {
|
||||||
|
if ($_ =~ /.*UP.*/) { $interfaces[$num_int]{'admin_up'} = $status{'UP'}; }
|
||||||
|
if ($_ =~ /.*RUNNING.*/) { $interfaces[$num_int]{'oper_up'} = $status{'UP'}; }
|
||||||
|
}
|
||||||
|
$int_lines=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif ($int_lines && scalar(@words)<2) {
|
||||||
|
$int_lines=0;
|
||||||
|
$num_int++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finish_shell_command($shell_ref);
|
finish_shell_command($shell_ref);
|
||||||
if ($check_speed) {
|
if ($check_speed) {
|
||||||
|
|
|
@ -41,8 +41,7 @@ command[global_check_linux_raid]={{ nagios_plugins_dir }}/check_raid
|
||||||
command[global_check_smart]={{ nagios_local_plugdir }}/check_smart -d $ARG1$ -i $ARG2$
|
command[global_check_smart]={{ nagios_local_plugdir }}/check_smart -d $ARG1$ -i $ARG2$
|
||||||
|
|
||||||
# Network interfaces
|
# Network interfaces
|
||||||
#command[global_net_interfaces]={{ nagios_local_plugdir }}/check_netint.pl -K -f -e
|
command[global_net_interfaces]={{ nagios_local_plugdir }}/check_netint.pl -K -f -e -D -S -n \(l\|eth\|p\|bond\|\xen\|en\|es\)
|
||||||
command[global_net_interfaces]={{ nagios_local_plugdir }}/check_netint.pl -K -f -e -D -S -n \(l\|eth\|p\|bond\)
|
|
||||||
|
|
||||||
# Restart ntp (via handler)
|
# Restart ntp (via handler)
|
||||||
command[global_restart_ntp]=/usr/bin/sudo /etc/init.d/ntp start
|
command[global_restart_ntp]=/usr/bin/sudo /etc/init.d/ntp start
|
||||||
|
|
Loading…
Reference in New Issue