mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-21 12:44:58 +02:00
NSCA-ng Vagrant Support: add nsca user to icingacmd group, move nsca-ng
config files and set appropriate file permissions. Fixes #5222 Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
This commit is contained in:
parent
af6df9f268
commit
32ca25c7ef
2
.vagrant-puppet/files/etc/.gitattributes
vendored
Normal file
2
.vagrant-puppet/files/etc/.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
send_nsca.cfg text eol=lf
|
||||||
|
nsca-ng.cfg text eol=lf
|
@ -109,7 +109,7 @@ user = "nsca"
|
|||||||
# specified.
|
# specified.
|
||||||
#
|
#
|
||||||
authorize "*" {
|
authorize "*" {
|
||||||
password = "password"
|
password = "change-me"
|
||||||
#
|
#
|
||||||
# The original NSCA server permits all authenticated clients to submit
|
# The original NSCA server permits all authenticated clients to submit
|
||||||
# arbitrary check results. To get this behaviour, enable the following
|
# arbitrary check results. To get this behaviour, enable the following
|
@ -5,7 +5,6 @@
|
|||||||
# AUTHORIZED USERS CAN ACCESS IT!
|
# AUTHORIZED USERS CAN ACCESS IT!
|
||||||
#
|
#
|
||||||
|
|
||||||
password="password"
|
|
||||||
identity="nsca-ng"
|
identity="nsca-ng"
|
||||||
# identity = "web-checker" # Default: `hostname`.
|
# identity = "web-checker" # Default: `hostname`.
|
||||||
# password = "8a5UMsMzZhu6sSPkSmSaqC3HjMGCLwdt" # Default: "change-me".
|
# password = "8a5UMsMzZhu6sSPkSmSaqC3HjMGCLwdt" # Default: "change-me".
|
@ -30,6 +30,11 @@ class nsca-ng-server {
|
|||||||
command => 'lokkit -p 5668:tcp'
|
command => 'lokkit -p 5668:tcp'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
user { "nsca":
|
||||||
|
ensure => "present",
|
||||||
|
groups => "icingacmd"
|
||||||
|
}
|
||||||
|
|
||||||
service { 'nsca-ng':
|
service { 'nsca-ng':
|
||||||
enable => true,
|
enable => true,
|
||||||
ensure => running,
|
ensure => running,
|
||||||
@ -39,7 +44,7 @@ class nsca-ng-server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/nsca-ng.cfg':
|
file { '/etc/nsca-ng.cfg':
|
||||||
content => template('nsca-ng/nsca-ng.cfg'),
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/nsca-ng.cfg',
|
||||||
require => Package['nsca-ng-server'],
|
require => Package['nsca-ng-server'],
|
||||||
notify => Service['nsca-ng']
|
notify => Service['nsca-ng']
|
||||||
}
|
}
|
||||||
@ -68,18 +73,21 @@ class nsca-ng-client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/icinga2/conf.d/passive.conf':
|
file { '/etc/icinga2/conf.d/passive.conf':
|
||||||
content => template('nsca-ng/passive.conf'),
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/conf.d/passive.conf',
|
||||||
require => Package['nsca-ng-client'],
|
require => Package['nsca-ng-client'],
|
||||||
notify => Service['icinga2']
|
notify => Service['icinga2']
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/send_nsca.cfg':
|
file { '/etc/send_nsca.cfg':
|
||||||
content => template('nsca-ng/send_nsca.cfg'),
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/send_nsca.cfg',
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0600',
|
||||||
require => Package['nsca-ng-client'],
|
require => Package['nsca-ng-client'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/vagrant/passive_result':
|
file { '/home/vagrant/passive_result':
|
||||||
content => template('nsca-ng/passive_result'),
|
source => 'puppet:////vagrant/.vagrant-puppet/files/home/vagrant/passive_result',
|
||||||
require => Package['nsca-ng-client'],
|
require => Package['nsca-ng-client'],
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user