View Source Radixir.System (radixir v0.0.4)
Provides high level interaction with the System API.
Link to this section Summary
Functions
Gets system addressbook.
Gets system configuration.
Gets system health.
Gets system metrics.
Gets system peers.
Gets prometheus metrics.
Gets system version.
Link to this section Types
Link to this section Functions
@spec get_address_book(options()) :: {:ok, map()} | {:error, map() | error_message()}
Gets system addressbook.
parameters
Parameters
options
: Keyword list that containsapi
: Keyword list that containsurl
(optional, string): If url is not in options then the url set in the configs will be used.- any other options one may want to pass along to the http layer - for example
headers
auth_index
(optional, integer): Index of the username + password combo to be used for endpoint authentication.username
: (optional, string): Username to be used for endpoint authentication.password
: (optional, string): Password to be used for endpoint authentication.
note
Note
- Either
username
andpassword
orauth_index
must be provided. - If all three are provided
auth_index
is used.
If the following usernames and passwords are exported as follows:
export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'
then an auth_index
of 0 would result in admin
being used as the username and funny cats very Jack 21!
being used as the password.
@spec get_configuration(options()) :: {:ok, map()} | {:error, map() | error_message()}
Gets system configuration.
parameters
Parameters
options
: Keyword list that containsapi
: Keyword list that containsurl
(optional, string): If url is not in options then the url set in the configs will be used.- any other options one may want to pass along to the http layer - for example
headers
auth_index
(optional, integer): Index of the username + password combo to be used for endpoint authentication.username
: (optional, string): Username to be used for endpoint authentication.password
: (optional, string): Password to be used for endpoint authentication.
note
Note
- Either
username
andpassword
orauth_index
must be provided. - If all three are provided
auth_index
is used.
If the following usernames and passwords are exported as follows:
export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'
then an auth_index
of 0 would result in admin
being used as the username and funny cats very Jack 21!
being used as the password.
@spec get_health(options()) :: {:ok, map()} | {:error, map() | error_message()}
Gets system health.
parameters
Parameters
options
: Keyword list that containsapi
: Keyword list that containsurl
(optional, string): If url is not in options then the url set in the configs will be used.- any other options one may want to pass along to the http layer - for example
headers
auth_index
(optional, integer): Index of the username + password combo to be used for endpoint authentication.username
: (optional, string): Username to be used for endpoint authentication.password
: (optional, string): Password to be used for endpoint authentication.
note
Note
- Either
username
andpassword
orauth_index
must be provided. - If all three are provided
auth_index
is used.
If the following usernames and passwords are exported as follows:
export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'
then an auth_index
of 0 would result in admin
being used as the username and funny cats very Jack 21!
being used as the password.
@spec get_metrics(options()) :: {:ok, map()} | {:error, map() | error_message()}
Gets system metrics.
parameters
Parameters
options
: Keyword list that containsapi
: Keyword list that containsurl
(optional, string): If url is not in options then the url set in the configs will be used.- any other options one may want to pass along to the http layer - for example
headers
auth_index
(optional, integer): Index of the username + password combo to be used for endpoint authentication.username
: (optional, string): Username to be used for endpoint authentication.password
: (optional, string): Password to be used for endpoint authentication.
note
Note
- Either
username
andpassword
orauth_index
must be provided. - If all three are provided
auth_index
is used.
If the following usernames and passwords are exported as follows:
export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'
then an auth_index
of 0 would result in admin
being used as the username and funny cats very Jack 21!
being used as the password.
@spec get_peers(options()) :: {:ok, map()} | {:error, map() | error_message()}
Gets system peers.
parameters
Parameters
options
: Keyword list that containsapi
: Keyword list that containsurl
(optional, string): If url is not in options then the url set in the configs will be used.- any other options one may want to pass along to the http layer - for example
headers
auth_index
(optional, integer): Index of the username + password combo to be used for endpoint authentication.username
: (optional, string): Username to be used for endpoint authentication.password
: (optional, string): Password to be used for endpoint authentication.
note
Note
- Either
username
andpassword
orauth_index
must be provided. - If all three are provided
auth_index
is used.
If the following usernames and passwords are exported as follows:
export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'
then an auth_index
of 0 would result in admin
being used as the username and funny cats very Jack 21!
being used as the password.
@spec get_prometheus_metrics(options()) :: {:ok, map()} | {:error, map() | error_message()}
Gets prometheus metrics.
parameters
Parameters
options
: Keyword list that containsapi
: Keyword list that containsurl
(optional, string): If url is not in options then the url set in the configs will be used.- any other options one may want to pass along to the http layer - for example
headers
auth_index
(optional, integer): Index of the username + password combo to be used for endpoint authentication.username
: (optional, string): Username to be used for endpoint authentication.password
: (optional, string): Password to be used for endpoint authentication.
note
Note
- Either
username
andpassword
orauth_index
must be provided. - If all three are provided
auth_index
is used.
If the following usernames and passwords are exported as follows:
export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'
then an auth_index
of 0 would result in admin
being used as the username and funny cats very Jack 21!
being used as the password.
@spec get_version(options()) :: {:ok, map()} | {:error, map() | error_message()}
Gets system version.
parameters
Parameters
options
: Keyword list that containsapi
: Keyword list that containsurl
(optional, string): If url is not in options then the url set in the configs will be used.- any other options one may want to pass along to the http layer - for example
headers
auth_index
(optional, integer): Index of the username + password combo to be used for endpoint authentication.username
: (optional, string): Username to be used for endpoint authentication.password
: (optional, string): Password to be used for endpoint authentication.
note
Note
- Either
username
andpassword
orauth_index
must be provided. - If all three are provided
auth_index
is used.
If the following usernames and passwords are exported as follows:
export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'
then an auth_index
of 0 would result in admin
being used as the username and funny cats very Jack 21!
being used as the password.