mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Monitoring service api (#2251)
## Issue Addressed N/A ## Proposed Changes Adds a client side api for collecting system and process metrics and pushing it to a monitoring service.
This commit is contained in:
@@ -63,14 +63,14 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
|
||||
let log = context.log().clone();
|
||||
let datadir = client_config.create_data_dir()?;
|
||||
let db_path = client_config.create_db_path()?;
|
||||
let freezer_db_path_res = client_config.create_freezer_db_path();
|
||||
let freezer_db_path = client_config.create_freezer_db_path()?;
|
||||
let executor = context.executor.clone();
|
||||
|
||||
let builder = ClientBuilder::new(context.eth_spec_instance.clone())
|
||||
.runtime_context(context)
|
||||
.chain_spec(spec)
|
||||
.http_api_config(client_config.http_api.clone())
|
||||
.disk_store(&datadir, &db_path, &freezer_db_path_res?, store_config)?;
|
||||
.disk_store(&datadir, &db_path, &freezer_db_path, store_config)?;
|
||||
|
||||
let builder = if let Some(slasher_config) = client_config.slasher.clone() {
|
||||
let slasher = Arc::new(
|
||||
@@ -82,6 +82,14 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
|
||||
builder
|
||||
};
|
||||
|
||||
let builder = if let Some(monitoring_config) = &mut client_config.monitoring_api {
|
||||
monitoring_config.db_path = Some(db_path);
|
||||
monitoring_config.freezer_db_path = Some(freezer_db_path);
|
||||
builder.monitoring_client(monitoring_config)?
|
||||
} else {
|
||||
builder
|
||||
};
|
||||
|
||||
let builder = builder
|
||||
.beacon_chain_builder(client_genesis, client_config.clone())
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user