Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

[2.8.4] restore broker configuration with clapi generate too much output and input #5011

Closed
kermith72 opened this issue Feb 20, 2017 · 1 comment

Comments

@kermith72
Copy link
Contributor

kermith72 commented Feb 20, 2017


BUG REPORT INFORMATION

Centreon Web version: 2.8.4

Centreon Engine version: 1.7.0

Centreon Broker version: 3.0.3

OS: ISO Centreon 3.4 (CentOS)

Additional environment details (AWS, VirtualBox, physical, etc.):

Steps to reproduce the issue:

  1. Save config with Clapi
  2. Delete configuration engine, broker, poller
  3. Restore config with backup

**Describe the results your results **

The central-broker-master configuration have too much input and ouput. see screenshots
install_glpi2017-02-20_03-47-13_pm
install_glpi2017-02-20_03-47-23_pm
install_glpi2017-02-20_03-57-11_pm

generate a wrong config

?xml version="1.0" encoding="UTF-8"?
centreonBroker
broker_id ![CDATA[5]] /broker_id
broker_name ![CDATA[central-broker-master]] /broker_name
poller_id ![CDATA[2]] /poller_id
poller_name ![CDATA[Central]] /poller_name
module_directory ![CDATA[/usr/share/centreon/lib/centreon-broker]] /module_directory
log_timestamp ![CDATA[1]] /log_timestamp
log_thread_id ![CDATA[1]] /log_thread_id
event_queue_max_size ![CDATA[50000]] /event_queue_max_size
command_file ![CDATA[]] /command_file
input
type ![CDATA[ipv4]] /type
/input
logger
type ![CDATA[file]] /type
/logger
output
type ![CDATA[sql]] /type
/output
input
name ![CDATA[central-broker-master-input]] /name
/input
logger
name ![CDATA[/var/log/centreon-broker/central-broker-master.log]] /name
/logger
output
name ![CDATA[central-broker-master-sql]] /name
retry_interval ![CDATA[60]] /retry_interval
buffering_timeout ![CDATA[0]] /buffering_timeout
type ![CDATA[ipv4]] /type
failover ![CDATA[central-broker-master-sql-output-failover]] /failover
/output
output
name ![CDATA[centreon-broker-master-rrd]] /name
retry_interval ![CDATA[60]] /retry_interval
buffering_timeout ![CDATA[0]] /buffering_timeout
type ![CDATA[storage]] /type
failover ![CDATA[centreon-broker-master-rrd-output-failover]] /failover
/output
output
name ![CDATA[central-broker-master-perfdata]] /name
db_host ![CDATA[172.16.209.106]] /db_host
db_port ![CDATA[2003]] /db_port
db_password ![CDATA[]] /db_password
queries_per_transaction ![CDATA[1000]] /queries_per_transaction
type ![CDATA[graphite]] /type
failover ![CDATA[central-broker-master-perfdata-output-failover]] /failover
/output
output
name ![CDATA[graphite]] /name
/output
output
type ![CDATA[file]] /type
name ![CDATA[central-broker-master-sql-output-failover]] /name
path ![CDATA[/var/lib/centreon-broker/central-broker-master_central-broker-master-sql.retention]] /path
protocol ![CDATA[bbdo]] /protocol
compression ![CDATA[auto]] /compression
max_size ![CDATA[524288000]] /max_size
/output
output
type ![CDATA[file]] /type
name ![CDATA[centreon-broker-master-rrd-output-failover]] /name
path ![CDATA[/var/lib/centreon-broker/central-broker-master_centreon-broker-master-rrd.retention]] /path
protocol ![CDATA[bbdo]] /protocol
compression ![CDATA[auto]] /compression
max_size ![CDATA[524288000]] /max_size
/output
output
type ![CDATA[file]] /type
name ![CDATA[central-broker-master-perfdata-output-failover]] /name
path ![CDATA[/var/lib/centreon-broker/central-broker-master_central-broker-master-perfdata.retention]] /path
protocol ![CDATA[bbdo]] /protocol
compression ![CDATA[auto]] /compression
max_size ![CDATA[524288000]] /max_size
/output
temporary
type ![CDATA[file]] /type
name ![CDATA[central-broker-master-temporary]] /name
path ![CDATA[/var/lib/centreon-broker/central-broker-master.temporary]] /path
protocol ![CDATA[bbdo]] /protocol
compression ![CDATA[auto]] /compression
max_size ![CDATA[524288000]] /max_size
/temporary
stats
type ![CDATA[stats]] /type
name ![CDATA[central-broker-master-stats]] /name
json_fifo ![CDATA[/var/lib/centreon-broker/central-broker-master-stats.json]] /json_fifo
/stats
/centreonBroker

Describe the results you expected:

Additional information you think important (e.g. issue happens only occasionally):

