Commit graph

16736 commits

Author SHA1 Message Date
Tim Wojtulewicz
d0d41f5c56 Avoid calling Collect() in counter/gauge Value() methods if not needed 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
e195d3d778 Fix some determinism issues with btests 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
d6e97ab306 Temporarily disable the scripts/base/frameworks/telemetry/internal-metrics btest 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
074a87b609 Fix the scripts.policy.frameworks.telemetry.prometheus btest to use the service discovery endpoint 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
a63ea5a04e Btest updates due to recent changes 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
017ee4509c Update telemetry log policy due to the fact that unit will not be filled in anymore 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
84aa308527 Rework everything to access the prometheus-cpp objects more directly 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
ec3e68928f Move telemetry opaques out of OpaqueVal.h 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
2267de21e6 Add GetRegistry() method for retrieving access to prometheus-cpp registry 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
128bf3fe9f Remove Broker metrics configuration values and methods 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
1cad305e58 Add support for callbacks for gauges/counters, restore process stat metrics 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
e93e4cc26d Add a services.json endpoint for Prometheus service discovery 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
abb84db6c8 Don't include endpoint label/value when collecting metrics internally 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
4718e5cf00 Remove everything related to aggregation 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
643bb38419 Make all options const-redefs, remove all of the change handler code 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
17d09c657b Move base types from telemetry framework to init-bare 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
d7b9924058 Update test baselines due to underscore changes 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
a0ae06b3cd Convert telemetry code to use prometheus-cpp 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
97a35011a7 Add necessary script-land changes 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
54500228c6 Add prometheus-cpp submodule, FindPrometheusCpp cmake module 2024-05-31 13:30:31 -07:00
Christian Kreibich
1d4a169dd4 Merge branch 'topic/christian/analyzer-lookup-bifs'
* topic/christian/analyzer-lookup-bifs:
  More precise error reporting for the disable_analyzer() BiF
  Add btests for the lookup_connection_analyzer_id() BiF.
  Add BiF for looking up a connection's numeric protocol analyzer IDs
2024-05-31 09:37:52 -07:00
Christian Kreibich
a599fe0438 More precise error reporting for the disable_analyzer() BiF
This replaces generic reporter->Error() calls with the builtin-specific variety,
which gives better context in the resulting error messages (such as the script
and line causing it).

Includes corresponding baseline update in one affected btest.
2024-05-30 16:38:22 -07:00
Christian Kreibich
09b70879b0 Add btests for the lookup_connection_analyzer_id() BiF. 2024-05-30 16:38:09 -07:00
Christian Kreibich
3e97ec39b8 Add BiF for looking up a connection's numeric protocol analyzer IDs
This adds a new lookup_connection_analyzer_id() BiF to find a given connection's
numeric identifier for a given protocol analyzer (as defined by the underlying
Analyzer::id_counter).

This enables users to call disable_analyzer(), which requires a numeric analyzer
ID, outside of analyzer_confirmation_info and analyzer_violation_info events
handlers.
2024-05-30 16:36:51 -07:00
Tim Wojtulewicz
c04e503c92 Merge remote-tracking branch 'origin/topic/vern/add-del-expr'
* origin/topic/vern/add-del-expr:
  removing now-vestigial "add" and "delete" statements
  script optimization support for "add" and "delete" being expressions
  "add" and "delete" are now expressions rather than statements
  bug fix for dealing with illegal types of initializers
  added a space when rendering some expressions so they're more readable
2024-05-29 13:49:10 -07:00
Vern Paxson
0aaf83e299 removing now-vestigial "add" and "delete" statements 2024-05-29 12:40:06 -07:00
Vern Paxson
37c1f6641c script optimization support for "add" and "delete" being expressions 2024-05-29 12:40:06 -07:00
Vern Paxson
0e5bece385 "add" and "delete" are now expressions rather than statements 2024-05-29 12:40:06 -07:00
Vern Paxson
e9a0a50da5 bug fix for dealing with illegal types of initializers 2024-05-29 12:40:06 -07:00
Vern Paxson
e84b60762a added a space when rendering some expressions so they're more readable 2024-05-29 12:40:05 -07:00
Johanna Amann
03b358f6d1 Merge branch 'files_pe_timestamp_sync' of https://github.com/mvhensbergen/zeek
* 'files_pe_timestamp_sync' of https://github.com/mvhensbergen/zeek:
  Don't hardcode values
  Add btest for timestamp check
  Copy timestamp from file object
