Commit graph

14697 commits

Author SHA1 Message Date
Arne Welzel
d32ef970a9 Bump zeekctl and add NEWS entries
These are added to the 5.2 section of NEWS. This is for backporting
into release/5.2.
2023-02-27 16:26:30 +01:00
Arne Welzel
bfc2374c8f Bump external test suites, filter some telemetry.log entries 2023-02-27 15:42:18 +01:00
Arne Welzel
545b867ddd logging/Manager: Remove unused variable 2023-02-27 12:51:03 +01:00
Arne Welzel
69a98e2cbb logging: Add telemetry for streams and log writers
This adds one metric per log stream and one metric per log writer (path based)
to track the number of writes on a stream level as well as on a writer level.

    $ curl -sSf localhost:8181/metrics | grep Conn
    zeek_log_writer_writes_total{endpoint="",filter-name="default",module="HTTP",path="http",stream="HTTP::LOG",writer="Log::WRITER_SQLITE"} 1 1677497572770
    zeek_log_stream_writes_total{endpoint="",module="HTTP",stream="HTTP::LOG"} 1 1677497572770

The initial version of this change also included metrics around log
write vetoes, but given no log policies exist in the default configuration
and they are mostly interesting for a few streams/writers only, skip this
for now. These can always be added by the script writer, too.

The difference between the stream level writes and concrete writers can
be used to deduce the number of vetoes (or errors) as a starting point.
2023-02-27 12:51:03 +01:00
Robin Sommer
a41e282a7d
Merge remote-tracking branch 'origin/topic/robin/gh-2801-removed-child-analyzers'
* origin/topic/robin/gh-2801-removed-child-analyzers:
  Fix re-instantiation of analyzers that were just removed.
2023-02-27 12:36:30 +01:00
Arne Welzel
2b4aa38315 Merge remote-tracking branch 'origin/topic/awelzel/bump-cmake-plugin-dereference-symlinks'
* origin/topic/awelzel/bump-cmake-plugin-dereference-symlinks:
  tests: Add regression tests for zeek/cmake#61
  tests/bifs-and-scripts-install: Remove unused activate.zeek
  Update cmake submodule
2023-02-27 09:53:28 +01:00
Arne Welzel
15be6b5011 Merge remote-tracking branch 'origin/topic/awelzel/cap-ccache-sizes'
* origin/topic/awelzel/cap-ccache-sizes:
  cirrus: Also add ccache limits to container builds
  cirrus: Add an epoch to the ccache fingerprint, bump to 1000M
  cirrus: Cap ccache max size to 500M and max files to 20000
2023-02-26 17:29:29 +01:00
Arne Welzel
3be4712163 tests: Add regression tests for zeek/cmake#61 2023-02-24 19:37:52 +01:00
Robin Sommer
c2ce401e2f
Fix re-instantiation of analyzers that were just removed.
When an analyzer is being removed from a connection's analyzer tree,
it's at first only marked as removed, but not yet actually deleted.
The problem was that until destruction happens, the analyzer methods
checking presence of an analyzer would continue to indicate that it's
there, even though semantically one wouldn't expect to find it anymore
after that removal operation. That in turn then prevented one from
adding a new analyzer of the same type during that time until
destruction (because we don't allow more than one of each kind at the
same time).

This fix changes the logic searching for analyzers to ignore any
existing ones scheduled for removal. I believe this shouldn't have any
further side effects.

Closes #2801.
2023-02-24 16:32:16 +01:00
Arne Welzel
0ddfe69bed tests/bifs-and-scripts-install: Remove unused activate.zeek 2023-02-24 16:14:05 +01:00
Arne Welzel
a7dc58f496 Update cmake submodule
To pull in zeek/cmake#62.
2023-02-24 12:29:56 +01:00
Arne Welzel
2b18a9396f cirrus: Also add ccache limits to container builds 2023-02-24 10:03:33 +01:00
Arne Welzel
edd3775c83 cirrus: Add an epoch to the ccache fingerprint, bump to 1000M
Merging this will flush the caches once by changing the fingerprint.
Also increase the limit to 1GB to strike a balance between fast
down/uploads and suboptimal ccache pruning:
2023-02-24 09:55:28 +01:00
Arne Welzel
1f9c2f6875 cirrus: Cap ccache max size to 500M and max files to 20000
After #2802, depending on the task/platform, a mostly cached build on Cirrus CI
is taking 30-60seconds. Eye balling a few tasks, it is now taking longer to
download and unpack as well as check and re-upload the accumulated cache in
the beginning and end of a task.

For Debian 11, this was ~1:20 and 1:10 with a cache size of ~4.2GB. The
default size limit for ccache is 5GB, there's no limit to the number of files.

Running a fresh build on Debian 11, ccache -s indicates the actual
required cache size is ~100MB and the number of files in cache is ~2.7k.
Lower cache size to 500M and number of files to 20000, such that we don't
unnecessarily accumulate the cache and spend resources on downloading,
checking and re-uploading the cache.

    root@cirrus-ci-task-4907974120964096# ccache -s | grep -E 'files|size'
    files in cache                      2736
    cache size                          96.7 MB
    max cache size                       5.0 GB

PRs have their own cache namespace, so they won't thrash the main's
branch cache. I think main and release share their branch, so we should
not be super aggressive. Though we're probably okay with cache misses on
release once in a while.
2023-02-24 09:48:18 +01:00
zeek-bot
73e5793c7e Update doc submodule [nomail] [skip ci] 2023-02-24 00:29:22 +00:00
Tim Wojtulewicz
3946f34565 Merge remote-tracking branch 'origin/topic/timw/2730-file-extract-binary-mode'
* origin/topic/timw/2730-file-extract-binary-mode:
  GH-2730: Use binary mode when opening files in Extract file analyzer
2023-02-23 08:27:49 -07:00
Tim Wojtulewicz
1766aa2808 GH-2730: Use binary mode when opening files in Extract file analyzer 2023-02-23 08:22:57 -07:00
Tim Wojtulewicz
4afc1303b4 Merge remote-tracking branch 'origin/topic/timw/2574-windows-build-warnings'
* origin/topic/timw/2574-windows-build-warnings:
  Include stdint.h early in flex files to prevent redefinition of int type macros
  Update bifcl submodule [nomail]
  Update binpac submodule [nomail]
  SMB: clarify a confusing line in one of the pac files
  module_util: Change streq helper method to just return bool
  NTLM analyzer: Don't bother checking boolean values for > 0
  FTP analyzer: Remove unnecessary lines from constructor
  IP_Hdr: take length value as uint64_t instead of int
  EventTrace: take size_t as a constructor argument instead of int
  Change argument to Tempvar constructor to size_t, avoids conversion warning in template construction
2023-02-23 07:40:42 -07:00
Arne Welzel
74bcfdda2e Merge remote-tracking branch 'origin/topic/awelzel/collect-repo-info-softer-git-dependency-take-2'
* origin/topic/awelzel/collect-repo-info-softer-git-dependency-take-2:
  ci/collect-repo-info: No hard dependency on git, take two
2023-02-23 15:19:11 +01:00
Arne Welzel
cc6e012f36 ci/collect-repo-info: No hard dependency on git, take two
Collecting information about builtin external plugins also
tried to use `git` unconditionally.
2023-02-23 14:21:36 +01:00
Arne Welzel
6bf1091a03 Merge remote-tracking branch 'origin/topic/awelzel/extend-news-about-repo-info-json'
* origin/topic/awelzel/extend-news-about-repo-info-json:
  NEWS: Add paragraph about repo-info.json to Breaking Changes
2023-02-23 12:16:41 +01:00
Tim Wojtulewicz
1a1cf8576e Merge remote-tracking branch 'origin/topic/timw/btest-dash-a'
* origin/topic/timw/btest-dash-a:
  Use btest -A on CI to get more information about stuck tests
2023-02-22 17:06:02 -07:00
Tim Wojtulewicz
473e309dd6 Use btest -A on CI to get more information about stuck tests 2023-02-22 16:57:06 -07:00
Tim Wojtulewicz
d83af286bb Include stdint.h early in flex files to prevent redefinition of int type macros 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
b459b6212f Update bifcl submodule [nomail] 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
84db1f7973 Update binpac submodule [nomail] 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
f92ca9e537 SMB: clarify a confusing line in one of the pac files 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
7ca4d36942 module_util: Change streq helper method to just return bool 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
184baf118d NTLM analyzer: Don't bother checking boolean values for > 0 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
d239f355fd FTP analyzer: Remove unnecessary lines from constructor 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
7e66261fd9 IP_Hdr: take length value as uint64_t instead of int 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
8e078299eb EventTrace: take size_t as a constructor argument instead of int 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
718cced7cd Change argument to Tempvar constructor to size_t, avoids conversion warning in template construction 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
6398329cd5 Merge remote-tracking branch 'origin/topic/timw/freebsd-ci-pip'
* origin/topic/timw/freebsd-ci-pip:
  Use ensurepip to install pip on FreeBSD
2023-02-22 15:53:17 -07:00
Tim Wojtulewicz
d4867d8ac0 Merge remote-tracking branch 'origin/topic/timw/update-benchmarker-host-name'
* origin/topic/timw/update-benchmarker-host-name:
  Update benchmarker Cirrus secrets to use org-level values
2023-02-22 14:26:35 -07:00
Tim Wojtulewicz
08ea09d69d Update benchmarker Cirrus secrets to use org-level values 2023-02-22 14:11:39 -07:00
Tim Wojtulewicz
5db8acdf36 Use ensurepip to install pip on FreeBSD
The py39-pip package is sometimes not available on FreeBSD, and using
ensurepip is the recommended way to install pip according to the pip
documentation. ensurepip should be available in every python
installation.
2023-02-22 13:27:20 -07:00
Arne Welzel
6ee5c6e9cc Merge branch 'topic/awelzel/collect-repo-info-softer-git-dependency'
* topic/awelzel/collect-repo-info-softer-git-dependency:
  ci/collect-repo-info: No hard dependency on git
2023-02-22 19:30:07 +01:00
Arne Welzel
352da9adc4 NEWS: Add paragraph about repo-info.json to Breaking Changes
This came up for OBS and following discussions in Slack indicate that
custom source tarballs might not be too uncommon.
2023-02-22 19:20:18 +01:00
Arne Welzel
f3253554d1 ci/collect-repo-info: No hard dependency on git
The OBS builds run in an environment where no git is installed and
release tarballs assembled manually.

Drop the hard-requirement on git from ci/collect-repo-info.json.
2023-02-22 18:12:32 +01:00
Arne Welzel
dfdcfd9647 Merge remote-tracking branch 'origin/topic/awelzel/2776-zeek-config-version-cache-busting'
* origin/topic/awelzel/2776-zeek-config-version-cache-busting:
  Bump zeek-af_packet-plugin
  zeek-config: Move ZEEK_VERSION* out of zeek-config.h
2023-02-22 16:49:49 +01:00
Arne Welzel
4d540a11a9 Bump zeek-af_packet-plugin 2023-02-22 16:49:16 +01:00
Arne Welzel
d23b1331e5 zeek-config: Move ZEEK_VERSION* out of zeek-config.h
When bumping the VERSION file, everything that includes the auto-generated
zeek/zeek-config.h needs to rebuild and ccache usage is voided due the file
changing. Split the mutable version information into a new zeek-version.h
file to avoid this.

Further, do not include zeek-version.h within Plugin.h and avoid the reference
to ZEEK_VERSION_FUNCTION unless we're building an external plugin.

Closes #2776.
2023-02-22 16:48:39 +01:00
Robin Sommer
ebc9563243
Merge remote-tracking branch 'origin/topic/robin/gh-123-symlink'
* origin/topic/robin/gh-123-symlink:
  Bump spicy-plugin.
2023-02-22 15:52:23 +01:00
Robin Sommer
0f55521a9d
Bump spicy-plugin. 2023-02-22 15:51:07 +01:00
Arne Welzel
a693924099 Merge remote-tracking branch 'origin/topic/awelzel/2572-event-handler-stats'
* origin/topic/awelzel/2572-event-handler-stats:
  Bump external baselines
  external/testing-setup: Less telemetry.log volume
  EventHandler: Use telemetry framework for EventHandler.call_count
2023-02-22 12:59:41 +01:00
Arne Welzel
bf693aaaa5 Bump external baselines 2023-02-22 12:27:35 +01:00
Arne Welzel
d9e5cc3078 external/testing-setup: Less telemetry.log volume
For traces spanning a long time period, don't produce immense
amounts of logs. Also filter down the event handler invocation
entries to connection related events in telemetry.log.
2023-02-22 12:10:10 +01:00
Arne Welzel
56a8b99965 EventHandler: Use telemetry framework for EventHandler.call_count
Put the IntCounter into a std::optional rather than initializing
it at EventHandler construction time as that will currently expose
a time series per event handler through the Prometheus API.
2023-02-22 12:10:10 +01:00
zeek-bot
a40025b82d Update doc submodule [nomail] [skip ci] 2023-02-22 00:49:41 +00:00