Here is the problem
Output and Input export starts at zero instead of 1
example in centreon-web 2.8.4:
CENTBROKERCFG;ADDOUTPUT;central-broker-master;central-broker-master-sql;sql
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;db_type;mysql
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;failover;
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;retry_interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;buffering_timeout;0
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;db_host;localhost
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;db_port;3306
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;db_user;centreon
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;db_password;password
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;db_name;centreon_storage
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;queries_per_transaction;5000
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;read_timeout;5
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;check_replication;no
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;cleanup_check_interval;
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;instance_timeout;
CENTBROKERCFG;SETOUTPUT;central-broker-master;0;type;sql
CENTBROKERCFG;ADDOUTPUT;central-broker-master;central-broker-master-perfdata;storage
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;retry_interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;buffering_timeout;0
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;failover;
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;length;15552000
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_type;mysql
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_host;localhost
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_port;3306
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_user;centreon
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_password;password
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_name;centreon_storage
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;queries_per_transaction;5000
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;read_timeout;5
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;check_replication;no
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;rebuild_check_interval;
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;store_in_data_bin;yes
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;insert_in_index_data;1
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;type;storage
CENTBROKERCFG;ADDOUTPUT;central-broker-master;central-broker-master-rrd;ipv4
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;port;5670
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;host;127.0.0.1
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;failover;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;retry_interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;buffering_timeout;0
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;protocol;bbdo
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;tls;no
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;private_key;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;public_cert;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;ca_certificate;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;negotiation;yes
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;one_peer_retention_mode;no
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;compression;auto
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;compression_level;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;compression_buffer;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;type;ipv4
Exemple in centreon-web 2.8.3:
CENTBROKERCFG;ADDINPUT;central-broker-master;central-broker-master-input;ipv4
CENTBROKERCFG;SETINPUT;central-broker-master;1;port;5669
CENTBROKERCFG;SETINPUT;central-broker-master;1;buffering_timeout;0
CENTBROKERCFG;SETINPUT;central-broker-master;1;host;
CENTBROKERCFG;SETINPUT;central-broker-master;1;failover;
CENTBROKERCFG;SETINPUT;central-broker-master;1;retry_interval;60
CENTBROKERCFG;SETINPUT;central-broker-master;1;protocol;bbdo
CENTBROKERCFG;SETINPUT;central-broker-master;1;tls;auto
CENTBROKERCFG;SETINPUT;central-broker-master;1;private_key;
CENTBROKERCFG;SETINPUT;central-broker-master;1;public_cert;
CENTBROKERCFG;SETINPUT;central-broker-master;1;ca_certificate;
CENTBROKERCFG;SETINPUT;central-broker-master;1;negociation;yes
CENTBROKERCFG;SETINPUT;central-broker-master;1;compression;auto
CENTBROKERCFG;SETINPUT;central-broker-master;1;compression_level;
CENTBROKERCFG;SETINPUT;central-broker-master;1;compression_buffer;
CENTBROKERCFG;SETINPUT;central-broker-master;1;type;ipv4
CENTBROKERCFG;ADDLOGGER;central-broker-master;/var/log/centreon-broker/central-broker-master.log;file
CENTBROKERCFG;SETLOGGER;central-broker-master;1;config;yes
CENTBROKERCFG;SETLOGGER;central-broker-master;1;debug;no
CENTBROKERCFG;SETLOGGER;central-broker-master;1;error;yes
CENTBROKERCFG;SETLOGGER;central-broker-master;1;info;no
CENTBROKERCFG;SETLOGGER;central-broker-master;1;level;low
CENTBROKERCFG;SETLOGGER;central-broker-master;1;max_size;
CENTBROKERCFG;SETLOGGER;central-broker-master;1;type;file
CENTBROKERCFG;ADDOUTPUT;central-broker-master;central-broker-master-sql;sql
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_type;mysql
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;retry_interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;buffering_timeout;0
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;failover;
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_host;localhost
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_port;3306
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_user;centreon
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_password;password
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;db_name;centreon_storage
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;queries_per_transaction;
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;read_timeout;
CENTBROKERCFG;SETOUTPUT;central-broker-master;1;type;sql
CENTBROKERCFG;ADDOUTPUT;central-broker-master;centreon-broker-master-rrd;ipv4
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;port;5670
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;buffering_timeout;0
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;host;localhost
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;failover;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;retry_interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;protocol;bbdo
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;tls;no
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;private_key;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;public_cert;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;ca_certificate;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;negociation;yes
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;compression;no
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;compression_level;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;compression_buffer;
CENTBROKERCFG;SETOUTPUT;central-broker-master;2;type;ipv4
CENTBROKERCFG;ADDOUTPUT;central-broker-master;central-broker-master-perfdata;storage
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;failover;
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;retry_interval;60
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;buffering_timeout;0
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;length;15552000
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;db_type;mysql
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;db_host;localhost
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;db_port;3306
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;db_user;centreon
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;db_password;password
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;db_name;centreon_storage
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;queries_per_transaction;
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;read_timeout;
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;check_replication;no
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;rebuild_check_interval;
CENTBROKERCFG;SETOUTPUT;central-broker-master;3;type;storage

@kermith72 kermith72 changed the title [2.8.4] restore broker configuration with clapi generate too output and input [2.8.4] restore broker configuration with clapi generate too much output and input Feb 20, 2017
@lpinsivy lpinsivy added this to the 2.8.6 milestone Mar 10, 2017
@lpinsivy lpinsivy modified the milestone: 2.8.6 Apr 20, 2017
@cgagnaire
Copy link

Hi @lpinsivy, @loiclau, @Guillaume28,
Still true in 2.8.22.
As @kermith72 said, there is an offset in input and ouput ids when setting params.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants