MetricsModule
MetricsModule
Class ConfigModule.
class MetricsModule extends \Hazaar\Console\Modules\ModuleConsole module for viewing and modifying application configuration. Provides commands to show, check, and get configuration values.
Methods
configure
Configures the console module by registering methods and commands.
protected configure(): void- Registers the 'prepareApp' method.
- Sets the module name to 'config' and provides a description.
- Adds the following commands:
- 'show': Displays the application configuration.
- 'check': Checks the application configuration.
- 'get': Views a specific configuration option, requires an 'option' argument.
listMetrics
protected listMetrics(Input $input, Output $output): intParameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | |
$output | Output |
listArchives
Lists available metric archives and outputs their details.
protected listArchives(Metric $metrics, Output $output): intThis method retrieves all archives from the given Metric instance, and writes their ID, description, tick count, and row count to the provided Output.
Parameters
| Parameter | Type | Description |
|---|---|---|
$metrics | Metric | the Metric instance to retrieve archives from |
$output | Output | the Output instance used to display archive information |
listDataSources
Lists all available data sources for the given Metric instance and outputs their names and descriptions.
protected listDataSources(Metric $metrics, Output $output): intParameters
| Parameter | Type | Description |
|---|---|---|
$metrics | Metric | the Metric instance to retrieve data sources from |
$output | Output | the Output instance used to display the data sources |
showMetrics
Displays metrics for a specified data source and archive.
protected showMetrics(Input $input, Output $output): intThis method loads metrics configuration, validates the existence of the requested data source and archive, and outputs metric data in a human-readable format. If metrics are not enabled, or if the data source or archive is not found, appropriate error messages are displayed.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | the input interface for receiving arguments and options |
$output | Output | the output interface for displaying messages |
graphMetrics
Generates and outputs graphical metrics based on the provided input.
protected graphMetrics(Input $input, Output $output): intParameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | the input interface for receiving command arguments and options |
$output | Output | the output interface for displaying results and messages |
loadMetrics
Loads metrics based on the provided input.
private loadMetrics(Input $input): ?MetricParameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | the input object containing parameters for loading metrics |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000