2012-03-07 Sancho Lerena <slerena@artica.es>
* util/pandora_xml_stress.conf util/pandora_xml_stress.pl: Now xml_stress tool can use units in the XML generated files. Default configuration file is useful to generate "real" scenarios. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5714 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
24874818f3
commit
ec57fe6476
|
@ -1,5 +1,10 @@
|
||||||
2012-03-07 Sancho Lerena <slerena@artica.es>
|
2012-03-07 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
|
* util/pandora_xml_stress.conf
|
||||||
|
util/pandora_xml_stress.pl: Now xml_stress tool can use units
|
||||||
|
in the XML generated files. Default configuration file is useful
|
||||||
|
to generate "real" scenarios.
|
||||||
|
|
||||||
* lib/PandoraFMS/Core.pm: Updated version.
|
* lib/PandoraFMS/Core.pm: Updated version.
|
||||||
|
|
||||||
* lib/PandoraFMS/DataServer.pm: Support for "UNIT" tag in the
|
* lib/PandoraFMS/DataServer.pm: Support for "UNIT" tag in the
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
# Maximum number of threads, by default 10.
|
# Sample configuration file for pandora_xmlstress
|
||||||
max_threads 10
|
# (c) 2012, http://pandorafms.org
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Maximum number of threads, by default 5
|
||||||
|
max_threads 5
|
||||||
|
|
||||||
# File containing a list of agent names (one per line).
|
# File containing a list of agent names (one per line).
|
||||||
agent_file agent_names.txt
|
agent_file /tmp/agent_names.txt
|
||||||
|
|
||||||
# Directory where XML data files will be placed, by default /tmp.
|
# Directory where XML data files will be placed, by default /tmp.
|
||||||
# When sending files to a local Tentacle server make sure this directory
|
# When sending files to a local Tentacle server make sure this directory
|
||||||
|
@ -28,17 +32,17 @@ os_version 2.6
|
||||||
agent_interval 300
|
agent_interval 300
|
||||||
|
|
||||||
# Data file generation start date, by default now.
|
# Data file generation start date, by default now.
|
||||||
time_from 2009-06-01 00:00:00
|
time_from 2012-03-01 00:00:00
|
||||||
|
|
||||||
# Data file generation end date, by default now.
|
# Data file generation end date, by default now.
|
||||||
time_to 2009-06-05 00:00:00
|
time_to 2012-03-08 00:00:00
|
||||||
|
|
||||||
# Get conf from Pandora Server
|
# Get conf from Pandora Server
|
||||||
get_and_send_agent_conf 1
|
get_and_send_agent_conf 0
|
||||||
|
|
||||||
# Delay after generating the first data file for each agent to avoid
|
# Delay after generating the first data file for each agent to avoid
|
||||||
# race conditions when auto-creating the agent, by default 2.
|
# race conditions when auto-creating the agent, by default 2.
|
||||||
startup_delay 2
|
startup_delay 1
|
||||||
|
|
||||||
# Timezone offset: Difference with the server timezone
|
# Timezone offset: Difference with the server timezone
|
||||||
timezone_offset 0
|
timezone_offset 0
|
||||||
|
@ -73,38 +77,64 @@ position_radius 10
|
||||||
# Module definitions. Similar to pandora_agent.conf.
|
# Module definitions. Similar to pandora_agent.conf.
|
||||||
|
|
||||||
module_begin
|
module_begin
|
||||||
module_name Module 1
|
module_name Connections opened
|
||||||
module_type generic_data
|
module_type generic_data
|
||||||
module_description A long description.
|
module_description Network connections used in this machine
|
||||||
module_max 100
|
module_exec type=RANDOM;variation=20;min=50;max=500
|
||||||
module_min 10
|
module_unit conns
|
||||||
module_exec type=RANDOM;variation=60;min=20;max=80
|
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
module_begin
|
module_begin
|
||||||
module_name Module 2
|
module_name Network Traffic (Incoming)
|
||||||
module_type generic_data
|
module_type generic_data
|
||||||
module_description A long description.
|
module_description Network throughtput for incoming data
|
||||||
module_max 80
|
module_exec type=RANDOM;variation=50;min=0;max=100000
|
||||||
module_min 20
|
module_unit kbit/sec
|
||||||
module_exec type=SCATTER;prob=1;avg=40;min=0;max=80
|
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
|
module_begin
|
||||||
|
module_name Network Traffic (Outgoing)
|
||||||
|
module_type generic_data
|
||||||
|
module_description Network throughtput for Outgoing data
|
||||||
|
module_exec type=RANDOM;variation=50;min=0;max=100000
|
||||||
|
module_unit kbit/sec
|
||||||
|
module_end
|
||||||
|
|
||||||
module_begin
|
module_begin
|
||||||
module_name Module 3
|
module_name Server Status
|
||||||
|
module_type generic_proc
|
||||||
|
module_description Status of my super-important daemon / service / process
|
||||||
|
module_exec type=RANDOM;variation=5;min=0;max=1
|
||||||
|
module_end
|
||||||
|
|
||||||
|
module_begin
|
||||||
|
module_name CPU Usage
|
||||||
module_type generic_data
|
module_type generic_data
|
||||||
module_description A long description.
|
module_description % of CPU usage in this machine
|
||||||
module_max 80
|
module_unit %
|
||||||
module_min 20
|
module_exec type=SCATTER;prob=5;avg=10;min=0;max=80
|
||||||
|
module_end
|
||||||
|
|
||||||
|
module_begin
|
||||||
|
module_name Disk_Free
|
||||||
|
module_type generic_data
|
||||||
|
module_description Disk space available in MB.
|
||||||
|
module_unit MB
|
||||||
|
module_exec type=SCATTER;prob=2;avg=1000;min=200;max=1200
|
||||||
module_exec type=CURVE;min=20;max=80;time_wave_length=3600;time_offset=0
|
module_exec type=CURVE;min=20;max=80;time_wave_length=3600;time_offset=0
|
||||||
module_end
|
module_end
|
||||||
|
|
||||||
module_begin
|
module_begin
|
||||||
module_name Module 4
|
module_name Memory_free
|
||||||
module_type generic_data_string
|
module_type generic_data
|
||||||
module_description A long description.
|
module_description RAM memory available in MB.
|
||||||
module_max 100
|
module_unit MB
|
||||||
module_min 10
|
module_exec type=CURVE;min=5;max=8000;time_wave_length=360000;time_offset=0
|
||||||
module_exec type=RANDOM;variation=60;min=20;max=80
|
module_end
|
||||||
|
|
||||||
|
module_begin
|
||||||
|
module_name System Log File
|
||||||
|
module_type generic_data_string
|
||||||
|
module_description Messages from the system in logfile format
|
||||||
|
module_exec type=RANDOM;variation=60;min=40;max=40
|
||||||
module_end
|
module_end
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Pandora XML Stress tool.
|
# Pandora XML Stress tool.
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (c) 2009 Ramon Novoa, rnovoa@artica.es
|
# Copyright (c) 2009 Ramon Novoa, rnovoa@artica.es
|
||||||
# Copyright (c) 2009 Artica Soluciones Tecnologicas S.L.
|
# Copyright (c) 2012 Artica Soluciones Tecnologicas S.L.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
|
@ -147,6 +147,8 @@ sub generate_xml_files ($$$$$$) {
|
||||||
# Read module configuration
|
# Read module configuration
|
||||||
my $module_type = get_conf_token ($module, 'module_type', 'generic_data');
|
my $module_type = get_conf_token ($module, 'module_type', 'generic_data');
|
||||||
my $module_description = get_conf_token ($module, 'module_description', '');
|
my $module_description = get_conf_token ($module, 'module_description', '');
|
||||||
|
my $module_unit = get_conf_token ($module, 'module_unit', '');
|
||||||
|
|
||||||
#my $module_min = get_conf_token ($module, 'module_min', '0');
|
#my $module_min = get_conf_token ($module, 'module_min', '0');
|
||||||
#my $module_max = get_conf_token ($module, 'module_max', '255');
|
#my $module_max = get_conf_token ($module, 'module_max', '255');
|
||||||
#my $module_variation = get_conf_token ($module, 'module_variation', '100');
|
#my $module_variation = get_conf_token ($module, 'module_variation', '100');
|
||||||
|
@ -168,8 +170,7 @@ sub generate_xml_files ($$$$$$) {
|
||||||
$xml_data .= "\t\t<name>$module_name</name>\n";
|
$xml_data .= "\t\t<name>$module_name</name>\n";
|
||||||
$xml_data .= "\t\t<description>$module_description</description>\n";
|
$xml_data .= "\t\t<description>$module_description</description>\n";
|
||||||
$xml_data .= "\t\t<type>$module_type</type>\n";
|
$xml_data .= "\t\t<type>$module_type</type>\n";
|
||||||
|
$xml_data .= "\t\t<unit><![CDATA[$module_unit]]></unit>\n";
|
||||||
|
|
||||||
|
|
||||||
# Generate data
|
# Generate data
|
||||||
my $rnd_data = $module->{'module_data'};
|
my $rnd_data = $module->{'module_data'};
|
||||||
|
|
Loading…
Reference in New Issue