summaryrefslogtreecommitdiffstats
path: root/config/glustercluster.cfg.sample
blob: 53f5ef98caba7ecf26de9353f1f1b6da88f71af9 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
################################################################################
##
## SAMPLE GLUSTER CLUSTER CONFIGURATION FOR NAGIOS
##
## This is an example of how Nagios can be configured to monitor your
## gluster cluster. Please use this as a reference.
## The sample configures a cluster "test-cluster" both as a host group
## and host. Volume and Cluster services are under the host "test-cluster"
##
#################################################################################


################################################################################
# Cluster is defined as hostgroup. All hosts in the cluster will have
# this hostgroup added in the "hostgroups" section
################################################################################
define hostgroup{
        hostgroup_name  test-cluster ; The name of the cluster hostgroup
        alias           TEST Cluster ; Long name of the group
        }

#################################################################################
# Cluster is also defined as a host. All cluster specific services should
# have host set as this cluster. For instance, Volume services
#################################################################################
define host{
        use             gluster-cluster         ; Inherit default values from a template
        host_name       test-cluster            ; The name of cluster. SHOULD BE SAME AS hostgroup defined above
        alias           test-cluster   ; A longer name to be used for display
        address         dummy            ; IP address of the host
}

################################################################################
# This defines a Host
# Edit this sample
#    host_name = FQDN or IP address of host
#    alias = Used for display
#    address = FQDN or IP address of host
#    hostgroups = Add the name of hostgroup defined for cluster
################################################################################
define host{
   use gluster-host
   host_name host.ipaddress1
   alias node-host.ipaddress1
   address host.ipaddress1
   hostgroups gluster_hosts,test-cluster ; SHOULD HAVE the cluster it belongs to
}

################################################################################
# This defines a Brick utilization service
# Edit this sample
#    host_name = host the brick is on
#    service_description = Brick Utilization - <brickdir>
#    _BRICK_DIR = Path to brick on server
#    _VOL_NAME  = Volume name the brick is part of
################################################################################
define service {
  use                   brick-service
  host_name             host.ipaddress1
  service_description   Brick Utilization - /bricks/b1
  _BRICK_DIR            /bricks/b1 ; MUST DECLARE the custom var _BRICK_DIR
  _VOL_NAME             Vol-1
}

################################################################################
# This defines a Brick Status service
# Edit this sample
#    host_name = host the brick is on
#    service_description = Brick - <brickdir>
#    _BRICK_DIR = Path to brick on server
#    _VOL_NAME  = Volume name the brick is part of
################################################################################
define service {
  use                   brick-passive-service
  host_name             host.ipaddress1
  service_description   Brick - /bricks/b1
  _BRICK_DIR            /bricks/b1 ; MUST DECLARE the custom var _BRICK_DIR
  _VOL_NAME             Vol-1
}

################################################################################
# This defines a Volume utilization service
# Edit this sample
#    host_name = the cluster host previously defined for cluster
#    service_description = Volume Utilization - <volname>
#    check_command = check_vol_utilization!<cluster-hostgroup-name>!<volume-name>!<warning>!<threshold>
#    _VOL_NAME = Volume name
################################################################################
define service{
  use                    gluster-service-with-graph
  host_name              test-cluster
  service_description    Volume Utilization - data-vol
  _VOL_NAME              data-vol ; MUST DECLARE the custom var _VOL_NAME
  check_command check_vol_utilization!test-cluster!data-vol!70!90
}

################################################################################
# This defines a Volume status service
# Edit this sample
#    host_name = the cluster host previously defined for cluster
#    service_description = Volume-status - <volname>
#    check_command = check_vol_status!<cluster-hostgroup-name>!<volume-name>
#    _VOL_NAME = Volume name
################################################################################
define service{
  use                    gluster-service-without-graph
  host_name              test-cluster
  service_description    Volume Status - data-vol
  _VOL_NAME              data-vol ; MUST DECLARE the custom var _VOL_NAME
  check_command check_vol_status!test-cluster!data-vol
}

################################################################################
# This defines a Volume Quota status service
# Edit this sample
#    host_name = the cluster host previously defined for cluster
#    service_description = Volume-status - <volname>
#    check_command = check_vol_quota_status!<cluster-hostgroup-name>!<volume-name>
#    _VOL_NAME = Volume name
################################################################################
define service{
  use                    gluster-service-without-graph
  host_name              test-cluster
  service_description    Volume Status Quota - data-vol
  _VOL_NAME              data-vol ; MUST DECLARE the custom var _VOL_NAME
  check_command check_vol_quota_status!test-cluster!data-vol
}

################################################################################
# This defines a Volume Split-brain status service
# Edit this sample
#    host_name = the cluster host previously defined for cluster
#    service_description = Volume Split-brain status - <volname>
#    check_command = check_vol_heal_status!<cluster-hostgroup-name>!<volume-name>
#    _VOL_NAME = Volume name
################################################################################
define service{
  use                    gluster-service-without-graph
  host_name              test-cluster
  service_description    Volume Split-brain status - data-vol
  _VOL_NAME              data-vol ; MUST DECLARE the custom var _VOL_NAME
  check_command check_vol_heal_status!test-cluster!data-vol
}

################################################################################
# This defines a Volume Geo Replication status service
# Edit this sample
#    host_name = the cluster host previously defined for cluster
#    service_description = Volume Geo-Replication - <volname>
#    check_command = check_vol_georep_status!<cluster-hostgroup-name>!<volume-name>
#    _VOL_NAME = Volume name
################################################################################
define service{
  use                    gluster-service-without-graph
  host_name              test-cluster
  service_description    Volume Geo-Replication - data-vol
  _VOL_NAME              data-vol ; MUST DECLARE the custom var _VOL_NAME
  check_command check_vol_georep_status!test-cluster!data-vol
}

################################################################################
# This defines a Cluster utilization service
# Edit this sample
#    host_name = cluster host previously defined. (The service is under a cluster)
################################################################################
define service{
  use                    gluster-service-with-graph
  host_name              test-cluster
  service_description    Cluster Utilization
  check_command check_cluster_vol_usage!80!90
}