From 8882880d5959f14a7edb94ca95ebcdd15cbc3f51 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 27 Feb 2014 13:27:00 +0100 Subject: provide nagios_test_pw in hiera files --- provider_base/services/couchdb.json | 3 +++ provider_base/services/webapp.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/provider_base/services/couchdb.json b/provider_base/services/couchdb.json index 0cb044ef..5f1b5381 100644 --- a/provider_base/services/couchdb.json +++ b/provider_base/services/couchdb.json @@ -48,6 +48,9 @@ "password": "= secret :couch_webapp_password", "salt": "= hex_secret :couch_webapp_password_salt, 128" } + }, + "webapp": { + "nagios_test_pw": "= secret :nagios_test_password" } } } diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json index 08c7c5b0..b1f03f06 100644 --- a/provider_base/services/webapp.json +++ b/provider_base/services/webapp.json @@ -15,7 +15,8 @@ "source": "https://leap.se/git/leap_web", "revision": "origin/master" }, - "client_version": "= global.provider.client_version" + "client_version": "= global.provider.client_version", + "nagios_test_pw": "= secret :nagios_test_password" }, "stunnel": { "couch_client": "= stunnel_client(nodes_like_me[:services => :couchdb], global.services[:couchdb].couch.port)" -- cgit v1.2.3 From 2887bbbac9f350c0912e3b2bf8fd643994eaee84 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 27 Feb 2014 16:41:05 +0100 Subject: include "127.0.1.1 @domain_public @api['domain']" in /etc/hosts for nagios webapp log check --- puppet/modules/site_config/manifests/hosts.pp | 1 + puppet/modules/site_config/templates/hosts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/puppet/modules/site_config/manifests/hosts.pp b/puppet/modules/site_config/manifests/hosts.pp index a3ce0c1f..e5d4dd70 100644 --- a/puppet/modules/site_config/manifests/hosts.pp +++ b/puppet/modules/site_config/manifests/hosts.pp @@ -3,6 +3,7 @@ class site_config::hosts() { $hostname = hiera('name') $domain_hash = hiera('domain') $domain_public = $domain_hash['full_suffix'] + $api = hiera('api', '') file { '/etc/hostname': ensure => present, diff --git a/puppet/modules/site_config/templates/hosts b/puppet/modules/site_config/templates/hosts index c0a2740f..bfcabaa5 100644 --- a/puppet/modules/site_config/templates/hosts +++ b/puppet/modules/site_config/templates/hosts @@ -1,7 +1,8 @@ # This file is managed by puppet, any changes will be overwritten! 127.0.0.1 localhost -127.0.1.1 <%= @hostname %>.<%= @domain_public %> <%= @hostname %> +127.0.1.1 <%= @hostname %>.<%= @domain_public %> <%= @hostname %> <% if (defined? @services) and (@services.include? 'webapp') -%><%= @domain_public %> <%= @api['domain'] %><% end -%> + <%- if @hosts then -%> <% @hosts.keys.sort.each do |name| -%> -- cgit v1.2.3 From 66f44f61c0279cac22f121f14376b99f57fe20aa Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 27 Feb 2014 18:01:10 +0100 Subject: include nagios_test user credentials in webapp hiera files --- provider_base/services/webapp.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json index b1f03f06..d6a1e198 100644 --- a/provider_base/services/webapp.json +++ b/provider_base/services/webapp.json @@ -16,7 +16,10 @@ "revision": "origin/master" }, "client_version": "= global.provider.client_version", - "nagios_test_pw": "= secret :nagios_test_password" + "nagios_test_user": { + "username": "nagios_test", + "password": "= secret :nagios_test_password" + } }, "stunnel": { "couch_client": "= stunnel_client(nodes_like_me[:services => :couchdb], global.services[:couchdb].couch.port)" -- cgit v1.2.3 From 2209afd630a75335e26516c6d9fa1c796bca8a49 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 27 Feb 2014 18:01:34 +0100 Subject: check webapp login (Feature #5172) --- puppet/modules/site_check_mk/manifests/agent/webapp.pp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/puppet/modules/site_check_mk/manifests/agent/webapp.pp b/puppet/modules/site_check_mk/manifests/agent/webapp.pp index dc2baf19..48fa0828 100644 --- a/puppet/modules/site_check_mk/manifests/agent/webapp.pp +++ b/puppet/modules/site_check_mk/manifests/agent/webapp.pp @@ -1,5 +1,14 @@ class site_check_mk::agent::webapp { + # check webapp login + package { 'python-srp': ensure => installed } + file { '/usr/lib/check_mk_agent/local/nagios-webapp_login.py': + ensure => link, + target => '/srv/leap/webapp/test/nagios/webapp_login.py' + } + + + # check syslog concat::fragment { 'syslog_webapp': source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog/webapp.cfg', target => '/etc/check_mk/logwatch.d/syslog.cfg', -- cgit v1.2.3