forked from example42/puppi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.check
52 lines (43 loc) · 2.15 KB
/
README.check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
= PUPPI CHECK INSTRUCTIONS
Documentation and examples related to the puppi action check
== SYNOPSIS (cli)
puppi check [project_name] [-r yes|no|fail]
== EXAMPLES (cli)
* puppi check : Run host-wide checks.
* puppi check myapp : Run project "myapp" specific tests AND host-wide checks
* puppi check -r fail : Run checks and send reports only if some of them fail
* puppi check -r yes : Run checks and send reports
* puppi check -s fail : Run checks and show only failed ones
== EXAMPLES (puppet)
The basic define related to a check is:
puppi::check - Creates a single command to be placed in the check sequence.
A simple example might be:
puppi::check { "Port_Apache":
command => "check_tcp -H ${fqdn} -p 80" ,
}
but also something that uses variables Puppet already knows
puppi::check { "apache_process":
command => "check_procs -c 1: -C ${apache::params::processname}" ,
}
To avoid repetitions you can include the relevant checks in defines you already have
to manage, for example, virtualhosts, and use the data you already provide to configure
their local puppi checks.
puppi::check { "Url_$name":
enable => $enable,
command => "check_http -I '${target}' -p '${port}' -u '${url}' -s '${pattern}'" ,
}
== EXAMPLES (with example42 puppet modules)
If you use the whole Example42 modules set you get automatically many service related checks out of the box.
Just set (via an ENC, facts or manifests) these puppet variables:
$monitor="yes" # To enable automagic monitoring
$monitor_tool = "puppi" # As monitoring tool define at least puppi. If you like Nagios, you may use:
$monitor_tool = ["nagios","puppi"] # This enables the below checks both for Puppi and Nagios
$puppi=yes # To enable puppi extensions autoloading
To the port and service checks automatically added for the included modules, you can add custom url checks
with something like:
monitor::url { "URL_Check_Database_Connection":
url => "http://www.example42.com/check/db",
pattern => 'SUCCESS',
port => '80',
target => "${fqdn}",
}