Skip to content

Instantly share code, notes, and snippets.

@nibalizer
Created February 12, 2013 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nibalizer/4760587 to your computer and use it in GitHub Desktop.
Save nibalizer/4760587 to your computer and use it in GitHub Desktop.
Puppet configs for a command enabled web interface
# the following is for enabling write access to the web gui
if $readonly_web == false {
file_line {.
'/etc/nagios3/nagios.cfg-external-commands-yes':
line => "check_external_commands=1",
path => '/etc/nagios3/nagios.cfg',
notify => Service['nagios3'],
require => Package['nagios3'];
'/etc/nagios3/cgi.cfg-all_service_commands':
line => "authorized_for_all_host_commands=nagiosadmin",
path => '/etc/nagios3/cgi.cfg',
notify => Service['nagios3'],
require => Package['nagios3'];
'/etc/nagios3/cgi.cfg-all_host_commands':
line => "authorized_for_all_service_commands=nagiosadmin",
path => '/etc/nagios3/cgi.cfg',
notify => Service['nagios3'],
require => Package['nagios3'];
}
user { 'nagios':
groups => ['nagios', 'www-data'],
membership => minimum,
require => Package['nagios3'];
}
file { '/var/lib/nagios3/rw':
owner => 'nagios',
group => 'www-data',
mode => '2710',
ensure => directory,
require => Package['nagios3'];
}
file { '/var/lib/nagios3':
owner => 'nagios',
group => 'nagios',
mode => '0751',
ensure => directory,
require => Package['nagios3'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment