1 |
class xymon::server { |
2 |
package { ['xymon','fping']: } |
3 |
|
4 |
service { 'xymon': |
5 |
hasstatus => false, |
6 |
status => "su xymon -c '$::lib_dir/xymon/server/hobbit.sh status'", |
7 |
require => Package['xymon'], |
8 |
} |
9 |
|
10 |
File { |
11 |
group => 'xymon', |
12 |
require => Package['xymon'], |
13 |
notify => Exec['service xymon reload'], |
14 |
} |
15 |
|
16 |
file { |
17 |
# Environment variables user by hobbitd,hobbitlaunch,hobbitd_rrd,CGIs |
18 |
# and bbgen (which generates the static html pages) |
19 |
# hobbitlaunch (started by init script) may need to be restarted for |
20 |
# changes here, for hobbitd_rrd (e.g. TEST2RRD), it is sufficient to |
21 |
# kill hobbitd_rrd, hobbitlaunch will respawn it |
22 |
'/etc/xymon/hobbitserver.cfg': content => template('xymon/hobbitserver.cfg'); |
23 |
|
24 |
# Define hosts and web view layout, and lists tests to be run against |
25 |
# host by e.g. network tests from xymon server |
26 |
'/etc/xymon/bb-hosts': content => template('xymon/bb-hosts'); |
27 |
|
28 |
# Defines thresholds for test data reported by clients, e.g. load |
29 |
# disk, procs, ports, memory, as well as those which require some |
30 |
# configuration server side to the client: files, msgs, |
31 |
'/etc/xymon/hobbit-clients.cfg': content => template('xymon/hobbit-clients.cfg'); |
32 |
|
33 |
# Configuration for the xymon clients, which log files to process etc. |
34 |
'/etc/xymon/client-local.cfg': content => template('xymon/client-local.cfg'); |
35 |
|
36 |
# Used for alerting, changes should be taken into effect immediately |
37 |
'/etc/xymon/hobbit-alerts.cfg': content => template('xymon/hobbit-alerts.cfg'); |
38 |
} |
39 |
|
40 |
# Most changes should take effect immediately, but sometimes threshold |
41 |
# changes take effect sooner if hobbit is HUPd |
42 |
exec { 'service xymon reload': |
43 |
refreshonly => true, |
44 |
require => Package['xymon'], |
45 |
} |
46 |
} |