This topic describes how to configure local service availability monitoring so that you can receive alarms if a local service does not respond within a specified timeout period or returns an error status code.
Based on local service availability monitoring, CloudMonitor helps you quickly locate issues when a local service has no response. CloudMonitor can send an alarm to you if the local service does not respond within a specified timeout period or returns an error status code.
- Local service availability monitoring depends on the CloudMonitor agent. Make sure that you have installed the CloudMonitor agent on the monitored host. For more information, see Introduction to the CloudMonitor GoLang agent.
- Before you use local service availability monitoring, you must Create application groups.
- Local service availability monitoring depends on the CloudMonitor agent. Make sure that you have installed the CloudMonitor agent on the monitored host.
- CloudMonitor performs the availability detection once a minute.
- Log on to the CloudMonitor console.
- In the left-side navigation pane, click Application Groups to go to the Application Groups page.
- Click the name of the application group where you want to create a local service availability monitoring task to go to the Basic Information page of the application group.
- In the left-side navigation pane, click Availability Monitoring to go to the Availability Monitoring.
- Click Create Configuration in the upper-right corner to go to the Create Availability Monitoring page.
- Set Task Name and Target Server. You can configure the same detection rule for all hosts in the group or some hosts in the group.
- Set Detection Type to URL or IP Address, ApsaraDB for RDS, or ApsaraDB for Redis. Afterward, set Detection Target.
- In the Alarm Configuration field, set the Status Code and Response Time metrics. CloudMonitor generates an alarm if either of these metrics reaches the specified threshold. The system sends alarms to the contact group of the corresponding application group.
- Click OK. If your service does not respond within the timeout period, you receive an alarm by means of SMS messages or emails, or in other ways.
- (Optional) The availability monitoring list displays the number of unhealthy hosts. Click the value in the Unhealthy Hosts column to view the details of the unhealthy hosts.
- Monitoring Configuration:
- Target Server: the host that initiates the detection. Target Server and Detection Target specify the same host.
- Detection Type: select URL orIP Address.
- Detection Target: if you select HTTP(S), enter the target address in the format of
localhost:port/path. If you select TELNET, enter the target address in the format of
127.0.0.1:port. For example, to test whether Apache Tomcat responds normally, select HTTP(S) and enter
localhost:8080/monitor. To test the connectivity of MySQL, select TELNET and enter
- Alarm Configuration:
The Status Code and Response Time parameters are used as the metrics of availability monitoring. CloudMonitor generates an alarm if either of the metrics reaches the specified threshold. The system sends alarms to the contact group of the corresponding application group. For local availability monitoring, set Status Code to a value greater than 400.
- Status Code: the system generates an alarm if the local service returns a status code as specified.
- Notification Method: the method that the system uses to send alarms.
- Advanced Configuration:
- Mute For: a period when your alarm rules are muted so that the system does not send any alarms even when the local service runs in the specified alarm conditions.
- Effective Period: the period when an alarm rule is effective. The system only sends alarms within the effective period according to the alarm rule. The system only records alarms if the alarms occur during a non-effective period.