Skip to content

Commit 42c4fe7

Browse files
committed
feat: use agent_set instead of host_monitoring enum
1 parent d6e9642 commit 42c4fe7

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

agent-control/src/cli/on_host/host_monitoring_gen.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
//! Implementation of the generate-config command for the on-host cli.
22
33
use crate::cli::error::CliError;
4+
use crate::cli::on_host::config_gen::config::AgentSet;
45
use crate::cli::on_host::config_gen::region::{Region, region_parser};
56
use crate::cli::on_host::host_monitoring_gen::infra_config_gen::InfraConfigGenerator;
67
use tracing::info;
78

89
pub mod infra_config;
910
pub mod infra_config_gen;
1011

11-
/// Represents the hostMonitoring source.
12-
#[derive(Debug, Copy, Clone, PartialEq, clap::ValueEnum)]
13-
pub enum HostMonitoringSource {
14-
InfraAgent,
15-
Otel,
16-
}
17-
1812
/// Generates the Agent Control configuration for host environments.
1913
#[derive(Debug, clap::Parser)]
2014
pub struct Args {
21-
/// Sets which host monitoring source to be used.
22-
#[arg(long)]
23-
host_monitoring_source: HostMonitoringSource,
15+
/// Agent to be used for host monitoring.
16+
#[arg(long, required = true)]
17+
agent_set: AgentSet,
2418

2519
/// Custom Attributes
2620
#[arg(long)]
@@ -39,7 +33,7 @@ pub struct Args {
3933
pub fn generate_host_monitoring_config(args: Args) -> Result<(), CliError> {
4034
info!("Generating Host monitoring values");
4135

42-
if args.host_monitoring_source == HostMonitoringSource::InfraAgent {
36+
if args.agent_set == AgentSet::InfraAgent {
4337
let infra_config_generator = InfraConfigGenerator::default();
4438

4539
infra_config_generator

0 commit comments

Comments
 (0)