Skip to content

Add StatsD monitor#2969

Merged
domenukk merged 3 commits intoAFLplusplus:mainfrom
Evian-Zhang:statsd_monitor
Feb 13, 2025
Merged

Add StatsD monitor#2969
domenukk merged 3 commits intoAFLplusplus:mainfrom
Evian-Zhang:statsd_monitor

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!

}

/// 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