opinkerfi / adagios

Adagios - Web Based Nagios Configuration
GNU Affero General Public License v3.0
330 stars 75 forks source link

nagios_config and destination_directory do not work as expected #630

Open hakong opened 7 years ago

hakong commented 7 years ago

In /etc/adagios/adagios.conf:

nagios_config="/etc/naemon/naemon.cfg"
destination_directory="/etc/naemon/adagios/"

Has no effect if /etc/nagios/nagios.cfg exists. This cause problem when using naemon. The installation instructions instruct moving /etc/nagios/nagios.cfg to /etc/nagios/nagios.cfg.disabled, which makes things work properly with naemon. However, when nagios and nagios-core updates, it creates nagios.cfg again, and that breaks adagios/naemon. I attempted to work around this by symlinking nagios.cfg to naemon.cfg, but then adagios thinks the working directory is /etc/nagios, and fails to save objects because the .git folder dosen't exist.

Please fix ASAP.

gardart commented 7 years ago

@hakong I will look into this after the weekend

hakong commented 7 years ago

Any news on this? Another nagios update this week that broke all adagios instaces for our customers (and us).

On Aug 3, 2017 14:27, "Garðar Þorsteinsson" notifications@github.com wrote:

@hakong https://github.com/hakong I will look into this after the weekend

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opinkerfi/adagios/issues/630#issuecomment-319984966, or mute the thread https://github.com/notifications/unsubscribe-auth/AEN54Txlx0FrnhjRdHbLYlzoma7OaiaUks5sUdi0gaJpZM4OsgZf .

Nozlaf commented 7 years ago

why are you installing nagios when you have naemon installed? its naemon a replacement for nagios core?

hakong commented 7 years ago

Sure, but if I remember correctly nagios and nagios-common are dependencies for nagios-plugins or somesuch? Either way, the nagios_conjfig and destionation_directory settings don't work.

On Wed, Sep 6, 2017 at 1:28 PM, Nozlaf notifications@github.com wrote:

why are you installing nagios when you have naemon installed? its naemon a replacement for nagios core?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opinkerfi/adagios/issues/630#issuecomment-327483110, or mute the thread https://github.com/notifications/unsubscribe-auth/AEN54TeM6wIexZsnhlTXYs-N9lasm5eiks5sfp4RgaJpZM4OsgZf .

gardart commented 7 years ago

I'm sorry, but we haven't had the time to work on this issue yet. I understand that this is causing problems for those using Naemon. I'm going to talk with my team and see what we can do. I will let you know.

hakong commented 7 years ago

Ok, cool. I've worked around this with yum versionlock so nagios and nagios-common don't update.

On Wed, Sep 6, 2017 at 2:52 PM, Garðar Þorsteinsson < notifications@github.com> wrote:

I'm sorry, but we haven't had the time to work on this issue yet. I understand that this is causing problems for those using Naemon. I'm going to talk with my team and see what we can do. I will let you know.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opinkerfi/adagios/issues/630#issuecomment-327508915, or mute the thread https://github.com/notifications/unsubscribe-auth/AEN54V9fEJOaS5zGIwhTSYh7YZV7sAXIks5sfrGegaJpZM4OsgZf .

gardart commented 7 years ago

please try this out, https://github.com/opinkerfi/adagios/pull/631 should fix this issue

I still need to do some testing with this code, after that I will make a new release and build RPM.

hakong commented 6 years ago

Bump. Another nagios update hit tonight and /etc/nagios/nagios.cfg was re-created, leaving adagios broken. yum remove nagios wants to remove okconfig, so I can't do that.

gardart commented 6 years ago

maybe okconfig is the one to blame here, it depends on nagios to be installed even though you are using naemon, right? I'm going to check all the dependencies on packages related to Adagios.

Pynag is probably autodetecting nagios.cfg file and uses that instead. I will have to check that as well if that is the case.

palli commented 6 years ago

Is there any word if #631 fixes the issue ?

From adagios perspective, setting nagios_config in adagios.conf is supposed to be a supported scenario, and /etc/nagios/nagios.conf being present on the machine should be supported.

gardart commented 6 years ago

I have tested it in my lab and it fixed the issue with nagios_config being used from Adagios settings. However it also broke some functionality in Pynag. Check downtime, recheck and other functions are not working after applying this fix. So I guess I have to do some more debugging regarding this pull request before merging.

Any ideas @palli ?

On more thing here: Okconfig is depending on Nagios package being installed. I have removed that dependency and will release a new rpm package for that. When updating servers with naemon installed along with Adagios, okconfig updates nagios as well and the nagios.conf is recreated, resulting in this error.

steelegwds commented 6 years ago

@gardart I apologies if this is totally irrelevant but I have just done a new install of Adagios on my RPi and was having the problem you mention about Check downtime, recheck and other functions not working.

I found the following information fixed mine it's probability nothing to do with the issue your working on but maybe?? I'm a total newbie at coding so don't mean to offend.

http://www.projectenvision.com/blog/4/Sorry-but-Nagios-is-currently-not-checking-for-external-commands