From 89c5fd126f73dff0bd4258ec51ad03f523d64ade Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 28 Feb 2014 00:40:07 +0100 Subject: install more needed packages for webapp login check --- puppet/modules/site_check_mk/manifests/agent/webapp.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/manifests/agent/webapp.pp b/puppet/modules/site_check_mk/manifests/agent/webapp.pp index 48fa0828..932d6bb9 100644 --- a/puppet/modules/site_check_mk/manifests/agent/webapp.pp +++ b/puppet/modules/site_check_mk/manifests/agent/webapp.pp @@ -1,7 +1,9 @@ class site_check_mk::agent::webapp { # check webapp login - package { 'python-srp': ensure => installed } + package { [ 'python-srp', 'python-requests', 'python-yaml' ]: + ensure => installed + } file { '/usr/lib/check_mk_agent/local/nagios-webapp_login.py': ensure => link, target => '/srv/leap/webapp/test/nagios/webapp_login.py' -- cgit v1.2.3 From 08f0fa4c8b1853db04835f407350c052ccfdb3d8 Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 28 Feb 2014 00:41:44 +0100 Subject: don't displa ycontext for errors in bigcouch.log (reported too many context lines), ignore patterns first --- .../modules/site_check_mk/files/agent/logwatch/bigcouch.cfg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg index a1eb1312..92c5eb5a 100644 --- a/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg +++ b/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg @@ -1,4 +1,9 @@ -/opt/bigcouch/var/log/bigcouch.log +/opt/bigcouch/var/log/bigcouch.log nocontext=1 +# ignore requests that are fine + I undefined - -.*200$ + I undefined - -.*201$ + I 127.0.0.1 undefined.* ok + I 127.0.0.1 localhost:5984 .* ok C Uncaught error in HTTP request: {exit, C Uncaught error in HTTP request: {exit,normal} C Uncaught error in HTTP request: {error, @@ -8,8 +13,3 @@ C error C Connection attempt from disallowed node W Shutting down group server -# ignore requests that are fine - I undefined - -.*200$ - I undefined - -.*201$ - I 127.0.0.1 undefined.* ok - I 127.0.0.1 localhost:5984 .* ok -- cgit v1.2.3 From f802fcdc7396d8a3b804be6480adb8611638f2c0 Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 28 Feb 2014 01:18:33 +0100 Subject: Make leap_cli tests accessible for check_mk (Feature #5148) --- .../files/agent/local_checks/all_hosts/run_node_tests.sh | 5 +++++ puppet/modules/site_check_mk/manifests/agent.pp | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 puppet/modules/site_check_mk/files/agent/local_checks/all_hosts/run_node_tests.sh (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/local_checks/all_hosts/run_node_tests.sh b/puppet/modules/site_check_mk/files/agent/local_checks/all_hosts/run_node_tests.sh new file mode 100644 index 00000000..1dd0afc9 --- /dev/null +++ b/puppet/modules/site_check_mk/files/agent/local_checks/all_hosts/run_node_tests.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# +# runs node tests + +/srv/leap/bin/run_tests --checkmk diff --git a/puppet/modules/site_check_mk/manifests/agent.pp b/puppet/modules/site_check_mk/manifests/agent.pp index efb05b37..b752182e 100644 --- a/puppet/modules/site_check_mk/manifests/agent.pp +++ b/puppet/modules/site_check_mk/manifests/agent.pp @@ -18,6 +18,11 @@ class site_check_mk::agent { ensure => directory, } + file { '/usr/lib/check_mk_agent/local/run_node_tests.sh': + source => 'puppet:///modules/site_check_mk/agent/local_checks/all_hosts/run_node_tests.sh', + mode => '0755' + } + include site_check_mk::agent::mrpe include site_check_mk::agent::logwatch } -- cgit v1.2.3 From c7af5055fd9f255357a8dcd6e318c7a15a3b709c Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 28 Feb 2014 21:53:12 +0100 Subject: check leap_mx queue --- .../files/agent/local_checks/mx/check_leap_mx.sh | 33 ++++++++++++++++++++++ puppet/modules/site_check_mk/manifests/agent/mx.pp | 8 ++++++ 2 files changed, 41 insertions(+) create mode 100755 puppet/modules/site_check_mk/files/agent/local_checks/mx/check_leap_mx.sh create mode 100644 puppet/modules/site_check_mk/manifests/agent/mx.pp (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/local_checks/mx/check_leap_mx.sh b/puppet/modules/site_check_mk/files/agent/local_checks/mx/check_leap_mx.sh new file mode 100755 index 00000000..2958d2ed --- /dev/null +++ b/puppet/modules/site_check_mk/files/agent/local_checks/mx/check_leap_mx.sh @@ -0,0 +1,33 @@ +#!/bin/bash + + +WARN=1 +CRIT=5 + +# in minutes +MAXAGE=10 + +STATUS[0]='OK' +STATUS[1]='Warning' +STATUS[2]='Critical' +CHECKNAME='Leap_MX_Queue' + +WATCHDIR='/var/mail/vmail/Maildir/new/' + + +total=`find $WATCHDIR -type f -mmin +$MAXAGE | wc -l` + +if [ $total -lt $WARN ] +then + exitcode=0 +else + if [ $total -le $CRIT ] + then + exitcode=1 + else + exitcode=2 + fi +fi + +echo "$exitcode $CHECKNAME stale_files=$total ${STATUS[exitcode]}: $total stale files (>=$MAXAGE min) in $WATCHDIR." + diff --git a/puppet/modules/site_check_mk/manifests/agent/mx.pp b/puppet/modules/site_check_mk/manifests/agent/mx.pp new file mode 100644 index 00000000..c4d3ea13 --- /dev/null +++ b/puppet/modules/site_check_mk/manifests/agent/mx.pp @@ -0,0 +1,8 @@ +class site_check_mk::agent::mx { + + file { '/usr/lib/check_mk_agent/local/check_leap_mx.sh': + source => 'puppet:///modules/site_check_mk/agent/local_checks/mx/check_leap_mx.sh', + mode => '0755' + } + +} -- cgit v1.2.3 From 34b7c8ebb3462fea880c848d960261cabd4a6a9f Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 28 Feb 2014 22:56:16 +0100 Subject: check soledad.log for 'Timing out client:' --- puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg index 54b782d3..0f4c9469 100644 --- a/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg +++ b/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg @@ -1,4 +1,4 @@ /var/log/soledad.log C WSGI application error C error - + W Timing out client: -- cgit v1.2.3 From efb262a0337493b7a7954ccdd72119d8519370af Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 28 Feb 2014 23:05:52 +0100 Subject: check leap_mx (Feature #5175) --- .../modules/site_check_mk/files/agent/logwatch/leap_mx.cfg | 4 ++++ puppet/modules/site_check_mk/manifests/agent/mx.pp | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 puppet/modules/site_check_mk/files/agent/logwatch/leap_mx.cfg (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/leap_mx.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/leap_mx.cfg new file mode 100644 index 00000000..c71c5392 --- /dev/null +++ b/puppet/modules/site_check_mk/files/agent/logwatch/leap_mx.cfg @@ -0,0 +1,4 @@ +/var/log/leap_mx.log + W Don't know how to deliver mail + W No public key, stopping the processing chain + diff --git a/puppet/modules/site_check_mk/manifests/agent/mx.pp b/puppet/modules/site_check_mk/manifests/agent/mx.pp index c4d3ea13..2dd50400 100644 --- a/puppet/modules/site_check_mk/manifests/agent/mx.pp +++ b/puppet/modules/site_check_mk/manifests/agent/mx.pp @@ -1,5 +1,19 @@ class site_check_mk::agent::mx { + # watch logs + file { '/etc/check_mk/logwatch.d/leap_mx.cfg': + source => 'puppet:///modules/site_check_mk/agent/logwatch/leap_mx.cfg', + } + + # local nagios plugin checks via mrpe + file_line { + 'Leap_MX_Procs': + line => 'Leap_MX_Procs /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a leap_mx', + path => '/etc/check_mk/mrpe.cfg'; + } + + + # check stale files in queue dir file { '/usr/lib/check_mk_agent/local/check_leap_mx.sh': source => 'puppet:///modules/site_check_mk/agent/local_checks/mx/check_leap_mx.sh', mode => '0755' -- cgit v1.2.3 From 5dd248238cdf5ab27232ecf426aada05503d2b10 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 3 Mar 2014 17:17:02 +0100 Subject: check syslog for bigcouch restarts --- puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg | 1 + 1 file changed, 1 insertion(+) (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg index 92c5eb5a..3f6cc413 100644 --- a/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg +++ b/puppet/modules/site_check_mk/files/agent/logwatch/bigcouch.cfg @@ -13,3 +13,4 @@ C error C Connection attempt from disallowed node W Shutting down group server + W Apache CouchDB has started -- cgit v1.2.3 From 8811b41222a98037eaae9bb0de1835c3c0282178 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 3 Mar 2014 17:18:41 +0100 Subject: check soledad.log also for Upper case pattern 'Error' --- puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg | 1 + 1 file changed, 1 insertion(+) (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg index 0f4c9469..623d1e46 100644 --- a/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg +++ b/puppet/modules/site_check_mk/files/agent/logwatch/soledad.cfg @@ -1,4 +1,5 @@ /var/log/soledad.log C WSGI application error + C Error C error W Timing out client: -- cgit v1.2.3 From ba6edc92bc27f219401b5610d2f99d679fbc865f Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 3 Mar 2014 17:19:32 +0100 Subject: check syslog for bigcouch error "epmd: got partial packet only on file descriptor" --- puppet/modules/site_check_mk/files/agent/logwatch/syslog/couchdb.cfg | 2 ++ 1 file changed, 2 insertions(+) (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/syslog/couchdb.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/syslog/couchdb.cfg index 5f8d5b95..c92b5af7 100644 --- a/puppet/modules/site_check_mk/files/agent/logwatch/syslog/couchdb.cfg +++ b/puppet/modules/site_check_mk/files/agent/logwatch/syslog/couchdb.cfg @@ -1,2 +1,4 @@ C /usr/local/bin/couch-doc-update.*failed C /usr/local/bin/couch-doc-update.*ERROR + W epmd: got partial packet only on file descriptor + -- cgit v1.2.3 From 0152667c246e1f835021ad13f3df00a6c08eb5c0 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 3 Mar 2014 17:20:56 +0100 Subject: ignore stunnel pattern "Peer suddenly disconnected" (#5218) --- puppet/modules/site_check_mk/files/agent/logwatch/syslog/stunnel.cfg | 1 + 1 file changed, 1 insertion(+) (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/syslog/stunnel.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/syslog/stunnel.cfg index cf7ebca8..a4e428b4 100644 --- a/puppet/modules/site_check_mk/files/agent/logwatch/syslog/stunnel.cfg +++ b/puppet/modules/site_check_mk/files/agent/logwatch/syslog/stunnel.cfg @@ -3,3 +3,4 @@ # this is a temporary failure and happens very often, so we # ignore it I stunnel:.*Connection reset by peer + I stunnel:.*Peer suddenly disconnected -- cgit v1.2.3 From 984939c4a74b71ce67db27a035ca5017f82c416f Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 3 Mar 2014 17:32:42 +0100 Subject: move generic syslog patterns to the end of syslog.cfg so we can ignore patterns first --- puppet/modules/site_check_mk/files/agent/logwatch/syslog.cfg | 12 ------------ .../site_check_mk/files/agent/logwatch/syslog_header.cfg | 1 + .../site_check_mk/files/agent/logwatch/syslog_tail.cfg | 11 +++++++++++ .../modules/site_check_mk/manifests/agent/logwatch/syslog.pp | 7 ++++++- 4 files changed, 18 insertions(+), 13 deletions(-) delete mode 100644 puppet/modules/site_check_mk/files/agent/logwatch/syslog.cfg create mode 100644 puppet/modules/site_check_mk/files/agent/logwatch/syslog_header.cfg create mode 100644 puppet/modules/site_check_mk/files/agent/logwatch/syslog_tail.cfg (limited to 'puppet/modules/site_check_mk') diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/syslog.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/syslog.cfg deleted file mode 100644 index f3505c1c..00000000 --- a/puppet/modules/site_check_mk/files/agent/logwatch/syslog.cfg +++ /dev/null @@ -1,12 +0,0 @@ -/var/log/syslog -# some general patterns - C panic - C Oops - I Error: Driver 'pcspkr' is already registered, aborting... - C Error - C error - W generic protection rip - W .*Unrecovered read error - auto reallocate failed -# 401 Unauthorized error logged by webapp and possible other -# applications - C Unauthorized diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/syslog_header.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/syslog_header.cfg new file mode 100644 index 00000000..f60d752b --- /dev/null +++ b/puppet/modules/site_check_mk/files/agent/logwatch/syslog_header.cfg @@ -0,0 +1 @@ +/var/log/syslog diff --git a/puppet/modules/site_check_mk/files/agent/logwatch/syslog_tail.cfg b/puppet/modules/site_check_mk/files/agent/logwatch/syslog_tail.cfg new file mode 100644 index 00000000..450b9e90 --- /dev/null +++ b/puppet/modules/site_check_mk/files/agent/logwatch/syslog_tail.cfg @@ -0,0 +1,11 @@ +# some general patterns + C panic + C Oops + I Error: Driver 'pcspkr' is already registered, aborting... + C Error + C error + W generic protection rip + W .*Unrecovered read error - auto reallocate failed +# 401 Unauthorized error logged by webapp and possible other +# applications + C Unauthorized diff --git a/puppet/modules/site_check_mk/manifests/agent/logwatch/syslog.pp b/puppet/modules/site_check_mk/manifests/agent/logwatch/syslog.pp index ac3dda64..c927780d 100644 --- a/puppet/modules/site_check_mk/manifests/agent/logwatch/syslog.pp +++ b/puppet/modules/site_check_mk/manifests/agent/logwatch/syslog.pp @@ -5,9 +5,14 @@ class site_check_mk::agent::logwatch::syslog { } concat::fragment { 'syslog_header': - source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog.cfg', + source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog_header.cfg', target => '/etc/check_mk/logwatch.d/syslog.cfg', order => '01'; } + concat::fragment { 'syslog_tail': + source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog_tail.cfg', + target => '/etc/check_mk/logwatch.d/syslog.cfg', + order => '99'; + } } -- cgit v1.2.3