Add Contact » History » Version 2
chin-yeh, 09/15/2010 03:09 PM
1 | 1 | chin-yeh | h1. Add Contact |
---|---|---|---|
2 | |||
3 | All of the contacts should be grouped under the following contact groups: |
||
4 | * warning-group - receives notification for *warning*, unknown, critical, recovery, flapping, scheduled downtime |
||
5 | * critical-group - receives notification for unknown, critical, recovery, flapping, scheduled downtime |
||
6 | |||
7 | # login to Nagios server using @nagios@ user |
||
8 | # edit @/usr/local/nagios/etc/ecosway/contacts/contacts.cfg@ |
||
9 | <pre> |
||
10 | nagios$ vi /usr/local/nagios/etc/ecosway/contacts/contacts.cfg |
||
11 | </pre> |
||
12 | * Template: |
||
13 | <pre> |
||
14 | define contact{ |
||
15 | contact_name an unique contact name |
||
16 | use either warning-contact or critical-contact |
||
17 | alias put the description here |
||
18 | email put the email here |
||
19 | 2 | chin-yeh | pager put the mobile no. here |
20 | address1 put the Google Talk ID here |
||
21 | 1 | chin-yeh | } |
22 | </pre> |
||
23 | * Example: |
||
24 | <pre> |
||
25 | define contact{ |
||
26 | contact_name warning-user |
||
27 | use warning-contact |
||
28 | alias Test User for Warning Notification |
||
29 | email ecosway.nagios.warning@gmail.com |
||
30 | 2 | chin-yeh | pager +601111111111 |
31 | address1 ecosway.nagios.warning |
||
32 | 1 | chin-yeh | } |
33 | </pre> |
||
34 | <pre> |
||
35 | define contact{ |
||
36 | contact_name critical-user |
||
37 | use critical-contact |
||
38 | alias Test User for Critical Notification |
||
39 | email ecosway.nagios.critical@gmail.com |
||
40 | 2 | chin-yeh | pager +6022222222222222 |
41 | address1 ecosway.nagios.critical |
||
42 | 1 | chin-yeh | } |
43 | </pre> |
||
44 | |||
45 | # assign the newly created user to the specified group by editing |
||
46 | <pre> |
||
47 | nagios$ vi /usr/local/nagios/etc/ecosway/contacts/contact_groups.cfg |
||
48 | </pre> |
||
49 | * Template: |
||
50 | <pre> |
||
51 | define contactgroup{ |
||
52 | contactgroup_name warning-group |
||
53 | alias Warning Group |
||
54 | members put the newly created user's contact name here |
||
55 | } |
||
56 | |||
57 | define contactgroup{ |
||
58 | contactgroup_name critical-group |
||
59 | alias Critical Group |
||
60 | members put the newly created user's contact name here |
||
61 | } |
||
62 | </pre> |
||
63 | * Example: |
||
64 | <pre> |
||
65 | define contactgroup{ |
||
66 | contactgroup_name warning-group |
||
67 | alias Warning Group |
||
68 | members warning-user |
||
69 | } |
||
70 | |||
71 | define contactgroup{ |
||
72 | contactgroup_name critical-group |
||
73 | alias Critical Group |
||
74 | members critical-user |
||
75 | } |
||
76 | </pre> |