Possible issue with nagios_* commands

20 views
Skip to first unread message

JonY

unread,
Feb 25, 2014, 12:01:43 PM2/25/14
to puppet...@googlegroups.com
I'm trying to setup a nagios server via puppet to monitor the other servers in the group. I can get the various stored info from puppet db but when the *.cfg files are created in the nagios folder they are all root:root 0600. 

IE nagios can't read them.

I can work around this but I'm wondering if there is some config that I've missed.

Matthias Saou

unread,
Feb 25, 2014, 12:07:13 PM2/25/14
to puppet...@googlegroups.com
I recall having the same problem. In fact, here's what I have in my own
nagios module :

# Work around a puppet bug where created files are 600 root:root
file { [
'/etc/nagios/nagios_command.cfg',
'/etc/nagios/nagios_contact.cfg',
'/etc/nagios/nagios_contactgroup.cfg',
'/etc/nagios/nagios_host.cfg',
'/etc/nagios/nagios_hostdependency.cfg',
'/etc/nagios/nagios_hostgroup.cfg',
'/etc/nagios/nagios_service.cfg',
'/etc/nagios/nagios_servicegroup.cfg',
'/etc/nagios/nagios_timeperiod.cfg',
]:
ensure => present,
owner => 'root',
group => 'nagios',
mode => '0640',
before => Service['nagios'],
}

Matthias

--
Matthias Saou ██ ██
██ ██
Web: http://matthias.saou.eu/ ██████████████
Mail/XMPP: matt...@saou.eu ████ ██████ ████
██████████████████████
GPG: 4096R/E755CC63 ██ ██████████████ ██
8D91 7E2E F048 9C9C 46AF ██ ██ ██ ██
21A9 7A51 7B82 E755 CC63 ████ ████

Felix Frank

unread,
Feb 25, 2014, 12:10:39 PM2/25/14
to puppet...@googlegroups.com
Hi,

there will be appropriate options to the nagios types starting with 3.5,
see https://tickets.puppetlabs.com/browse/PUP-1327

As a workaround you can now manage the configs as file { } resources.
This should not interfere with the nagios types.

HTH,
Felix
Reply all
Reply to author
Forward
0 new messages