mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2012-05-10 Sergio Martin <sergio.martin@artica.es>
* unix/Linux/pandora_agent.conf unix/pandora_agent: Added units parameter to the agent and added units to the default modules in conf for pending task #3520530 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6290 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e77a0c72be
commit
7991c75119
@ -1,3 +1,10 @@
|
|||||||
|
2012-05-10 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* unix/Linux/pandora_agent.conf
|
||||||
|
unix/pandora_agent: Added units parameter to the
|
||||||
|
agent and added units to the default modules in
|
||||||
|
conf for pending task #3520530
|
||||||
|
|
||||||
2012-05-08 Dario Rodriguez <dario.rodriguez@artica.es>
|
2012-05-08 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
* unix/Linux/pandora_agent.conf: Fixed an example module name.
|
* unix/Linux/pandora_agent.conf: Fixed an example module name.
|
||||||
|
@ -168,6 +168,7 @@ module_min_warning 70
|
|||||||
module_max_warning 90
|
module_max_warning 90
|
||||||
module_min_critical 91
|
module_min_critical 91
|
||||||
module_max_critical 100
|
module_max_critical 100
|
||||||
|
module_unit %
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
#Get load average
|
#Get load average
|
||||||
@ -188,6 +189,7 @@ module_min_warning 500
|
|||||||
module_max_warning 600
|
module_max_warning 600
|
||||||
module_min_critical 100
|
module_min_critical 100
|
||||||
module_max_critical 499
|
module_max_critical 499
|
||||||
|
module_unit MB
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
#Count total number of processes
|
#Count total number of processes
|
||||||
@ -200,6 +202,7 @@ module_min_warning 150
|
|||||||
module_max_warning 249
|
module_max_warning 249
|
||||||
module_min_critical 250
|
module_min_critical 250
|
||||||
module_max_critical 300
|
module_max_critical 300
|
||||||
|
module_unit processes
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
# Process information
|
# Process information
|
||||||
@ -220,7 +223,7 @@ module_exec last | head -1
|
|||||||
module_description Monitor last user loggin
|
module_description Monitor last user loggin
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
# Module that get the number or cron file
|
# Module that get the number of cron file
|
||||||
# This module uses a precondition, if cron is running the
|
# This module uses a precondition, if cron is running the
|
||||||
# module will check the folder /etc/cron.d to get the number of files
|
# module will check the folder /etc/cron.d to get the number of files
|
||||||
module_begin
|
module_begin
|
||||||
@ -229,6 +232,7 @@ module_type async_string
|
|||||||
module_precondition =~ .*cron.* ps aux | grep cron
|
module_precondition =~ .*cron.* ps aux | grep cron
|
||||||
module_exec ls -l /etc/cron.d | awk 'NR>1 {print $0}' | wc -l
|
module_exec ls -l /etc/cron.d | awk 'NR>1 {print $0}' | wc -l
|
||||||
module_description Number of cron task files
|
module_description Number of cron task files
|
||||||
|
module_unit files
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
|
|
||||||
|
@ -356,6 +356,7 @@ sub parse_conf_modules($) {
|
|||||||
'intensive_conditions' => [],
|
'intensive_conditions' => [],
|
||||||
'intensive_match' => 0,
|
'intensive_match' => 0,
|
||||||
'timestamp' => 0,
|
'timestamp' => 0,
|
||||||
|
'unit' => '',
|
||||||
};
|
};
|
||||||
} elsif ($line =~ /^\s*module_name\s+(.+)$/) {
|
} elsif ($line =~ /^\s*module_name\s+(.+)$/) {
|
||||||
$module->{'name'} = $1;
|
$module->{'name'} = $1;
|
||||||
@ -498,6 +499,9 @@ sub parse_conf_modules($) {
|
|||||||
# Min ff event
|
# Min ff event
|
||||||
} elsif ($line =~ /^\s*module_min_ff_event\s+(.*)\s*$/) {
|
} elsif ($line =~ /^\s*module_min_ff_event\s+(.*)\s*$/) {
|
||||||
$module->{'min_ff_event'} = $1;
|
$module->{'min_ff_event'} = $1;
|
||||||
|
# Unit
|
||||||
|
} elsif ($line =~ /^\s*module_unit\s+(\S+)\s*$/) {
|
||||||
|
$module->{'unit'} = $1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1580,6 +1584,9 @@ sub write_module_xml ($@) {
|
|||||||
|
|
||||||
# Min ff event
|
# Min ff event
|
||||||
$Xml .= " <min_ff_event>" . $module->{'min_ff_event'} . "</min_ff_event>\n" if (defined ($module->{'min_ff_event'}));
|
$Xml .= " <min_ff_event>" . $module->{'min_ff_event'} . "</min_ff_event>\n" if (defined ($module->{'min_ff_event'}));
|
||||||
|
|
||||||
|
# Unit
|
||||||
|
$Xml .= " <unit>" . $module->{'unit'} . "</unit>\n" if (defined ($module->{'unit'}));
|
||||||
|
|
||||||
# Data list
|
# Data list
|
||||||
if ($#data > 0) {
|
if ($#data > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user