Class AdminHandler
Provides access to ArangoDB's administration interface
The admin handler utilizes ArangoDB's Admin API.
-
triagens\ArangoDb\Handler
-
triagens\ArangoDb\AdminHandler
Methods summary
public
string
|
#
getServerVersion( boolean $details = false )
Get the server version
This will throw if the version cannot be retrieved
Parameters
- $details
- True to get a more detailed response
Returns
string
- a string holding the ArangoDB version
Throws
Since
1.2
|
public
string
|
#
getServerRole( )
Get the server role
This will throw if the role cannot be retrieved
Returns
string
- a string holding the server role (e.g. UNDEFINED, COORDINATOR, DBSERVER)
Throws
Since
2.0
|
public
float
|
#
getServerTime( )
Get the server time
This will throw if the time cannot be retrieved
Returns
float
- a double holding the timestamp
Throws
Since
1.2
|
public
array
|
#
getServerLog( array $options = [] )
Get the server log
This will throw if the log cannot be retrieved
Parameters
- $options
- an array of options that define the result-set:
Options are :
- 'upto' - returns all log entries up to a log-level. Note that log-level must be one of:
- fatal / 0
- error / 1
- warning / 2
- info / 3
- debug / 4
- 'level' - limits the log entries to the ones defined in level. Note that `level` and `upto` are mutably exclusive.
- 'offset' - skip the first offset entries.
- 'size' - limit the number of returned log-entries to size.
- 'start' - Returns all log entries such that their log-entry identifier is greater or equal to lid.
- 'sort' - Sort the log-entries either ascending if direction is asc, or descending if it is desc according to their lid. Note that the lid imposes a chronological order.
- 'search' - Only return the log-entries containing the text string...
Returns
array
- an array holding the various attributes of a log: lid, level, timestamp, text and the total amount of log entries before pagination.
Throws
Since
1.2
|
public
boolean
|
#
reloadServerRouting( )
Reload the server's routing information
The call triggers a reload of the routing information from the _routing collection
Reload the server's routing information
The call triggers a reload of the routing information from the _routing collection
This will throw if the routing cannot be reloaded
Returns
boolean
Throws
Since
1.2
|
public
array
|
#
getServerStatistics( )
Get the server statistics
Returns the statistics information. The returned objects contains the statistics figures, grouped together
according to the description returned by _admin/statistics-description.
For instance, to access a figure userTime from the group system, you first select the sub-object
describing the group stored in system and in that sub-object the value for userTime is stored in the
attribute of the same name.In case of a distribution, the returned object contains the total count in count
and the distribution list in counts.
For more information on the statistics returned, please lookup the statistics interface description at
Get the server statistics
Returns the statistics information. The returned objects contains the statistics figures, grouped together
according to the description returned by _admin/statistics-description.
For instance, to access a figure userTime from the group system, you first select the sub-object
describing the group stored in system and in that sub-object the value for userTime is stored in the
attribute of the same name.In case of a distribution, the returned object contains the total count in count
and the distribution list in counts.
For more information on the statistics returned, please lookup the statistics interface description at
Returns
array
Throws
Since
1.3
See
Link
|
public
array
|
#
getServerStatisticsDescription( array $options = [] )
Returns a description of the statistics returned by getServerStatistics().
The returned objects contains a list of statistics groups in the attribute groups
and a list of statistics figures in the attribute figures.
For more information on the statistics returned, please lookup the statistics interface description at
Returns a description of the statistics returned by getServerStatistics().
The returned objects contains a list of statistics groups in the attribute groups
and a list of statistics figures in the attribute figures.
For more information on the statistics returned, please lookup the statistics interface description at
Parameters
- $options
- an array of options that define the result-set:
<
p>Options are :
- 'granularity' - use minutes for a granularity of minutes, hours for hours, and days for days. The default is minutes.
- 'figures' - a list of figures, comma-separated. Possible figures are httpConnections. You can use all to get all figures. The default is httpConnections.
- 'length' - If you want a time series, the maximal length of the series as integer. You can use all to get all available information. You can use current to get the latest interval.
Returns
array
Throws
Since
1.3
See
Link
|
Constants summary
string |
OPTION_DETAILS
details for server version
details for server version
|
|