adagios icon indicating copy to clipboard operation
adagios copied to clipboard

nagios_config and destination_directory do not work as expected

Open hakong opened this issue 6 years ago • 12 comments

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.

hakong avatar Aug 03 '17 14:08 hakong

@hakong I will look into this after the weekend

gardart avatar Aug 03 '17 14:08 gardart

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" [email protected] 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 .

hakong avatar Sep 06 '17 10:09 hakong

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

Nozlaf avatar Sep 06 '17 13:09 Nozlaf

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 [email protected] 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 .

hakong avatar Sep 06 '17 14:09 hakong

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.

gardart avatar Sep 06 '17 14:09 gardart

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 < [email protected]> 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 .

hakong avatar Sep 06 '17 15:09 hakong

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.

gardart avatar Sep 22 '17 14:09 gardart

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.

hakong avatar Nov 16 '17 23:11 hakong

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.

gardart avatar Nov 17 '17 09:11 gardart

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.

palli avatar Nov 20 '17 13:11 palli

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.

gardart avatar Nov 20 '17 14:11 gardart

@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

steelegwds avatar Dec 08 '17 03:12 steelegwds