![]() |
FRED™
3.0
FRED™: Framework for Rapid and Easy Development
|
Public Member Functions | |
| check () | |
| Perform all checks. More... | |
| data ($since=null) | |
| Get available data. More... | |
| graph ($width=640, $height=480, $since=null) | |
| Create a graph with all data points. More... | |
Public Member Functions inherited from Component | |
| __construct ($fred, $config=null) | |
| __destruct () | |
| clientConfig () | |
| Public configuration. More... | |
| config ($key, $default=null) | |
| Retrieve a config value. More... | |
| ping () | |
| Ping function. More... | |
| filemtime ($filename) | |
| Filemtime with session cache. More... | |
| component ($name) | |
| Get a component (local or default). More... | |
| components (... $names) | |
| Get multiple components in an array. More... | |
Public Member Functions inherited from Thing | |
| propertyExists ($property) | |
| Check if a property exists (public or published). More... | |
| constants ($prefix=null) | |
| Return all constants. More... | |
| get ($key) | |
| Get one or more properties. More... | |
| set ($key, $value=null) | |
| Set one or more properties. More... | |
| __get ($key) | |
| __set ($key, $value) | |
Data Fields | |
| $retentionPeriod = 28 | |
| Number of days to keep data. More... | |
| $interval = 60 | |
| Minimal mail interval (minutes). More... | |
| $from = null | |
| Sender (defaults to default From address). More... | |
| $to = null | |
| Send mail to this address (or array for multiple; defaults to default From address). More... | |
| $subject = 'Health warning for *' | |
| Subject for the mail (an asterisk is replaced with the host name). More... | |
| $template = null | |
| Template for mail message. More... | |
| $graphFont = 3 | |
| $graphColors = [[200,0,0],[0,200,0],[0,0,200],[200,200,0],[0,200,200],[200,0,200],[100,0,0],[0,100,0],[0,0,100],[100,100,0],[0,100,100],[100,0,100]] | |
| $graphIntervalFactors = [2.5,2,2] | |
| $graphSecondaryFactor = 5 | |
Data Fields inherited from Component | |
| $filemtimeTtl = 0 | |
Data Fields inherited from Thing | |
| const | HIDDEN = 0 |
| Property is hidden. More... | |
| const | READABLE = 1 |
| Property is readable. More... | |
| const | WRITEABLE = 2 |
| Property is writeable. More... | |
| const | READWRITE = 3 |
| Property is readable and writeable. More... | |
Protected Member Functions | |
| save ($data) | |
| Save the check results. More... | |
| send ($messages) | |
| getChecks () | |
Protected Member Functions inherited from Component | |
| init () | |
| done () | |
| getSession () | |
Protected Member Functions inherited from Thing | |
| publish ($property, $visibility=self::READABLE) | |
| Publish a property (or hide it again). More... | |
| alias ($alias, $property, $object=null) | |
| Define an alias for a property (of another object). More... | |
| configure ($config) | |
| Configure the object. More... | |
| _get ($key) | |
| Default getter if no specific setter is defined, and the property is also not published (readable). More... | |
| _set ($key, $value) | |
| Default setter if no specific setter is defined, and the property is also not published (writeable). More... | |
Protected Attributes | |
| $_checks = null | |
| Available checks (key = name, value = \Rsi\Fred\Health\Check). More... | |
Protected Attributes inherited from Component | |
| $_fred = null | |
| $_config = null | |
| $_name = null | |
| $_components = [] | |
| Local components (key = component name, value = component). More... | |
| $_session = null | |
Protected Attributes inherited from Thing | |
| $_published = [] | |
| Published properties (key = name of property, value = visibility). More... | |
| $_aliases = [] | |
| Alias properties (key = alias, value = [object,property]). More... | |
Health checks.
Definition at line 8 of file Health.php.
| check | ( | ) |
Perform all checks.
Definition at line 52 of file Health.php.
| data | ( | $since = null | ) |
Get available data.
| int | $since | Return data since this timestamp (empty = all). |
Definition at line 66 of file Health.php.
|
protected |
Definition at line 153 of file Health.php.
| graph | ( | $width = 640, |
|
$height = 480, |
|||
$since = null |
|||
| ) |
Create a graph with all data points.
| int | $width | Width of image (pixels). |
| int | $height | Height of image (pixels). |
| int | $since | Use data since this timestamp (empty = all). |
Definition at line 76 of file Health.php.
|
protected |
Save the check results.
| array | $data | Key = check name, value = check result. |
Definition at line 28 of file Health.php.
|
protected |
Definition at line 31 of file Health.php.
|
protected |
| $from = null |
Sender (defaults to default From address).
Definition at line 12 of file Health.php.
| $graphColors = [[200,0,0],[0,200,0],[0,0,200],[200,200,0],[0,200,200],[200,0,200],[100,0,0],[0,100,0],[0,0,100],[100,100,0],[0,100,100],[100,0,100]] |
Definition at line 18 of file Health.php.
| $graphFont = 3 |
Definition at line 17 of file Health.php.
| $graphIntervalFactors = [2.5,2,2] |
Definition at line 19 of file Health.php.
| $graphSecondaryFactor = 5 |
Definition at line 20 of file Health.php.
| $interval = 60 |
Minimal mail interval (minutes).
Definition at line 11 of file Health.php.
| $retentionPeriod = 28 |
Number of days to keep data.
Definition at line 10 of file Health.php.
| $subject = 'Health warning for *' |
Subject for the mail (an asterisk is replaced with the host name).
Definition at line 14 of file Health.php.
| $template = null |
Template for mail message.
Definition at line 15 of file Health.php.
| $to = null |
Send mail to this address (or array for multiple; defaults to default From address).
Definition at line 13 of file Health.php.