File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,6 +111,29 @@ OTLP receiver with performance metrics:
111111- Measures and exports performance metrics
112112- View metrics at: ` http://127.0.0.1:8080/telemetry/metrics?format=prometheus&reset=false `
113113
114+ ### ` syslog-perf.yaml `
115+
116+ Syslog/CEF receiver with performance metrics:
117+
118+ - Receives syslog messages on UDP ` 0.0.0.0:5140 `
119+ - Measures and exports performance metrics
120+ - View metrics at: ` http://127.0.0.1:8080/telemetry/metrics?format=prometheus&reset=false `
121+
122+ To send test syslog messages:
123+
124+ ``` bash
125+ # Send a single syslog message
126+ echo " <134>$( date ' +%b %d %H:%M:%S' ) testhost testtag: Test message" | nc -u -w1 127.0.0.1 5140
127+
128+ # Send multiple messages
129+ for i in {1..100}; do
130+ echo " <134>$( date ' +%b %d %H:%M:%S' ) testhost testtag: Test message #$i " | nc -u -w1 127.0.0.1 5140
131+ done
132+
133+ # Send CEF format message
134+ echo " <134>$( date ' +%b %d %H:%M:%S' ) testhost CEF:0|Security|IDS|1.0|100|Test Event|5|src=192.168.1.100 dst=10.0.0.50" | nc -u -w1 127.0.0.1 5140
135+ ```
136+
114137## Usage
115138
116139You can use these configurations with the following CLI command:
Original file line number Diff line number Diff line change 1+ settings :
2+ default_pipeline_ctrl_msg_channel_size : 100
3+ default_node_ctrl_msg_channel_size : 100
4+ default_pdata_channel_size : 100
5+
6+ nodes :
7+ receiver :
8+ kind : receiver
9+ plugin_urn : " urn:otel:syslog_cef:receiver"
10+ out_ports :
11+ out_port :
12+ destinations :
13+ - exporter
14+ dispatch_strategy : round_robin
15+ config :
16+ listening_addr : " 0.0.0.0:5140"
17+ protocol : udp
18+ exporter :
19+ kind : exporter
20+ plugin_urn : " urn:otel:otap:perf:exporter"
21+ config :
22+ frequency : 1000
23+ cpu_usage : false
24+ mem_usage : false
25+ disk_usage : false
26+ io_usage : false
27+
28+ service :
29+ telemetry :
30+ logs :
31+ level : " info"
32+ resource :
33+ service.name : " syslog-perf"
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ use otap_df_engine::{
2020} ;
2121use otap_df_telemetry:: instrument:: { Counter , UpDownCounter } ;
2222use otap_df_telemetry:: metrics:: MetricSet ;
23+ use otap_df_telemetry:: otel_info;
2324use otap_df_telemetry_macros:: metric_set;
2425use serde:: Deserialize ;
2526use serde_json:: Value ;
@@ -128,6 +129,13 @@ impl local::Receiver<OtapPdata> for SyslogCefReceiver {
128129 mut ctrl_chan : local:: ControlChannel < OtapPdata > ,
129130 effect_handler : local:: EffectHandler < OtapPdata > ,
130131 ) -> Result < TerminalState , Error > {
132+ otel_info ! (
133+ "receiver.start" ,
134+ protocol = format!( "{:?}" , self . config. protocol) ,
135+ listening_addr = self . config. listening_addr. to_string( ) ,
136+ message = "Starting Syslog/CEF Receiver"
137+ ) ;
138+
131139 // Start periodic telemetry collection (1s), similar to other nodes
132140 let timer_cancel_handle = effect_handler
133141 . start_periodic_telemetry ( std:: time:: Duration :: from_secs ( 1 ) )
You can’t perform that action at this time.
0 commit comments