Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Host is not added #3

Open
e-it opened this issue Feb 5, 2016 · 22 comments
Open

Host is not added #3

e-it opened this issue Feb 5, 2016 · 22 comments

Comments

@e-it
Copy link

e-it commented Feb 5, 2016

Hello,

I configured the centreon::server class according to the clapi-settings of my centreon-server.

On the second step I added centreon::client to an other node. Unfortunately this not is not added to the centreon-server.

puppet agent -t does not throw any errors.

This is the yaml for the server:

  centreon::server:
    clapi_binaries: /usr/bin
    clapi_password: ---------
    clapi_username: admin
    poller_name: Central

The client's yaml is this:

centreon::client:

@mvisonneau
Copy link
Owner

Hey @SPQRInc,

Can you send me a debug output ?

Thanks

@e-it
Copy link
Author

e-it commented Feb 5, 2016

Hello @mvisonneau

You mean the puppet agent --debug on the centreon-server or on the client?

@mvisonneau
Copy link
Owner

both would be great

@e-it
Copy link
Author

e-it commented Feb 5, 2016

Here we go for the server: http://d.pr/8IyX

@e-it
Copy link
Author

e-it commented Feb 5, 2016

Here we go for the client: http://d.pr/10iDV

(I parked the logs on the cloud because they are too long for this thread)

@mvisonneau
Copy link
Owner

Which version of clapi are you using ?

@e-it
Copy link
Author

e-it commented Feb 5, 2016

centreon -V gives

Centreon version 2.7.1
Centreon CLAPI version undefined

back

@mvisonneau
Copy link
Owner

Looks like you got your answer. I should get the module to fail if CLAPI is not installed though.

@e-it
Copy link
Author

e-it commented Feb 5, 2016

Are you sure?

I'm getting:

centreon -u admin -p xxxxxxxxxx  -a POLLERLIST | head -n -1 | awk '{print $1}'
1

And

yum install centreon-clapi
Geladene Plugins: fastestmirror
Einrichten des Installationsprozess
Loading mirror speeds from cached hostile
 * centos-base: centos.mirrors.psw.services
 * centos-extras: mirror.imt-systems.com
 * centos-updates: ftp.hosteurope.de
Paket centreon-clapi-1.8.0-13.el6.noarch wurde ersetzt durch centreon-web-2.7.1-10.el6.noarch, welches bereits installiert ist
Nichts zu tun

Which means, that the clapi-package was replaced by centreon-web-2.7.1 package.

@e-it
Copy link
Author

e-it commented Feb 5, 2016

Hm, obviously the clapi has been removed in Centreon 2.7 and follows as Centreon API 2.7.

@e-it
Copy link
Author

e-it commented Feb 7, 2016

Hm, I manually installed the CLAPI on the centreon-server but the host is still not added.

# centreon -V
Centreon version 2.7.1
Centreon CLAPI version 1.8.0

The given path is

/usr/share/centreon/www/modules/centreon-clapi/core

But the target-server is still not added.

Edit: This is the centpoller's log:

Return code end : 0
OK: Nagios Poller 1 can restart without problem...
Return code end : 0
OK: All configuration files copied with success.
Return code end : 0
..centengine restart: done[  OK  ]
Return code end : 0
Configuration files generated for poller '1'
Return code end : 0
OK: Nagios Poller 1 can restart without problem...
Return code end : 0
OK: All configuration files copied with success.
Return code end : 0
.centengine restart: done^[[60G[^[[0;32m  OK  ^[[0;39m]
Return code end : 0
Configuration files generated for poller '1'
Return code end : 0
OK: Nagios Poller 1 can restart without problem...
Return code end : 0
OK: All configuration files copied with success.
Return code end : 0
.centengine restart: done^[[60G[^[[0;32m  OK  ^[[0;39m]
Return code end : 0
Configuration files generated for poller '1'
Return code end : 0
OK: Nagios Poller 1 can restart without problem...
Return code end : 0
OK: All configuration files copied with success.
Return code end : 0
..centengine restart: done[  OK  ]

The new host is not added to clapi.conf.

@jarduini
Copy link

hi, im having the same problem with Centreon 2.6.5, centreon-clapi-1.8.0.
I tried manualy to add a host with the command ./centreon -u admin -p ruth -o HOST -a ADD -v "Linux1;Linux1;192.168.0.1;generic-host;Central;Linux-Servers" and it worked, but when i use the client side module don´t work.
how you send the hostname and ipaddress from the client to the server?

@e-it
Copy link
Author

e-it commented Mar 7, 2016

Hello @jarduini

Unfortunately I was not able to solve this problem yet. Maybe @mvisonneau has some more hints - I would appreciate this very much.

@jarduini
Copy link

jarduini commented Mar 7, 2016

Hi @SPQRInc,

The problem is with the ruby code from the server side (centreon)
i used the default config created by puppet to nagios (very similar) and works ok! he creates a file /etc/nagios/nagios.cfg with all the host with the client module.
Im trying to understand the ruby code from @mvisonneau to solve the problem.

@mvisonneau
Copy link
Owner

@jarduini, thanks, feel free to PR if you find issue in my code.

I do not plan to work forward on this as I'm not working with Centreon anymore but I believe that it would just required some adjustments to make it work with the latest releases.

@e-it
Copy link
Author

e-it commented Mar 29, 2016

Hello,

is there already a small fix that can be used to get the things working? I would donate for that because it would save me tons of work.

@juniorkalvin7
Copy link

Hello,

2016-03-29 8:47 GMT-03:00 SPQRInc [email protected]:

Hello,

is there already a small fix that can be used to get the things working? I
would donate for that because it would save me tons of work.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#3 (comment)

@juniorkalvin7
Copy link

I could make one that is working perfectly with nagios and clapi, the more
your code is more detailed if I was running back to use it

2016-03-29 9:02 GMT-03:00 Junior Karvalho [email protected]:

Hello,

2016-03-29 8:47 GMT-03:00 SPQRInc [email protected]:

Hello,

is there already a small fix that can be used to get the things working?
I would donate for that because it would save me tons of work.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#3 (comment)

@jarduini
Copy link

i made some modifications to make it work, i created a bash script to add the hosts and services to centreon with clapi.

@juniorkalvin7
Copy link

in my case I used two code, services and hosts along with puppetdb, is working perfectly with updates and modifications record sent to the local git.

@mvisonneau
Copy link
Owner

I haven't got the time to work on it yet. If you have PR, I'd be happy to look into it.

@e-it
Copy link
Author

e-it commented Jun 20, 2016

Any news on that? I would even pay for ;-)

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

No branches or pull requests

4 participants