mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'ent-9221-12537-tipos-incorrectos-plugin-mysql-server-advanced-plugin' into 'develop'
adding new parameter check_type for define types of modules See merge request artica/pandorafms!5169
This commit is contained in:
commit
0cf113f040
@ -303,6 +303,10 @@ sub parse_config {
|
|||||||
if ($parametro =~ m/^check\_name\s(.*)/i) {
|
if ($parametro =~ m/^check\_name\s(.*)/i) {
|
||||||
$checks[$plugin_setup{"numchecks"}]{'check_name'} = trim($1);
|
$checks[$plugin_setup{"numchecks"}]{'check_name'} = trim($1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($parametro =~ m/^check\_type\s(.*)/i) {
|
||||||
|
$checks[$plugin_setup{"numchecks"}]{'check_type'} = trim($1);
|
||||||
|
}
|
||||||
|
|
||||||
if ($parametro =~ m/^check\_schema\s(.*)/i) {
|
if ($parametro =~ m/^check\_schema\s(.*)/i) {
|
||||||
$checks[$plugin_setup{"numchecks"}]{'check_schema'} = trim($1);
|
$checks[$plugin_setup{"numchecks"}]{'check_schema'} = trim($1);
|
||||||
@ -1015,6 +1019,7 @@ foreach (@checks) {
|
|||||||
my $check_show = $_->{'show'};
|
my $check_show = $_->{'show'};
|
||||||
my $return_type = $_->{'return_type'};
|
my $return_type = $_->{'return_type'};
|
||||||
my $check_name = $_->{'check_name'};
|
my $check_name = $_->{'check_name'};
|
||||||
|
my $check_type = $_->{'check_type'};
|
||||||
|
|
||||||
$result_check = 0;
|
$result_check = 0;
|
||||||
# Process check (System parameters)
|
# Process check (System parameters)
|
||||||
@ -1156,7 +1161,7 @@ foreach (@checks) {
|
|||||||
print_module("MySQL_" . $type . '_' . $check_show, $module_type, $result_check, '', $check_status);
|
print_module("MySQL_" . $type . '_' . $check_show, $module_type, $result_check, '', $check_status);
|
||||||
} else {
|
} else {
|
||||||
if (defined($check_name)) {
|
if (defined($check_name)) {
|
||||||
print_module("MySQL_" . $type . "_" . $check_name, $module_type, $result_check, '', $check_status);
|
print_module("MySQL_" . $type . "_" . $check_name, $check_type, $result_check, '', $check_status);
|
||||||
} else {
|
} else {
|
||||||
print_module("MySQL_" . $type, $module_type, $result_check, '', $check_status);
|
print_module("MySQL_" . $type, $module_type, $result_check, '', $check_status);
|
||||||
}
|
}
|
||||||
@ -1186,3 +1191,4 @@ foreach (@checks) {
|
|||||||
|
|
||||||
} # type ne 'unknown'
|
} # type ne 'unknown'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user