ServersCheck.CONF File
From ServersCheck Wiki
Contents |
Advanced
The first five lines contain the general settings for your ServersCheck application. The order of the settings may not be altered and no spaces are allowed. When first installed the ServersCheck configuration file will look like this:
- SMTP:your.smptserver.com
- LOGFILE:true
- GRAPHS:true
- HTML:true
- SMS:C:\Program Files\SMS Centre\SMS Centre.exe
- SMTP: Next to the semicolon (:) enter your SMTP (outgoing mail server).
- LOGFILE: If you want ServersCheck to create a log file and store data whenever a check fails or a status of check changes, then set it to true. If you do not wish to use a log file, then leave it blank (LOGFILE:) or set it to false.
- GRAPHS: if set to true then ServersCheck will use the RRDTOOL.exe to produce graphs (SLA, Availability and value based). Leave it blank if you do not wish to use the graphing functionality
- HTML: if set to true then ServersCheck will create an HTML file for all checks at the end of each cycle and a separate file per check/ This HTML file is customizable to your own look and feel (see next section). Leave blank if you do not wish to use this functionality.
- SMS: (obsolete as of version 3.0.0) Provide here the location of the SMS Centre file which ServersCheck uses to generate SMS based alerts. If left blank or the setting is incorrect, then no SMS messages will be produced.
Structure of a Check
A check is made of 18 different parameters allowing you to customize a check to match your specific needs. Each parameter of a check is separated by the following string: |X| Not using this separator for a parameter will cause ServersCheck not to function properly.
The structure of a check (one line) is as follows:
# checktype|X|check label|X|retries|X|check interval in seconds|X|email alert to|X|network message to|X|sms alert to|X|fail on up/down|X|fail on value1|X|operand|X|target value1|X|fail on value2|X|operand|X|target value2|X|check definition|X|Time intervals When not to check|X|minimum service level in %|X|active|X|interval when down|X|icq alert|X|sound|X|alertwhen|X|team|X|execute|X|graphspan
- Check Type: this first parameter specifies what type of check needs to be performed. Currently following values are supported: URL , FTP , TCP , NNTP, SMTP , POP3 , SNMP , ODBC , PING , TEMP , POWER, FILE, FILECONTENT, PROCESS, SERVICE, ORACLE, MYSQL, EXTERNAL, DRIVESPACE. In the Checks Overview, you can find a detailed description of each of those checks. A new check starts for example with URL|X|
- Check Label: this is the name you want to give to the check. It will be used in the HTML report, graphs and in the alerts.
- Retries: when a check does not return the expected result then an error will be created with a possible notification. Before doing so you can defined ServersCheck to try again n times before actually considering the error as correct. When a check failed, ServersCheck will try to perform it until it has done it the number of times you speficied here.
- Check Interval: the value of this parameter is the minimum number of seconds that have to take place between the previous and the current check. In other words, perform this check with x amount of seconds between each cycle.
- Email Alert: the address specified here is the one to which alerts will be mailed to.
- Network Message: if you want to be notified by a network message, then set here as value the name of the computer you are work on
- SMS Alert: this is specific to SMS Centre. In order to be able to send out a message you need to configure SMS Centre first and create an entry in its phone book. ServersCheck uses the name in the phone book as value for SMS Centre to send the message. For example you could have an entry in the SMS Centre phone book John with John's mobile number. If you want John to receive an SMS for this check, then simply put here John as a value
- Fail UP/DOWN: (obsolete) ServersCheck will always perform this check
- Fail Value 1: some checks can receive values when executed (PING Round Trip Time, Temperature, SNMP). If you want to generate an alert when a value is too low then you need to set this field to true.
- Operand: this field has three possible values: lt (less than); gt (greater than); eq (equal to).
- Target: is the reference value against which the returned value is compared. Example: if you want an alert to be generated when the temperature is above 25 degrees C, then enter here 25. The check is always following: target operand returned value by check. If the result of the check is true, then an alert will be generated. In the example you would need to set as operand lt.
- Fail Value 2: identical to Fail Value 1 as some checks may return more than one value (currently only PING and URL).
- Operand: identical to previous operand.
- Target: identical to previous target.
- Check Definition: this is specific to the type of check.
- Skip Intervals: when defined it enables you to tell ServersCheck when not to perform the check. Time is indicated here in 24 hours format and always as HH:MM where HH represents the hour and MM the minutes. The first is the start time and then the end time. A correct structure will look like 11:00-12:00 This means that the check will not be performed between 11 and 12. You can add as many time ranges as you like by separating each of them by a ;.
- Minimum Service Level: a value in % that will be used in the SLA graph to draw a line on that value.
- Active: if set to yes then the check is performed, if set to no then the check will be skipped
- Interval When Down: if a value is set for this item then this interval will be used when the check is down.
- ICQ Number: if a value is set for this item then ICQ pager messages will be sent to this ICQ number.
- Sound: if set to yes then an alert will be generated
- Alert when: you can chose three possible (see configuration server for more info) values or leave it blank
- Team: rather than specify individual alerts you can alert a team based upon who's on duty.
- Execute: not active yet
- Graphspan: when blank the value is 1. You can specify any numeric value. The value determines who long back in time data is used to plot graph. Example: 7 means to plot a graph on the last week.
Important Note: all values are case sensitive!
Sample Check
To better understand the above defined structure we will explain following sample check:
URL|X|Demo Web Site Check|X|3|X|60|X|someone@someone.com|X|YOUR_COMPUTERNAME|X||X|true|X|true|X|lt|X|304|X||X|gt|X|25|X|http://www.serverscheck.comServersCheck|X|11:00-12:00;13:00-14:00|X|98|X|yes|X|
In this example, we perform a HTTP Content check (URL). The name of the check is "Demo Web Site Check". It will try to perform the checks 3 times before considering it as down. The minimum interval between two checks has to be 60 seconds. In the event of a down check, an email will be generated to someone@someone.com. Also a network message will be sent to the computer named YOUR_COMPUTERNAME. No SMS alert will be generated and it will fail either on an UP/DOWN check or when 304 is less than (lt) the returned value (for URL checks this is the HTTP Code). It will not perform a value 2 check. For URL checks the second value returned is the HTML download time. The check definition holds two parts: the URL to check separated by the lt;Xgt; separator and then the value it needs to find when executing the URL. The check is case sensitive. It will not execute the check between 11 and 12; and between 1pm and 2pm. It will draw a line at 98% (our minimum service level) and the check is activate (value is yes).
.DAT Files
In previous sections we have briefly explained the .DAT files that are in your ServersCheck directory. These files store all the check definitions and counters once ServersCheck has been started. Thanks to these .dat files you can stop the service, perform your maintenance and restart the service without having crucial counters (such as SLA %) being reset. Configuration files (.conf) are only loaded when the ServersCheck service is started for the first time. For every start after the initial one, ServersCheck will rely on the .DAT files and no longer the configuration file.
If you want to reset all counters and have ServersCheck start from scratch again, then you can delete the .DAT files once the service has been stopped.
.DAT files and their configuration are similar to the conf file but next to the check specification, it also holds all counter values. You can edit these files with a simple text editor.