Skip to content

log-collector-script checks for netfilter tables & updates to network info scrape#2514

Open
abeowlu wants to merge 44 commits intoawslabs:mainfrom
abeowlu:nft_logscript
Open

log-collector-script checks for netfilter tables & updates to network info scrape#2514
abeowlu wants to merge 44 commits intoawslabs:mainfrom
abeowlu:nft_logscript

Conversation

@abeowlu
Copy link
Copy Markdown
Contributor

@abeowlu abeowlu commented Nov 14, 2025

Issue #, if available:

Description of changes:
Making changes to the log-collector-script;

  • changing and updating command to get implemented networking mode, iptables, ipvs, or nft
  • suppressing errors and verbose output from this command

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done
shfmt linted
script execution

@abeowlu
Copy link
Copy Markdown
Contributor Author

abeowlu commented Nov 14, 2025

@guessi , I created a PR for collecting nft information in the log-collector-script. And suppressing verbose output and error to stdout introduced in #1795

Copy link
Copy Markdown
Contributor

@mselim00 mselim00 left a comment

Choose a reason for hiding this comment

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

thanks for putting this together, some initial comments

Comment on lines +401 to +405
ipvsadm --save >> "${COLLECT_DIR}"/networking/ipvsadm.txt
ok -e "\n" >> "${COLLECT_DIR}"/networking/ipvsadm.txt
ipvsadm --list --numeric --rate >> "${COLLECT_DIR}"/networking/ipvsadm.txt
ok -e "\n" >> "${COLLECT_DIR}"/networking/ipvsadm.txt
ipvsadm --list --numeric --stats --exact >> "${COLLECT_DIR}"/networking/ipvsadm.txt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's keep these as they were. if you can share details on why appending would be more appropriate here, we can evaluate this for a separate change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  • my local repo script does not output/tee ipvs info collected to stdout, but the testing the script on main does...
        This is version 0.7.8. New versions can be found at https://github.com/awslabs/amazon-eks-ami/blob/main/log-collector-script/

Trying to collect common operating system logs...
Trying to collect kernel logs...
Trying to collect modinfo... Trying to collect mount points and volume information...
Trying to collect SELinux status...
Trying to collect iptables information... /sbin/ipvsadm
Trying to collect ipvs information... -A -t 198.19.10.0:webcache -s rr
-a -t 198.19.10.0:webcache -r 100.64.0.9:webcache -m -w 1
-A -t 198.19.20.0:webcache -s rr
-a -t 198.19.20.0:webcache -r 100.64.0.9:webcache -m -w 1
-A -t 198.19.30.0:webcache -s rr
-a -t 198.19.30.0:webcache -r 100.64.0.9:webcache -m -w 1
sed: -e expression #1, char 18: unknown option to `s'
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port                 CPS    InPPS   OutPPS    InBPS   OutBPS
  -> RemoteAddress:Port
TCP  198.19.10.0:8080                    0        0        0        0        0
  -> 100.64.0.9:8080                     0        0        0        0        0
TCP  198.19.20.0:8080                    0        0        0        0        0
  -> 100.64.0.9:8080                     0        0        0        0        0
TCP  198.19.30.0:8080                    0        0        0        0        0
  -> 100.64.0.9:8080                     0        0        0        0        0

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port               Conns   InPkts  OutPkts  InBytes OutBytes
  -> RemoteAddress:Port
TCP  198.19.10.0:8080                    0        0        0        0        0
...
  • can become unnecessarily verbose. I can update to ipvsadm --save | tee ${COLLECT_DIR}"/networking/... >> ${COLLECT_DIR}"/networking/... like in my local repo, but I think this redundant so the shortened to append to the log file. Script output now is;
        This is version 0.7.9. New versions can be found at https://github.com/awslabs/amazon-eks-ami/blob/main/log-collector-script/

Trying to collect common operating system logs...
Trying to collect kernel logs...
Trying to collect modinfo... Trying to collect mount points and volume information...
Trying to collect SELinux status...
Trying to collect iptables information...
Trying to collect ipvs information...

Trying to collect nftables information... skipping nftable info: if using nftables install 'nft' utility and try again
Trying to collect installed packages...
Trying to collect active system services...

web-flow and others added 21 commits December 7, 2025 14:45
…abs#2522)

* chore: add a .gitignore

* merge inside existing gitignore

* fix linter

* minimal .gitignore
Update Amazon Linux 2 documentation regarding EKS-optimized AMIs.
dependabot bot and others added 16 commits December 7, 2025 14:51
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.8.1 to 4.8.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](actions/dependency-review-action@40c09b7...3c4e3dc)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 4.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v5...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@271a8d0...84ae59a)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@4469467...4dc6199)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@08c6903...1af3b93)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](aws-actions/configure-aws-credentials@0094301...61815dc)

---
updated-dependencies:
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: 5.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
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.

10 participants