이 콘텐츠는 선택한 언어로 제공되지 않습니다.
18.6. Configuring Nagios Manually
You can configure the Nagios server and node manually to monitor a Red Hat Gluster Storage trusted storage pool.
Note
It is recommended to configure Nagios using Auto-Discovery. For more information on configuring Nagios using Auto-Discovery, see Section 18.3.1, “Configuring Nagios”
For more information on Nagios Configuration files, see Chapter 21, Nagios Configuration Files
Configuring Nagios Server
- In the
/etc/nagios/gluster
directory, create a directory with the cluster name. All configurations for the cluster are added in this directory. - In the
/etc/nagios/gluster/cluster-name
directory, create a file with nameclustername.cfg
to specify thehost
andhostgroup
configurations. The service configurations for all the cluster and volume level services are added in this file.Note
Cluster is configured as host and host group in Nagios.In theclustername.cfg
file, add the following definitions:- Define a host group with cluster name as shown below:
define hostgroup{ hostgroup_name cluster-name alias cluster-name }
define hostgroup{ hostgroup_name cluster-name alias cluster-name }
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Define a host with cluster name as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Define Cluster-Quorum service to monitor cluster quorum status as shown below:
define service { service_description Cluster - Quorum use gluster-passive-service host_name cluster-name }
define service { service_description Cluster - Quorum use gluster-passive-service host_name cluster-name }
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Define the Cluster Utilization service to monitor cluster utilization as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the following service definitions for each volume in the cluster:
- Volume Status service to monitor the status of the volume as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Volume Utilization service to monitor the volume utilization as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Volume Split-brain service to monitor split brain status as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Volume Quota service to monitor the volume quota status as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Volume Geo-Replication service to monitor Geo Replication status as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- In the
/etc/nagios/gluster/cluster-name
directory, create a file with namehost-name.cfg
. The host configuration for the node and service configuration for all the brick from the node are added in this file.Inhost-name.cfg
file, add following definitions:- Define Host for the node as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the following services for each brick in the node:
- Add Brick Utilization service as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add Brick Status service as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Add host configurations and service configurations for all nodes in the cluster as shown in Step 3.
Configuring Red Hat Gluster Storage node
- In
/etc/nagios
directory of each Red Hat Gluster Storage node, editnagios_server.conf
file by setting the configurations as shown below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Thenagios_server.conf
file is used byglusterpmd
service to get server name, host name, and the process monitoring interval time. - Start the
glusterpmd
service using the following command:service glusterpmd start
# service glusterpmd start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Changing Nagios Monitoring time interval
By default, the active Red Hat Gluster Storage services are monitored every 10 minutes. You can change the time interval for monitoring by editing the gluster-templates.cfg
file.
- In
/etc/nagios/gluster/gluster-templates.cfg
file, edit the service withgluster-service
name. - Add
normal_check_interval
and set the time interval to 1 to check all Red Hat Gluster Storage services every 1 minute as shown below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To change this on individual service, add this property to the required service definition as shown below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Thecheck_interval
is controlled by the global directiveinterval_length
. This defaults to 60 seconds. This can be changed in/etc/nagios/nagios.cfg
as shown below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow