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
Cédric Heintz
picomon
Commits
9894b6af
Commit
9894b6af
authored
Aug 24, 2014
by
Jonathan Michalon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename the 'lib' module to 'picomon'
parent
f7d2adce
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
10 additions
and
10 deletions
+10
-10
README.md
README.md
+3
-3
config-sample.py
config-sample.py
+4
-4
picomon.py
picomon.py
+2
-2
picomon/__init__.py
picomon/__init__.py
+0
-0
picomon/attrtree.py
picomon/attrtree.py
+0
-0
picomon/checks.py
picomon/checks.py
+0
-0
picomon/mails.py
picomon/mails.py
+0
-0
picomon/subprocess_compat/__init__.py
picomon/subprocess_compat/__init__.py
+0
-0
picomon/subprocess_compat/_threaded_popen.py
picomon/subprocess_compat/_threaded_popen.py
+0
-0
picomon/subprocess_compat/_timeout_popen.py
picomon/subprocess_compat/_timeout_popen.py
+0
-0
picomon_watchdog.py
picomon_watchdog.py
+1
-1
No files found.
README.md
View file @
9894b6af
...
...
@@ -36,7 +36,7 @@ Everything can be configured from config.py: notified email(s), base tick, hosts
The
`base_tick`
option defines the base granularity (in seconds) for polling.
`Host`
s are shorthands to avoid repeating addresses within checks.
Checks are then defined as a list of
`Check`
-derived class instances that
implement every single check (see
lib
/checks.py).
implement every single check (see
picomon
/checks.py).
Each check may be initialised with some options:
...
...
@@ -45,12 +45,12 @@ Each check may be initialised with some options:
*
`timeout`
: subcommand timeout, to avoid stalling checks (defaults to 2 seconds);
*
`target_name`
: human-readable name of the target of the check (automatically set by the
`name`
option if using
`Host`
instances).
In addition some checks have specific options, see
lib
/checks.py for examples.
In addition some checks have specific options, see
picomon
/checks.py for examples.
In case you want to check lesser important services and configure very long check intervals, you may
want to have another interval, global to all checks, for error retries. This can be set with the
`error_every`
option.
For a full list of all available options, see the
lib
/__init__.py file.
For a full list of all available options, see the
picomon
/__init__.py file.
Current state output
--------------------
...
...
config-sample.py
View file @
9894b6af
from
lib
.checks
import
*
from
lib
import
config
from
picomon
.checks
import
*
from
picomon
import
config
# This is a sample config file, so that you have the most useful parameters
# to hand in there, along with their default value
# For a full, explained list see
lib
/__init__.py
# For a full, explained list see
picomon
/__init__.py
# Polling
...
...
@@ -66,7 +66,7 @@ v6only = Host(ipv6='2001:0DB8::beef')
day
=
86400
/
config
.
base_tick
halfday
=
43200
/
config
.
base_tick
# For a list of checks, see the different classes in
lib
/checks.py
# For a list of checks, see the different classes in
picomon
/checks.py
config
.
checks
.
add
([
CheckPing4
,
CheckPing6
],
[
localhost
,
h1
],
retry
=
2
,
every
=
5
)
#config.checks.add(CheckDNSZone, ["example.net", "example.org"], ip_version=4)
...
...
picomon.py
View file @
9894b6af
...
...
@@ -6,8 +6,8 @@ import importlib
import
sys
import
os
from
time
import
sleep
from
lib
import
config
from
lib
import
mails
from
picomon
import
config
from
picomon
import
mails
from
datetime
import
datetime
,
timedelta
...
...
lib
/__init__.py
→
picomon
/__init__.py
View file @
9894b6af
File moved
lib
/attrtree.py
→
picomon
/attrtree.py
View file @
9894b6af
File moved
lib
/checks.py
→
picomon
/checks.py
View file @
9894b6af
File moved
lib
/mails.py
→
picomon
/mails.py
View file @
9894b6af
File moved
lib
/subprocess_compat/__init__.py
→
picomon
/subprocess_compat/__init__.py
View file @
9894b6af
File moved
lib
/subprocess_compat/_threaded_popen.py
→
picomon
/subprocess_compat/_threaded_popen.py
View file @
9894b6af
File moved
lib
/subprocess_compat/_timeout_popen.py
→
picomon
/subprocess_compat/_timeout_popen.py
View file @
9894b6af
File moved
picomon_watchdog.py
View file @
9894b6af
import
subprocess
import
config
from
lib
import
mails
from
picomon
import
mails
retcode
=
subprocess
.
call
([
"python3"
,
"picomon.py"
])
...
...
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