Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changed watchdog->daemonwatch
  • Loading branch information
sebastien committed Mar 20, 2012
1 parent e5c78f9 commit a381989
Show file tree
Hide file tree
Showing 14 changed files with 1,425 additions and 1,363 deletions.
21 changes: 21 additions & 0 deletions Contrib/daemonwatch_upstart.conf
@@ -0,0 +1,21 @@
# upstart - Daemonwatch Configuration File
# ========================================
# updated: 2011-02-28

description "Daemonwatch - service monitoring daemon"
author "Sebastien Pierre <sebastien@ffctn.com>"

start on (net-device-up and local-filesystems)
stop on runlevel [016]

respawn
console output

script
# NOTE: Change this to wherever the daemonwatch is installed
DAEMONWATCH_HOME=/opt/services/daemonwatch
cd $DAEMONWATCH_HOME
# NOTE: Change this to wherever your custom daemonwatch script is installed
python $DAEMONWATCH_HOME/daemonwatch.py
end script
# EOF
22 changes: 0 additions & 22 deletions Contrib/watchdog_upstart.conf

This file was deleted.

4 changes: 2 additions & 2 deletions Examples/example-service-isrunning.py
@@ -1,4 +1,4 @@
from watchdog import *
from daemonwatch import *
__doc__ = """How to ensure that a given (HTTP) service stays up and running."""
Monitor(
Service(
Expand All @@ -18,7 +18,7 @@
# We kill the 'myservice-start.py' script if it exists
# and (re)start it, so that the 'http://localhost:8000' will
# become available
# NOTE: Restart will make the process a child of the watchdog, so
# NOTE: Restart will make the process a child of the daemonwatch, so
# you might prefer to use something like upstart
Restart("myservice-start.py")
]
Expand Down
4 changes: 2 additions & 2 deletions Examples/example-service-monitoring.py
@@ -1,11 +1,11 @@
#!/usr/bin/env python
from watchdog import *
from daemonwatch import *
Monitor(
Service(
name = "google-search-latency",
monitor = (
HTTP(
GET="http://www.google.ca/search?q=watchdog",
GET="http://www.google.ca/search?q=daemonwatch",
freq=Time.s(1),
timeout=Time.ms(80),
fail=[
Expand Down
4 changes: 2 additions & 2 deletions Examples/example-system-health.py
@@ -1,4 +1,4 @@
from watchdog import *
from daemonwatch import *
Monitor (
Service(
name = "system-health",
Expand All @@ -18,7 +18,7 @@
SystemHealth(
cpu=0.90, disk=0.90, mem=0.90,
freq=Time.s(60),
fail=[Log(path="watchdog-system-failures.log")]
fail=[Log(path="daemonwatch-system-failures.log")]
),
)
)
Expand Down
15 changes: 7 additions & 8 deletions Makefile
@@ -1,5 +1,5 @@
# Watchdog makefile
# ---------------
# Daemonwatch makefile
# --------------------
#
# Revision 1.5.1 (24-Mar-2006)
#
Expand All @@ -24,9 +24,8 @@
# Project variables___________________________________________________________
#
# Project name. Do not put spaces.
PROJECT = watchdog
PROJECT_VERSION = 0.9.0
PROJECT_STATUS = BETA
PROJECT = daemonwatch
PROJECT_VERSION = $(shell grep __version__ Sources/*.py | cut -d'"' -f2)

DOCUMENTATION = Documentation
SOURCES = Sources
Expand All @@ -39,10 +38,10 @@ DISTROCONTENT = $(DOCUMENTATION) $(SOURCES) $(TESTS) $(RESOURCES) \

# Project files_______________________________________________________________

PACKAGE = watchdog
PACKAGE = daemonwatch
MAIN =
MODULES = \
watchdog \
daemonwatch \

TEST_MAIN = $(TESTS)/$(PROJECT)Test.py
SOURCE_FILES = $(shell find $(SOURCES) -name "*.py")
Expand Down Expand Up @@ -90,7 +89,7 @@ all: prepare clean check test doc dist
@echo "Making everything for $(PROJECT)"

info:
@echo "$(PROJECT)-$(PROJECT_VERSION) ($(PROJECT_STATUS))"
@echo "$(PROJECT)-$(PROJECT_VERSION)"
@echo Source file lines:
@wc -l $(SOURCE_FILES)

Expand Down
8 changes: 4 additions & 4 deletions README.rst
@@ -1,5 +1,5 @@
Watchdog - Server monitoring and data-collection Daemon
=======================================================
Daemonwatch - Server monitoring and data-collection daemon
==========================================================

We want...
----------
Expand Down Expand Up @@ -29,9 +29,9 @@ Use Cases
Installation
------------
Sorry, no 'setup.py' for now. Just have a look in the 'Examples' and 'Test'
directories for more info. Just be sure that 'Source/watchdog.py' is
directories for more info. Just be sure that 'Source/daemonwatch.py' is
in 'sys.path'.

More?
-----
Read the `presentation on Watchdog <http://ur1.ca/45ku5>`_
Read the `presentation on Daemonwatch <http://ur1.ca/45ku5>`_
3 changes: 3 additions & 0 deletions Scripts/daemonwatch
@@ -0,0 +1,3 @@
#!/usr/bin/python
import sys, daemonwatch
daemonwatch.command(sys.argv[1:])

0 comments on commit a381989

Please sign in to comment.