diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-07-17 11:33:57 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-07-17 11:33:57 +0200 |
commit | 3bc32d9ebd9b0900eeef756122ad28f8857f8bfe (patch) | |
tree | ff92459e654fde6fe559dfd383d6a76e05a347cf /modules/private/monitoring/conf/objects.cfg | |
parent | e886ea19877fa0d4de32d35939f69e9c18681d59 (diff) | |
download | Nix-3bc32d9ebd9b0900eeef756122ad28f8857f8bfe.tar.gz Nix-3bc32d9ebd9b0900eeef756122ad28f8857f8bfe.tar.zst Nix-3bc32d9ebd9b0900eeef756122ad28f8857f8bfe.zip |
Add monitoring modules via naemon
Diffstat (limited to 'modules/private/monitoring/conf/objects.cfg')
-rw-r--r-- | modules/private/monitoring/conf/objects.cfg | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/modules/private/monitoring/conf/objects.cfg b/modules/private/monitoring/conf/objects.cfg new file mode 100644 index 0000000..653477f --- /dev/null +++ b/modules/private/monitoring/conf/objects.cfg | |||
@@ -0,0 +1,84 @@ | |||
1 | # vim: filetype=nagios | ||
2 | |||
3 | define command { | ||
4 | command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 | ||
5 | command_name check-host-alive | ||
6 | } | ||
7 | |||
8 | define command { | ||
9 | command_line $USER2$/check_md_raid | ||
10 | command_name check_md_raid | ||
11 | } | ||
12 | |||
13 | define command { | ||
14 | command_line $USER2$/check_command -c "$ARG1$" -o "$ARG2$" $ARG3$ | ||
15 | command_name check_command_output | ||
16 | } | ||
17 | |||
18 | |||
19 | define command { | ||
20 | command_line /usr/bin/sudo -u postgres $USER2$/check_postgres_replication "$ARG1$" "$ARG2$" "$ARG3$" | ||
21 | command_name check_postgresql_replication | ||
22 | } | ||
23 | |||
24 | define service { | ||
25 | ## --PUPPET_NAME-- (called '_naginator_name' in the manifest) Databases are present in postgresql | ||
26 | active_checks_enabled 1 | ||
27 | check_command check_command_output!psql -c 'select nspname from pg_catalog.pg_namespace'!public!-r postgres | ||
28 | check_freshness 0 | ||
29 | check_interval 5 | ||
30 | check_period 24x7 | ||
31 | contact_groups admins | ||
32 | event_handler_enabled 1 | ||
33 | flap_detection_enabled 1 | ||
34 | host_name caldance-1.v.immae.eu | ||
35 | is_volatile 0 | ||
36 | max_check_attempts 4 | ||
37 | notification_interval 60 | ||
38 | notification_options w,u,c,r | ||
39 | notification_period 24x7 | ||
40 | notifications_enabled 0 | ||
41 | obsess_over_service 1 | ||
42 | passive_checks_enabled 1 | ||
43 | process_perf_data 1 | ||
44 | retain_nonstatus_information 1 | ||
45 | retain_status_information 1 | ||
46 | retry_interval 1 | ||
47 | service_description Databases are present in postgresql | ||
48 | } | ||
49 | |||
50 | define command { | ||
51 | command_line $USER2$/check_last_file_date "$ARG1$" "$ARG2$" "$ARG3$" | ||
52 | command_name check_last_file_date | ||
53 | } | ||
54 | |||
55 | define command { | ||
56 | command_line $USER2$/check_date "$ARG1$" "$ARG2$" "$ARG3$" | ||
57 | command_name check_date | ||
58 | } | ||
59 | |||
60 | define service { | ||
61 | ## --PUPPET_NAME-- (called '_naginator_name' in the manifest) Postgresql replication for backup-1 is up to date | ||
62 | active_checks_enabled 1 | ||
63 | check_command check_postgresql_replication!backup-1!/run/postgresql!5432 | ||
64 | check_freshness 0 | ||
65 | check_interval 5 | ||
66 | check_period 24x7 | ||
67 | contact_groups admins | ||
68 | event_handler_enabled 1 | ||
69 | flap_detection_enabled 1 | ||
70 | host_name caldance-1.v.immae.eu | ||
71 | is_volatile 0 | ||
72 | max_check_attempts 4 | ||
73 | notification_interval 60 | ||
74 | notification_options w,u,c,r | ||
75 | notification_period 24x7 | ||
76 | notifications_enabled 0 | ||
77 | obsess_over_service 1 | ||
78 | passive_checks_enabled 1 | ||
79 | process_perf_data 1 | ||
80 | retain_nonstatus_information 1 | ||
81 | retain_status_information 1 | ||
82 | retry_interval 1 | ||
83 | service_description Postgresql replication for backup-1 is up to date | ||
84 | } | ||