MS-SQL File size

Purpose

To monitor database files size, with the ability to filter by type of file and specific filenames if necessary.

Context

SQL Server files can grow automatically from their originally specified size.

When you define a file, you can specify a specific growth increment.

Every time the file is filled, it increases its size by the growth increment.

If there are multiple files in a filegroup, they will not autogrow until all the files are full.

Each file can also have a maximum size specified. If a maximum size is not specified, the file can continue to grow until it has used all available space on the disk.

It is important then to be able to monitor SQL server files size evolution

Monitor features include :

Monitoring of every SQL Server file type (Data - row -, Log ...) and specific file name

It is able to alert if a file size (of any type) has reached a given threshold expressed in MB

Configuration hints

Surveillance table:

This is a table of rules that you can use to configure and customize the configuration.

Each line of the table will define a rule of monitoring. You can combine multiple rules to cover different cases.

Within a rule, you can configure the SQL Server file type you want to monitor, specific file name(s) using regular expressions, a file size threshold in MB

File type
Select the specific SQL server file type you want to monitor , select “Any” to monitor any kind of file size, select “Aggregate if you need to monitor the total size of all database files

File name:
You can set a file specific rule by setting its name in the File name filter field. Use * to match any file name, or use regular expressions.

File size in MB:
Use the multi-threshold syntax to set multiple threshold/severity associations: G2W:1024 W2M:2048 M2C:4096 (Green To Warning, Warning To Major, etc...), expressed in MB An alarm of the corresponding severity will be sent if file size is over threshold. Set 0 in the field if unused

Notice that values retrieved will be rounded

Surveillance table

Parameter	Description
Active	Use this field to activate or deactivate a line of configuration.
File type	Select the specific SQL Server file type you want to monitor Select “Any” so to monitor every type of file Select “Aggregate” if you want to monitor the size of all database files (aggregated)
File name	A filter to match only a specific SQL Server file name, you can use regular expression, white or black list
File size in MB	The threshold for the file size elapsed time from the last backup. You can use the multi threshold syntax (i.e. : G2W:10 W2C:40) . Values have to be expressed in MB
Auto clear	If checked, the alarm will be cleared as soon as the alarm condition is not met anymore.
Alarm tag	This field allows to add custom text within the alarm message. %MSG% variable will contain the actual generated message and can be used such as: “my_prefix %MSG% my_suffix”. By default, tag will be used as prefix.
Alarm	If checked, this line of surveillance will be used for alarm generation.
Metric	If checked, this line of surveillance will be used for metric generation.
Report	If checked, this line of surveillance will used for showing threshold and severity in the daily report

Examples

Active	File type	File name	File size in MB	Auto clear	Alarm tag	Alarm	Metric	Report
true	Data	DBDATA	G2W:1024 W2M:2048	true	true	true	true

Effect : For this rule, only Data - rows - type files will be monitored (File Type set to : “Data”).

All Data type files containing the string “DBDATA” on their file names will be taken into account. A WARNING alarm is sent if the file size 1024 MB or more, a MAJOR alarm if 2048 MB or more.

Generated metrics

metricId	metricUnit	metricTarget	metricDescription
MSSQL_DATABASE_AGG_FILE_SIZE	MB	AGGREGATE	The addition of all retrieved SQL Server file sizes - aggregated - of a given database, expressed in MB
MSSQL_DATABASE_FILE_SIZE	MB	[File type] - [File name]

expressed in MB|