mvisonneau / puppet-centreon

Management of the Centreon provisioning with Puppet
Apache License 2.0
3 stars 3 forks source link

Host is not added #3

Open e-it opened 8 years ago

e-it commented 8 years ago

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 commented 8 years ago

Hey @SPQRInc,

Can you send me a debug output ?

Thanks

e-it commented 8 years ago

Hello @mvisonneau

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

mvisonneau commented 8 years ago

both would be great

e-it commented 8 years ago

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

e-it commented 8 years ago

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 commented 8 years ago

Which version of clapi are you using ?

e-it commented 8 years ago

centreon -V gives

Centreon version 2.7.1 Centreon CLAPI version undefined

back

mvisonneau commented 8 years ago

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

e-it commented 8 years ago

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 commented 8 years ago

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

e-it commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

Hello,

2016-03-29 8:47 GMT-03:00 SPQRInc notifications@github.com:

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 https://github.com/mvisonneau/puppet-centreon/issues/3#issuecomment-202846089

juniorkalvin7 commented 8 years ago

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 juniorkalvin7@gmail.com:

Hello,

2016-03-29 8:47 GMT-03:00 SPQRInc notifications@github.com:

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 https://github.com/mvisonneau/puppet-centreon/issues/3#issuecomment-202846089

jarduini commented 8 years ago

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

juniorkalvin7 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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