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
P
picomon
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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
glucas
picomon
Commits
1e92bc1f
Commit
1e92bc1f
authored
Jul 20, 2014
by
Jonathan Michalon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Very simple and naive watchdog that alerts when the actual process quits
parent
3096e71b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
lib/__init__.py
lib/__init__.py
+2
-0
picomon_watchdog.py
picomon_watchdog.py
+11
-0
No files found.
lib/__init__.py
View file @
1e92bc1f
...
...
@@ -35,3 +35,5 @@ config.install_attr('emails.subject_tpl',
'[DOMAIN] {state}: {check} on {dest}'
)
# reports email subject
config
.
install_attr
(
'emails.report.subject'
,
'[DOMAIN] Picomon error report'
)
# watchdog error email subject
config
.
install_attr
(
'emails.watchdog_subject'
,
'[DOMAIN] Picomon stopped'
)
picomon_watchdog.py
0 → 100644
View file @
1e92bc1f
import
subprocess
import
config
from
lib
import
mails
retcode
=
subprocess
.
call
([
"python3"
,
"picomon.py"
])
mails
.
send_email
(
config
.
emails
.
watchdog_subject
,
"Picomon exited with status %s"
%
retcode
)
mails
.
quit
()
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