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

Error importing export from nagios #5459

Closed
gl00ten opened this issue Jul 21, 2017 · 12 comments
Closed

Error importing export from nagios #5459

gl00ten opened this issue Jul 21, 2017 · 12 comments

Comments

@gl00ten
Copy link
Contributor

gl00ten commented Jul 21, 2017


BUG REPORT INFORMATION

Centreon Web version:
2.8.5
Centreon Engine version:
duno, just installed the package centreon-central
Centreon Broker version:
duno, just installed the package centreon-central
OS:
debian

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

Steps to reproduce the issue:

  1. on the nagios machine: perl nagios_reader_to_centreon_clapi.pl --config /usr/local/nagios/etc/nagios.cfg > /tmp/centreon_clapi_import_commands.txt
  2. on the centreon machine:
  3. centreon -u admin -p password -i centreon_clapi_import_commands.txt

Describe the results you received:

root@centreondeb:/home/ssarah# centreon -u admin -p password -i ./centreon_clapi_import_commands.txt 
Line 142 : Object already exists (24x7)
Line 150 : Object already exists (none)
Line 151 : Object already exists (workhours)
PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'host_initial_state' in 'field list'' in /usr/share/centreon/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /usr/share/centreon/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /usr/share/centreon/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /usr/share/centreon/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#3 /usr/share/centreon/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('UPDATE host SET...', Array)
#4 /usr/share/centreon/lib/Centreon/Object/Object.php(196): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE host SET...', Array)
#5 /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php(269): Centreon_Object->update('1', Array)
#6 /usr/share/centreon/www/class/centreon-clapi/centreonHost.class.php(439): CentreonClapi\CentreonObject->setparam('1', Array)
#7 /usr/share/centreon/www/class/centreo in /usr/share/centreon/lib/Zend/Db/Statement/Pdo.php on line 234

Describe the results you expected:
a clean import
Any suggestions?

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

@lpinsivy
Copy link
Contributor

Hi,

Column added in Centreon Web 2.8.8. Can you update to latest version of Centreon Web ?

Regards,

@gl00ten
Copy link
Contributor Author

gl00ten commented Jul 24, 2017

Hi @lpinsivy ,

I'm installing on Debian 8 using this repo: http://mirror.sugarbug.web4me.fr/jessie/

Unfortunately it only has version 2.8.5

U have a .deb file somewhere else? :)

Package: centreon-web
Version: 2.8.5-1
Architecture: all
Depends: centreon-broker-cbd ( >=3.0.5 ), centreon-widget-engine-status ( >=1.0.0), centreon-widget-graph-monitoring ( >=1.5.0), centreon-widget-grid-map ( >=1.0.0), centreon-widget-host-monitoring ( >=1.5.2), centreon-widget-hostgroup-monitoring ( >=1.5.0), centreon-widget-httploader ( >=1.0.0), centreon-widget-live-top10-cpu-usage ( >=1.1.0), centreon-widget-live-top10-memory-usage ( >=1.1.0), centreon-widget-service-monitoring ( >=1.5.3), centreon-widget-servicegroup-monitoring ( >=1.5.0), centreon-widget-tactical-overview ( >=1.0.1), centreon-perl-libs ( >=2.8.5), centreon-common (>=2.8.5), php5-intl (>=5.6.9), sudo ( >=1.8.10 ), tofrodos (>=1.7.13), bsd-mailx (>=8.1.2),  lsb-release (>=4.1), libmysqlclient18 (>=5.5.40), apache2-mpm-prefork (>=2.4.10), php5 (>=5.6.9), php5-mysql (>=5.6.9), php5-ldap (>=5.6.9),  php5-snmp (>=5.6.9),  php5-gd (>=5.6.9), php-pear (>=5.6.9), rrdtool (>=1.4.8), libdigest-sha-perl (>=5.93), libgd-perl (>= 2.53), php5-sqlite (>=5.6.9)
Installed-Size: 62716
Maintainer: Eric Coquard <eric.coquard@gmail.com>
Priority: extra
Section: net
Filename: pool/main/c/centreon-web/centreon-web_2.8.5-1_all.deb
Size: 34609444
SHA256: 35b8e12d52bad64578655ef5365dce803d432fd81068f66dbb8fc3a88cad4f38
SHA1: 932f56e4f1d4a4dc9b04907c674a6f4551346df4
MD5sum: 8ca5ff4be3efa7d752bdca969e03cd45
Description: Centreon WebUI
   This package contains WebUI files.
Description-md5: f97c45544eb6b2a54e5287b0fb8d4cf8

@gl00ten
Copy link
Contributor Author

gl00ten commented Aug 18, 2017

Hei, I asked the guy that manages the unofficial debian repo to update the version of Centreon, and (thanks if you read this!) he did.

The problem remains.

PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'host_initial_state' in 'field list'' in /usr/share/centreon/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /usr/share/centreon/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /usr/share/centreon/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /usr/share/centreon/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#3 /usr/share/centreon/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('UPDATE host SET...', Array)
#4 /usr/share/centreon/lib/Centreon/Object/Object.php(198): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE host SET...', Array)
#5 /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php(274): Centreon_Object->update('1', Array)
#6 /usr/share/centreon/www/class/centreon-clapi/centreonHost.class.php(438): CentreonClapi\CentreonObject->setparam('1', Array)
#7 /usr/share/centreon/www/class/centreo in /usr/share/centreon/lib/Zend/Db/Statement/Pdo.php on line 234

Any suggestions?

@lpinsivy
Copy link
Contributor

I had this issue on CentOS v7 but next version of Centreon web 2.8.12 (in QA) solve it.

@gl00ten
Copy link
Contributor Author

gl00ten commented Aug 22, 2017

The unofficial debian repo has centreon-web 2.8.11-1 now.

I thought 2.8.8 would solve this issue.

You only confirm it's solved in 2.8.12?

Also, you think I can do anything to side step this issue? Is it easy to figure out which imports are causing it and removing them?

@lpinsivy
Copy link
Contributor

We perform different changes in Centreon API, so it will be difficult do extract only changes.

Centreon web 2.8.12 is now released.

@gl00ten
Copy link
Contributor Author

gl00ten commented Sep 5, 2017

Any plans for a debian release? :)

Or should I try compiling from source?

@lpinsivy
Copy link
Contributor

lpinsivy commented Sep 8, 2017

We are working on PHP7 support in Centreon before.

@gl00ten
Copy link
Contributor Author

gl00ten commented Sep 11, 2017

Ok, I'll try compiling the latest version from source, see if i get the same error on importing from nagios.

@gl00ten
Copy link
Contributor Author

gl00ten commented Sep 12, 2017

The guide for downloading sources, mentions a centreon-2.x.x.tar.gz But I can't find that file anywhere. I was installing centreon-web but that seems to depend on centreon-core and doesn't include it.

Is there a central file to install somwhere? Or do I have to install all depedencies first from source?

https://documentation.centreon.com/docs/centreon/en/2.8.x/installation/from_sources.html

Also, I found a bug on the docs and opened a merge request for it, just accept it as it's just a single line with a new link.

@gl00ten
Copy link
Contributor Author

gl00ten commented Sep 12, 2017

I'm concluding the above from this bit of information:

What is the Monitoring engine log directory ? [/var/log/centreon-engine]
default to [/var/log/centreon-engine]
> 
/var/log/centreon-engine is not a directory or does not exiCRITICAL

What is the Monitoring engine log directory ? [/var/log/centreon-engine]
default to [/var/log/centreon-engine]
> 

@gl00ten
Copy link
Contributor Author

gl00ten commented Sep 15, 2017

https://forum.centreon.com/forum/centreon-ui/centreon-web-interface/140817-generating-files-nok

I found this guy with the same problem as I. What did he do exactly?

@lpinsivy lpinsivy closed this as completed Feb 1, 2018
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

2 participants