Bug 1504306 - minor packaging improvements
Summary: minor packaging improvements
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios
Version: el6
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Stephen John Smoogen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-19 22:15 UTC by Dimitri Maziuk
Modified: 2019-02-02 00:39 UTC (History)
13 users (show)

Fixed In Version: nagios-4.4.3-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-02 00:39:30 UTC


Attachments (Terms of Use)

Description Dimitri Maziuk 2017-10-19 22:15:45 UTC
Version-Release number of selected component (if applicable):

nagios-4.3.2-5.el6.x86_64

How reproducible:

always

Additional info:

1. /etc/nagios/objects/localhost.cfg is intended as an example. It doesn't belong there: having it in /etc/nagios/objects/ triggers (possibly unnecessary) monitoring of localhost, editing it triggers creation of .rpmnew, etc.

2. /etc/nagios/objects/contacts.cfg defines one contact: nagiosadmin with
```
email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
```
-- as above, editing it in place creates rpm update conflict.

Since nagios does not seem to allow overriding existing definitions, I can't leave those files alone and override localhost and nagiosadmin in /etc/nagios/conf.d/

Comment 1 Stephen John Smoogen 2017-10-20 00:13:08 UTC
Thanks. I will look at removing in update.

Comment 2 Dimitri Maziuk 2017-10-25 23:16:07 UTC
There's more to it I'm afraid:

the default in /etc/nagios/nagios.cfg is
 process_performance_data=0

If I try to override it in 
/etc/nagios/conf.d/10_main.cfg I get 
```
Reading configuration data...
   Read main config file okay...
Error: Unexpected token or statement in file '/etc/nagios/conf.d/10_main.cfg' on line 4.
Error: Invalid max_check_attempts value for host 
...
```

If I edit in in the main config file, it works.

So it looks like nagios config parsing can't quite deal with conf.d

(The other thing that doesn't work is having a cfg_dir=blah in a file included with cfg_dir -- i.e. we had "cfg_dir=/etc/nagios/host" in nagios.cfg, once I moved that to conf.d/10_main.cfg, it dumped a similar error trace.)

:(

Comment 3 Stephen John Smoogen 2017-10-26 00:33:46 UTC
The second part sounds like something to open up upstream. I am not sure I can fix that easily.

Comment 4 Dimitri Maziuk 2017-10-26 14:57:12 UTC
No, I think at this point nagios just doesn't support conf.d/ scheme: it only works if all user-configurable settings go in conf.d, and/or if settings in conf.d override the settings in main config. Nether seems to be the case here.

Unless you can convince the upstream to rewrite their config parsing stuff so that files in conf.d are processed after nagios.conf and override existing settings, I just don't see this working. :(

Comment 5 Stephen John Smoogen 2017-10-26 15:12:05 UTC
OK I am trying to see where this came in and it looks like it was added first in 2008 and then re-added in Apr 24 2013. Since this is something we (Fedora) did versus upstream.. I apologize for sending you upstream. I will just remove this from our side.

Comment 6 Dimitri Maziuk 2017-10-26 15:25:37 UTC
No worries. I'd love to have a working conf.d/ for this, this particular upgrade is a perfect example of why (I'm still picking up the pieces), it may be worth sending them a feature request.

Comment 7 Stephen John Smoogen 2017-11-20 23:01:47 UTC
OK to 'fix' this would require a rewrite of the configs as shipped from upstream as the files are used with the default are written to assume there is a localhost.config. This gets pulled in from shipping a nagios.cfg which upstream maintains which cascades down. I am going to comment out the nagios email address as the system can work with minimal work with out, but otherwise I need to come up with a complete working out of the box "config" set so that nagios will start up. This will likely require a minimal.cfg which defines a
service, a host and a contact

Checking objects...
Error: There are no services defined!
	Checked 0 services.
Error: There are no hosts defined!
	Checked 0 hosts.
	Checked 0 host groups.
	Checked 0 service groups.
Error: There are no contacts defined!
	Checked 0 contacts.
	Checked 0 contact groups.
	Checked 0 commands.
	Checked 0 time periods.
	Checked 0 host escalations.
	Checked 0 service escalations.
Checking for circular paths...
	Checked 0 hosts
	Checked 0 service dependencies
	Checked 0 host dependencies
	Checked 0 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Comment 8 Dimitri Maziuk 2018-02-02 20:27:10 UTC
Stephen, is it just me and if not, do you want this as a separate bug: my commands.cfg.rpmnew has 
```
command_line	/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s ...
```
whereas
```
# which mail
/bin/mail
# ls -l /usr/bin/mail
ls: cannot access /usr/bin/mail: No such file or directory
```

This is on centos 6.

Comment 9 Fedora Update System 2018-07-25 00:52:41 UTC
nagios-4.3.4-13.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-41e9ecf98a

Comment 10 Fedora Update System 2018-07-25 19:52:22 UTC
nagios-4.3.4-13.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-41e9ecf98a

Comment 11 Fedora Update System 2018-07-26 11:49:56 UTC
nagios-4.3.4-13.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-41e9ecf98a

Comment 12 Fedora Update System 2018-11-30 19:58:47 UTC
nagios-4.4.2-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-0346a55d0f

Comment 13 Fedora Update System 2018-12-01 01:55:21 UTC
nagios-4.4.2-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-0346a55d0f

Comment 14 Fedora Update System 2019-01-17 00:14:50 UTC
nagios-4.4.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d661b588d2

Comment 15 Fedora Update System 2019-01-18 01:00:33 UTC
nagios-4.4.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d661b588d2

Comment 16 Fedora Update System 2019-02-02 00:39:30 UTC
nagios-4.4.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.