Created
May 31, 2011 12:14
-
-
Save Plasma/1000407 to your computer and use it in GitHub Desktop.
Health Check SD Plugin Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<checks> | |
<!-- Health Check configuration file --> | |
<!-- | |
Notes: | |
* Changes to this file are reflected immediately without the need to restart the SD Agent | |
* The 'name' argument is used to determine which 'key' is used in SD Dashboard/Graph plots. | |
You may specify a custom name to be specific, or omit the value to use an automatic value (such as the Url for web checks, or host:port combination for TCP checks). | |
* TCP socket checks immediately disconnect once the connection has been verified - no data is send or received | |
* These comments may be removed, but are here to serve as quick documentation | |
* A plot named '_OverallOk' is set to 1 when every check was Successful, otherwise it is 0. | |
This lets you alarm a single value to determine if any Web or Socket check has failed in one alert. | |
--> | |
<!-- Web HTTP Checks --> | |
<!-- | |
Type: web | |
Arguments: | |
- name: (Optional) Determines the 'unique key' used in the SD Agent for this Check and shown on the SD Dashboard/Graphs | |
If no name is provided, the key is calculated from the 'url' argument | |
- interval: (Optional) Determines how often this check is performed. By default, it is once every 60 seconds. | |
Format: 'hh:mm:ss' (Example: ... interval="00:05:00"... would run this check every 5 minutes) | |
- url: (Required) HTTP[S] address to access from the current machine to determine availability. A HTTP 200 OK response is required | |
- expect[ed]: (Optional) Only determine the check was successful if the page also contains a specific piece of text | |
Examples: | |
<web name="Google" url="http://www.google.com" expect="Feeling Lucky" /> | |
- Ensure www.google.com returns HTTP 200 OK, and contains the text 'Feeling Lucky' (case sensitive) in the response | |
<web url="http://www.google.com" /> | |
- Ensure www.google.com is online; reports the 'unique key' as 'http://www.google.com' (the Url) to SD | |
Response codes (accessed via SD website as plot values): | |
>= 0 : Response time of how long the request took in milliseconds (Successful check) | |
-1 : Url was either unreachable, or returned a response other than HTTP 200 OK | |
-2 : The Url was accessed successfully, but the 'expected' text (when set) was not found in the downloaded page contents | |
You may wish to plot result codes < 0 as an error. | |
--> | |
<!-- TCP Socket Checks --> | |
<!-- | |
Type: tcp | |
Arguments: | |
- name: (Optional) Determines the 'unique key' used in the SD Agent for this Check and shown on the SD Dashboard/Graphs | |
If no name is provided, the key is calculated from the 'host' and 'port' arguments (host:port) | |
- interval: (Optional) Determines how often this check is performed. By default, it is once every 60 seconds. | |
Format: 'hh:mm:ss' (Example: ... interval="00:05:00"... would run this check every 5 minutes) | |
- host: (Required) IP or DNS hostname of the local/remote computer to attempt to connect to | |
- port: (Required) The TCP port number to attempt a connection to | |
Examples: | |
<tcp name="MySQL-Server" host="10.0.0.1" port="3306" /> | |
- Ensure this machine can establish a TCP connection to a MySQL server running at 10.0.0.1 with the default port of 3306 | |
<tcp host="www.google.com" port="80" /> | |
- Ensure this machine can establish a TCP connection to www.google.com on port 80 | |
Response codes (accessed via SD website as plot values): | |
>= 0 : Response time of how long the request took in milliseconds (Successful check) | |
-1 : Could not establish a connection to the remote address | |
You may wish to plot result codes < 0 as an error. | |
--> | |
</checks> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment