diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/defaults/pnp4nagios.pp | 27 | ||||
-rw-r--r-- | manifests/pnp4nagios.pp | 17 | ||||
-rw-r--r-- | manifests/pnp4nagios/popup.pp | 17 |
3 files changed, 61 insertions, 0 deletions
diff --git a/manifests/defaults/pnp4nagios.pp b/manifests/defaults/pnp4nagios.pp new file mode 100644 index 0000000..f6556c9 --- /dev/null +++ b/manifests/defaults/pnp4nagios.pp @@ -0,0 +1,27 @@ +class nagios::defaults::pnp4nagios { + # performance data cmds + # http://docs.pnp4nagios.org/de/pnp-0.6/config#bulk_mode_mit_npcd + nagios_command { + 'process-service-perfdata-file-pnp4nagios-bulk-npcd': + command_line => '/bin/mv /var/lib/nagios3/service-perfdata /var/spool/pnp4nagios/npcd/service-perfdata.$TIMET$'; + 'process-host-perfdata-file-pnp4nagios-bulk-npcd': + command_line => '/bin/mv /var/lib/nagios3/host-perfdata /var/spool/pnp4nagios/npcd/host-perfdata.$TIMET$' + } + + # nagios host templates + # http://docs.pnp4nagios.org/de/pnp-0.6/webfe + + # this doesn't work, see manifests/pnp4nagios.pp + #nagios_host { 'host-pnp': + # action_url => '/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_', + # register => 0, + # #ensure => absent; + #} + + #nagios_service { 'service-pnp': + # #naginatorname => 'service-pnp', + # action_url => '/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$', + # register => 0, + # ensure => absent; + #} +} diff --git a/manifests/pnp4nagios.pp b/manifests/pnp4nagios.pp new file mode 100644 index 0000000..051bad8 --- /dev/null +++ b/manifests/pnp4nagios.pp @@ -0,0 +1,17 @@ +class nagios::pnp4nagios { + include nagios::defaults::pnp4nagios + + package { [php5, php5-gd, rrdcollect, rrdtool, librrdp-perl, librrds-perl ]: + ensure => installed } + + + # unfortunatly i didn't find a way to use nagios_host and nagios_service definition, because + # imho puppet can't handle the "name" variable needed in these 2 definitions + # so we need to copy a file here. + + file { 'pnp4nagios-templates.cfg': + path => "$nagios::nagios_cfgdir/conf.d/pnp4nagios-templates.cfg", + source => [ "puppet:///modules/site-nagios/pnp4nagios/pnp4nagios-templates.cfg", + "puppet:///modules/nagios/pnp4nagios/pnp4nagios-templates.cfg" ] + } +} diff --git a/manifests/pnp4nagios/popup.pp b/manifests/pnp4nagios/popup.pp new file mode 100644 index 0000000..372fe3b --- /dev/null +++ b/manifests/pnp4nagios/popup.pp @@ -0,0 +1,17 @@ +class nagios::pnp4nagios::popup inherits nagios::pnp4nagios { + File['pnp4nagios-templates.cfg']{ + path => "$nagios::nagios_cfgdir/conf.d/pnp4nagios-templates.cfg", + source => [ "puppet:///modules/site-nagios/pnp4nagios/pnp4nagios-popup-templates.cfg", + "puppet:///modules/nagios/pnp4nagios/pnp4nagios-popup-templates.cfg" ] + } + + file { "/usr/share/$nagios::nagios_packagename/htdocs/ssi": + ensure => directory } + + file { 'status-header.ssi': + path => "/usr/share/$nagios::nagios_packagename/htdocs/ssi/status-header.ssi", + source => [ "puppet:///modules/site-nagios/pnp4nagios/status-header.ssi", + "puppet:///modules/nagios/pnp4nagios/status-header.ssi" ] + } + +} |