11//! Implementation of the generate-config command for the on-host cli.
22
33use crate :: cli:: error:: CliError ;
4+ use crate :: cli:: on_host:: config_gen:: config:: AgentSet ;
45use crate :: cli:: on_host:: config_gen:: region:: { Region , region_parser} ;
56use crate :: cli:: on_host:: host_monitoring_gen:: infra_config_gen:: InfraConfigGenerator ;
67use tracing:: info;
78
89pub mod infra_config;
910pub 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 ) ]
2014pub 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 {
3933pub 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