Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a sampler for the krb5kdc binary. #241

Merged
merged 11 commits into from
Sep 16, 2021
13 changes: 13 additions & 0 deletions configs/example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@ bpf = true
# ]


# The krb5kdc sampler attaches user space probes to the krb5kdc binary distributed as part
# of MIT kerberos. It will interpret the krb5_error_codes for the functions as well and export
# the number of calls to each ticket processing function and its result. Specifically it will
# attach to: finish_process_as_req, finish_dispatch_cache, and process_tgs_request.
[samplers.krb5kdc]
# Controls whether to use this sampler
# enabled = true

# Path to the krb5kdc binary to probe
# path = "/usr/sbin/krb5kdc"



# The memory sampler provides telemetry for system memory utilization
[samplers.memory]
# Controls whether to use this sampler
Expand Down
13 changes: 10 additions & 3 deletions src/config/samplers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use samplers::disk::DiskConfig;
use samplers::ext4::Ext4Config;
use samplers::http::HttpConfig;
use samplers::interrupt::InterruptConfig;
use samplers::krb5kdc::Krb5kdcConfig;
use samplers::memcache::MemcacheConfig;
use samplers::memory::MemoryConfig;
use samplers::network::NetworkConfig;
Expand Down Expand Up @@ -37,7 +38,7 @@ pub struct Samplers {
#[serde(default)]
interrupt: InterruptConfig,
#[serde(default)]
usercall: UsercallConfig,
krb5kdc: Krb5kdcConfig,
#[serde(default)]
memcache: MemcacheConfig,
#[serde(default)]
Expand All @@ -61,6 +62,8 @@ pub struct Samplers {
#[serde(default)]
udp: UdpConfig,
#[serde(default)]
usercall: UsercallConfig,
#[serde(default)]
xfs: XfsConfig,
}

Expand All @@ -85,8 +88,8 @@ impl Samplers {
&self.interrupt
}

pub fn usercall(&self) -> &UsercallConfig {
&self.usercall
pub fn krb5kdc(&self) -> &Krb5kdcConfig {
&self.krb5kdc
}

pub fn memcache(&self) -> &MemcacheConfig {
Expand Down Expand Up @@ -133,6 +136,10 @@ impl Samplers {
&self.udp
}

pub fn usercall(&self) -> &UsercallConfig {
&self.usercall
}

pub fn xfs(&self) -> &XfsConfig {
&self.xfs
}
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Ext4::spawn(common.clone());
Http::spawn(common.clone());
Interrupt::spawn(common.clone());
Usercall::spawn(common.clone());
Krb5kdc::spawn(common.clone());
Memcache::spawn(common.clone());
Memory::spawn(common.clone());
PageCache::spawn(common.clone());
Expand All @@ -92,6 +92,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Softnet::spawn(common.clone());
Tcp::spawn(common.clone());
Udp::spawn(common.clone());
Usercall::spawn(common.clone());
Xfs::spawn(common);

#[cfg(feature = "push_kafka")]
Expand Down
Loading