2024-05-29 14:16:31 +01:00
Martin van Hensbergen
7f77075c43 Don't hardcode values 2024-05-29 14:00:04 +01:00
Martin van Hensbergen
e993f75ccb Add btest for timestamp check 2024-05-29 13:58:32 +01:00
Tim Wojtulewicz
9e9931f2d6 CI: Add coveralls-lcov gem to ubuntu 24, remove from ubuntu 20 2024-05-28 20:30:22 -07:00
Tim Wojtulewicz
d86e73376b Merge remote-tracking branch 'origin/topic/timw/fix-coverage-part-trois'
* origin/topic/timw/fix-coverage-part-trois:
  CI: Revert part of 2bde82ffa2 to fix coverage builds
2024-05-28 13:06:03 -07:00
Tim Wojtulewicz
ec4661f4b5 CI: Revert part of 2bde82ffa2 to fix coverage builds 2024-05-28 09:01:21 -07:00
zeek-bot
2352d0cccc Update doc submodule [nomail] [skip ci] 2024-05-25 00:10:15 +00:00
Christian Kreibich
e6b41defa0 Merge branch 'topic/christian/fix-zeekygen-quic-warning'
* topic/christian/fix-zeekygen-quic-warning:
  Fix Zeekygen warning for QUIC::unrecognized_version event
2024-05-24 15:04:38 -07:00
Christian Kreibich
3d88918071 Fix Zeekygen warning for QUIC::unrecognized_version event
Docs updates have been warning about being unable to locate that identifier, and
it's because we've not defined it alongside the other QUIC events.
2024-05-24 14:30:42 -07:00
Tim Wojtulewicz
47dd834bdb Merge remote-tracking branch 'origin/topic/johanna/tls-new-groups-and-consts'
* origin/topic/johanna/tls-new-groups-and-consts:
  Update TLS consts, mainly new named curves.
2024-05-24 10:49:42 -07:00
Johanna Amann
34225e83ba Update TLS consts, mainly new named curves.
Add test for X25519Kyber768Draft00 (post-quantum key agreement)
2024-05-23 14:50:36 +01:00
Tim Wojtulewicz
afc89c0480 Merge remote-tracking branch 'origin/topic/timw/fix-coverage-part-deux'
* origin/topic/timw/fix-coverage-part-deux:
  CI: Remove --enable-werror for asan builds
  CI: Run coverage builds for PRs, but only upload on master
  Coverage: Ignore a few errors during generation
  Coverage: don't bother ignoring non-existent bro.dir files
  CI: Re-enable coverage
  CI: Switch asan build back to gcc
  Update cmake submodule [nomail]
  CI: Avoid divide by zero error when generating coverage files
2024-05-21 16:23:23 -07:00
Tim Wojtulewicz
5f75d4bc0b CI: Remove --enable-werror for asan builds
There's a bug in GCC (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562) that
causes std::regex to emit some warnings when built with -fsanitize=address. Any
warnings that actually mean anything would be caught by the other sanitizer
builds or by the regular ubuntu24 build.
2024-05-21 15:11:44 -07:00
Tim Wojtulewicz
0cd023b839 CI: Run coverage builds for PRs, but only upload on master 2024-05-21 15:11:44 -07:00
Tim Wojtulewicz
e8f504c0c0 Coverage: Ignore a few errors during generation 2024-05-21 15:11:44 -07:00
Tim Wojtulewicz
0e0852a876 Coverage: don't bother ignoring non-existent bro.dir files 2024-05-21 15:11:43 -07:00
Tim Wojtulewicz
d36fbeb6d0 CI: Re-enable coverage 2024-05-21 15:11:43 -07:00
Tim Wojtulewicz
77c9388211 CI: Switch asan build back to gcc
The tools used for coverage (gcov, lcov) work better with GCC. We could switch
over to similar tools for llvm, but they way they store files during coverage
builds don't work as well for us (mostly the places they store the files).
2024-05-21 15:11:43 -07:00
Tim Wojtulewicz
b8e2f91fc9 Update cmake submodule [nomail] 2024-05-21 15:11:43 -07:00
zeek-bot
24c84f2bb7 Update doc submodule [nomail] [skip ci] 2024-05-21 00:11:22 +00:00