centreon / centreon-archived

Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
https://www.centreon.com
GNU General Public License v2.0
576 stars 240 forks source link

Error when doing a "Run Nagios debug (-v)" on configuration export if local poller is deactivated #2921

Closed centreon closed 8 years ago

centreon commented 12 years ago

Author Name: Frank Enser (Frank Enser) Original Redmine Issue: 2671, https://forge.centreon.com/issues/2671 Original Date: 2011-10-05


Hi,

if you deactivate your local poller and issue a "Run Nagios debug (-v)" for your nagios configuration, you get an sudo syntax error. Perhaps because centreon cannot find the path to the nagios binary and submits an emptry string to sudo.

Error is: "{-e file [...] | -i | -s | }"

Thanks Frank

centreon commented 12 years ago

Original Redmine Comment Author Name: Tensibai - Bastien Jove (Tensibai - Bastien Jove) Original Date: 2011-10-05T13:03:26Z


Indeed, cenrteon need a local poller.

And anyway it's a good idea to keep it even if it is just to check the remote pollers state (disk, cpu, etc.)

centreon commented 12 years ago

Original Redmine Comment Author Name: Frank Enser (Frank Enser) Original Date: 2011-10-05T17:26:50Z


Tensibai - Bastien Jove wrote:

And anyway it's a good idea to keep it even if it is just to check the remote pollers state (disk, cpu, etc.)

this depends on the actual environment.

it should be checked (and then throw a meaningful error message) before submitting an empty variable to sudo.

centreon commented 12 years ago

Original Redmine Comment Author Name: Tensibai - Bastien Jove (Tensibai - Bastien Jove) Original Date: 2011-10-06T07:25:34Z


It do not really depends, and moreover it won't be able to send notification about a poller going down without a local one.

Centreon design is anyway done with a local poller for config check, nagios debuging, etc.

To have no poller locally would require to choose a poller to validate conf via ssh, which is in my point of view a waste of bandwith. A local nagios poller just checking remote pollers will have something like n hosts and nx5 services which is quite low on ressources usage.

So: 1) Removing the local poller involve a lot of refactoring inside centreon. 2) I don't see where this can have a real need nor bringing something interesting into centreon architecture.

That's said, I'm not from centreon official team and just give my opinion.

centreon commented 12 years ago

Original Redmine Comment Author Name: Martin Neumeyer (Martin Neumeyer) Original Date: 2011-10-06T07:52:48Z


Tensibai - Bastien Jove wrote:

It do not really depends, and moreover it won't be able to send notification about a poller going down without a local one.

Well, that's simply not correct. Each poller sends his own notifications. Ergo you do not need a local one.

Centreon design is anyway done with a local poller for config check, nagios debuging, etc.

That is also not correct. You do not need a poller. You just need the nagios binary.

The whole setup is for a extremely large-scaled environment with many pollers and one big Centreon-Server. The setup simply does not need a local poller.

centreon commented 12 years ago

Original Redmine Comment Author Name: Tensibai - Bastien Jove (Tensibai - Bastien Jove) Original Date: 2011-10-06T08:20:18Z


Martin Neumeyer wrote:

Well, that's simply not correct. Each poller sends his own notifications. Ergo you do not need a local one.

I wish you will explain me how a dead/offline server can send notification... as far as know, it needs to work to send a notification. So yes it could send notification about some of its services (cpu, ram), but if you run out of disk space for /var for exemple, no mail won't ever get out the box. So I insist you should keep a central poller checking the remotes pollers.

That is also not correct. You do not need a poller. You just need the nagios binary.

Right, but in centreon point of view, you MUST have an enabled poller flagged as local for it to find the binary. So sorry to use only the poller term, but that's true.

If you wish to get centreon working without a local poller configured inside centreon, feel free to do so and be kind to post the patch here.

But as deep as I know the code, it sounds a lot of work for a really little gain/interest.

centreon commented 12 years ago

Original Redmine Comment Author Name: Frank Enser (Frank Enser) Original Date: 2011-10-07T06:56:21Z


You realise that this situation (passing some parameter to an external programm without prior check) should be avoided.

So this should be checked and then throw an meaningful error message rather than "Error {-e file [...] | -i | -s | }".

centreon commented 12 years ago

Original Redmine Comment Author Name: Tensibai - Bastien Jove (Tensibai - Bastien Jove) Original Date: 2011-10-07T08:27:40Z


And as I already stated above, centreon is designed with a local poller in mind, so yes many things could be improved, many checks anywhere could be added, and the UI will spent more time checking things to avoid errors sitting between the chair and the keyboard than doing daily usefull things as reporting, statuses, etc.

That's still my point of view and maybe an official dev will give Merethis's opinion on that.

I said on my first answer how it should work and why, I'm open to discuss it on IRC if you wish.

julienmathis commented 8 years ago

Central polling system is mandatory