-
Notifications
You must be signed in to change notification settings - Fork 0
Settings
Monitask settings are stored in .INI plain text files.
Each config file consists of global settings and sections with local settings. Each setting is of form name = value, where name may contain [] notation to indicate arrays and value may contain references to environment variables and a special DIR constant, containing the program folder. value may be split on multiple lines if it is wrapped with double quote (") characters.
Sections are started with [section name] line. Settings on lines following [section name] line only apply to section name section.
Global settings precede the first section of each config file. After the first section declaration there is no way to declare any global setting.
There is a possibility for a config file to include other config files.
There are two types of config files:
- one main configuration file and
- zero to many block configuration files.
Config file, specified on command line call to run-monitask.php command (or default config if not specified) is considered a main configuration file. It provides overall information on what periods are defined and what type of support is used for storing and exporting data.
Files included from other config files are considered block configuration files. They provide information about a particular block of metrics (one block per file). Each block may contain several graphs and each graph displays one or more metrics.
Main settings datastore and export may only appear in Main configuration file, not block files.
By contrast, block settings may appear in main config file, but will only describe one block.
See also:
May be provided as a second argument to run-monitask.php script. Otherwise the default value is ini/monitask.ini.
This section describes datastore parameters. The type setting defines the type of datastore. periods, bins and start_time settings allow to maintain the store data structure. Other settings are dependent of datastore type.
Identifies the type of datastore. Currently only csv is implemented.
Describes number of periods, their labels and lengths.
Example:
period['by day'] = "-2 days"
period['by week'] = "-9 days"
period['by month'] = "-45 days"
period['by year'] = "-450 days"
This structure describes 4 periods, each represented by its name and a strtotime() pattern that indicates a point in past, relative to current time.
The first period is named by day and will hold information about the last 2 days of metrics. Which represents 172800 seconds.
The period by year for the last 450 days represents 38880000 seconds of data.
Each metric will be registered in every period. So each graph may be displayed for 4 different periods.
A bin represents a point on horizontal (time) axis of a graph. Each bin has its unique time frame within the graph and contains metrics that were collected during that time. bins directive indicates how many data points will be present on horizontal axis of graphs.
Example:
bins = 100
This value means that each graph will contain maximum 100 data points. For 2-days periods (172800 seconds) each bin will contain metrics for 1728 seconds. For 450-days periods (38880000 seconds) every bin stores metrics for 388800 seconds.
New bins are created when a bin's time frame is over. At this moment, if total number of graph bins outnumbers bins value, the older bins will be dropped.
Where the data is saved. Running Monitask with --datastore argument creates the datafile, --collect saves metrics to datafile, --export reads metrics and outputs it in a specified format.