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

Add StatsD monitor #2969

Merged
merged 3 commits into from
Feb 13, 2025
Merged

Add StatsD monitor #2969

merged 3 commits into from
Feb 13, 2025

Conversation

Evian-Zhang
Copy link
Contributor

This PR adds a StatsdMonitor, which is roughly a counterpart of AFL++'s rpc_statsd.

There are two more things could be done after this PR:

  • Write sections in LibAFL book to tell about how to use statsd metrics in LibAFL (or we could even tell about all other monitors' usage in that section)
  • As you could see in libafl/src/monitors/statsd.rs, there are several metrics currently not available, which is available in AFL++. Some of these metrics could be resolved in AflStatsStage. This stage involves much with the Monitor's statistics, so we should think more about this (and maybe some refactors to make this more maintainable). (In my first thought, shouldn't it be Monitor's responsibility to write to fuzzer_stats and plot_data?)

This PR also solves #2895.

@domenukk
Copy link
Member

Nice!

Do we still want to keep the prometheus monitor, then? Don't they solve similar problems?

@Evian-Zhang
Copy link
Contributor Author

In my understanding, prometheus monitor is used to view detailed statistics about one fuzzing instance (with multiple clients maybe), since it can show the statistics about individual clients.

The statsd is used to view aggregated statistics about multiple fuzzing instances (showing individual client statistics will make the visualized graph very distracting).

@Evian-Zhang
Copy link
Contributor Author

Are there any conversations not resolved? Should we merge this PR?

@domenukk domenukk merged commit 5281b41 into AFLplusplus:main Feb 13, 2025
106 checks passed
@domenukk
Copy link
Member

Thank you!

@@ -206,6 +206,7 @@ impl ClientStatsManager {
}

/// Get item geometry
#[allow(clippy::cast_precision_loss)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this should be expect

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create a PR quickly

Copy link
Contributor Author

@Evian-Zhang Evian-Zhang Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants