Commit 3a01ce4e authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

show number of ERROR and CRITICAL messages

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 5068
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent bf2af232
......@@ -32,16 +32,17 @@
# Copyright (c) 2012 by Daniel Armbruster
#
# REVISIONS and CHANGES
# 05/01/2012 V0.1 Daniel Armbruster
# 12/01/2012 V0.2 provide nagios status line
# 10/05/2012 V0.3 provide output to stdout
# 18/05/2012 V0.4 provide information regarding possible message
# criticalities (thof)
# 19/05/2012 V0.5 Bug fixed - str.find didn't work as expected.
# 10/12/2012 V0.6 provide '-D ARG' option to list only most recent error
# messages
# 23/01/2013 V0.7 consider additional csback status file
# 01/03/2013 V0.8 Improve error handling and use error codes
# 05/01/2012 V0.1 Daniel Armbruster
# 12/01/2012 V0.2 provide nagios status line
# 10/05/2012 V0.3 provide output to stdout
# 18/05/2012 V0.4 provide information regarding possible message
# criticalities (thof)
# 19/05/2012 V0.5 Bug fixed - str.find didn't work as expected.
# 10/12/2012 V0.6 provide '-D ARG' option to list only most recent error
# messages
# 23/01/2013 V0.7 consider additional csback status file
# 01/03/2013 V0.8 Improve error handling and use error codes
# 17/03/2013 V0.8.1 show number of critical and error entries in mail
#
# =============================================================================
"""
......@@ -61,7 +62,7 @@ import csbackErrorCodes as eCodes
from email.mime.text import MIMEText
from collections import deque
__version__ = "V0.8"
__version__ = "V0.8.1"
__subversion__ = "$Id$"
__license__ = "GPLv2+"
__author__ = "Daniel Armbruster"
......@@ -363,7 +364,7 @@ def main(argv=None):
logger.getLogger().debug("Adding ERROR logfile lines to content.")
subject = 'csback report - severity: ERROR'
msg += '--------------------------\n'
msg += 'ERROR entries:\n'
msg += 'ERROR entries ({0}):\n'.format(len(errorList))
msg += '--------------------------\n'
for line in errorList:
msg += line
......@@ -372,7 +373,7 @@ def main(argv=None):
"Adding CRITICAL logfile lines to content.")
subject = 'csback report - severity: CRITICAL'
msg += '--------------------------\n'
msg += 'CRITICAL entries:\n'
msg += 'CRITICAL entries ({0}):\n'.format(len(criticalList))
msg += '--------------------------\n'
for line in criticalList:
msg += line
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment