Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
monitoring
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pika
monitoring
Commits
2586bd3b
Commit
2586bd3b
authored
Feb 07, 2020
by
fwinkler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified email script.
Grep for errors for files not older than 1 day.
parent
76d597c9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
daemon/logrotate/pika_mail_errors.sh
daemon/logrotate/pika_mail_errors.sh
+6
-2
daemon/logrotate/pika_prerotate.sh
daemon/logrotate/pika_prerotate.sh
+1
-0
No files found.
daemon/logrotate/pika_mail_errors.sh
View file @
2586bd3b
...
...
@@ -9,8 +9,12 @@ touch $MAILTEXT_FILE
# grep for various errors in logfile
cat
$COLLECTD_LOGFILE
|
grep
-i
"error"
>>
$MAILTEXT_FILE
# search for error in debug output
grep
-i
"error "
/tmp/pika_debug/pika_
*
>>
$MAILTEXT_FILE
# search for error in debug output (only for files not older than 1 day)
files
=
"
$(
find /tmp/pika_debug/pika_
*
-mtime
-1
)
"
for
file
in
"
$files
"
do
grep
-i
"error "
$file
>>
$MAILTEXT_FILE
done
#check size of mail file
FILESIZE
=
$(
stat
-c
%s
"
$MAILTEXT_FILE
"
)
...
...
daemon/logrotate/pika_prerotate.sh
View file @
2586bd3b
#!/bin/bash
sh /sw/taurus/tools/pika/daemon/logrotate/pika_mail_errors.sh
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment