config.py 1.38 KB
Newer Older
Jonathan Michalon's avatar
Jonathan Michalon committed
1
from lib.checks import *
2
from lib import config
Jonathan Michalon's avatar
Jonathan Michalon committed
3 4


5 6
# This is the base granularity (in seconds) for polling
# Each check may then individually be configured to run every N * tick
7
config.base_tick = 60
8

9
# Email addresses to send to when an alert is triggered
10
config.emails.to.append('john@localhost')
11 12 13 14
# The From: address
#config.emails.addr_from = 'Picomon <picomon@domain.tld>
# The SMTP host, with optional :port suffix
#config.emails.smtp_host = 'localhost:25'
15

16 17 18 19 20
# Subject template for state change email notifications
# available substitutions:
#   - state ("Problem" or "OK")
#   - check (check's name, like "CheckDNSRec6")
#   - dest  (the target of the check ie. an IP or a Host's 'name' parameter)
21
config.emails.subject_tpl = "[ARN] {state}: {check} on {dest}"
22 23 24 25


mail     = Host(ipv4='127.0.0.1', ipv6='::1', name='LXC mail')
web      = Host(ipv4='127.0.0.0', ipv6='::42', name='Bad IPs')
26
alsace   = Host(ipv4='127.0.0.1', ipv6='::1')
Colomban Wendling's avatar
Colomban Wendling committed
27 28
recursif = Host(ipv4='89.234.141.66', ipv6='2a00:5881:8100:1000::31',
                name='DNS récursif')
Jonathan Michalon's avatar
Jonathan Michalon committed
29

30 31 32 33 34 35 36
config.checks.add(CheckDNSZone, ["arn-fai.net", "netlib.re"], ip_version=4)
config.checks.add(CheckPing4, [mail, web], retry=2)
config.checks.add(CheckPing6, [mail, web], retry=2)
config.checks.add(CheckDNSRec4, [recursif])
config.checks.add(CheckDNSRec6, [recursif])
# config.checks.add(CheckSMTP4, [mail, alsace])
# config.checks.add(CheckSMTP6, [mail, alsace])