Bug 281384 - net-mgmt/check_mk_agent: integrate PR 723 sysctl_mem feature
Summary: net-mgmt/check_mk_agent: integrate PR 723 sysctl_mem feature
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bernhard Froehlich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-09 09:49 UTC by Xavier Beaudouin
Modified: 2024-11-01 17:07 UTC (History)
4 users (show)

See Also:
ivalentine: maintainer-feedback+


Attachments
git format-patch for check_mk_agent (3.10 KB, application/mbox)
2024-09-09 09:49 UTC, Xavier Beaudouin
no flags Details
git format-patch for check_mk_agent (3.10 KB, patch)
2024-09-10 08:22 UTC, Xavier Beaudouin
no flags Details | Diff
0001-net-mgmt-check_mk_agent-bug-281384.patch (4.65 KB, patch)
2024-09-19 20:28 UTC, Ian Valentine
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Beaudouin 2024-09-09 09:49:12 UTC
Created attachment 253450 [details]
git format-patch for check_mk_agent

Hello,

This patch integrate the PR#723, this patch permit to have access to memory information without depending of statgrab dependency.

The original PR: https://github.com/Checkmk/checkmk/pull/723

Kind regards,
Xavier
Comment 1 Ian Valentine 2024-09-09 18:17:20 UTC
The edits to set_variable_defaults() and preamble_1() should be removed, but the actual patch to run_purely_synchronous_sections() looks good to me. I'll switch the libstatgrab dependency to be optional when the serverside changes are made.
Comment 2 Xavier Beaudouin 2024-09-10 08:22:41 UTC
Created attachment 253477 [details]
git format-patch for check_mk_agent

(In reply to Ian Valentine from comment #1)

Oh ! 
It seems I made a mistake make I applied the patch. Thank to head up me on that.

The git format-patch has been updated without this mistake.

Tell me if you seems this is ok for you ?

Kind regards,
Xavier
Comment 3 Ian Valentine 2024-09-19 20:26:00 UTC
Comment on attachment 253477 [details]
git format-patch for check_mk_agent

This is still making edits to the directory variables. I've made a patch that reworks how the existing patches to the file function and includes your changes.
Comment 4 Ian Valentine 2024-09-19 20:28:15 UTC
Created attachment 253671 [details]
0001-net-mgmt-check_mk_agent-bug-281384.patch
Comment 5 Bernhard Froehlich freebsd_committer freebsd_triage 2024-09-21 18:52:53 UTC
(In reply to Ian Valentine from comment #4)

Is this patch ready to be committed or just a work in progress?
Comment 6 Ian Valentine 2024-09-25 23:18:23 UTC
(In reply to Bernhard Froehlich from comment #5)
Yes, this patch and bug #281637 are both good to be committed.
Comment 7 Bernhard Froehlich freebsd_committer freebsd_triage 2024-10-02 10:41:26 UTC
I'll take it.
Comment 8 Bernhard Froehlich freebsd_committer freebsd_triage 2024-10-02 10:45:52 UTC
In the upstream PR the code was moved to a separate function with this commit:

https://github.com/Checkmk/checkmk/pull/723/commits/9d93dfa9a5ba4bf3b6a77e6bd882bf592d8ea3f5
Comment 9 Bernhard Froehlich freebsd_committer freebsd_triage 2024-10-02 10:57:47 UTC
Please let me know which path you want to follow.
Comment 10 Xavier Beaudouin 2024-10-02 11:47:14 UTC
Well, I have asked to make as a seperate function by check_mk maintainer.
So you can either use the patch on the PR or what has been sent here.
Comment 11 Ian Valentine 2024-10-04 17:47:55 UTC
Let's keep this patch, since the actual output is the same. Then it can be removed here after it gets merged upstream.
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-11-01 17:04:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d2757d98eb2f6c0b2e95da75f95397a59c8f0bf3

commit d2757d98eb2f6c0b2e95da75f95397a59c8f0bf3
Author:     Xavier Beaudouin <kiwi@oav.net>
AuthorDate: 2024-11-01 17:00:38 +0000
Commit:     Bernhard Froehlich <decke@FreeBSD.org>
CommitDate: 2024-11-01 17:03:23 +0000

    net-mgmt/check_mk_agent: Add sysctl_mem feature

    PR:             281384
    Approved by:    Ian Valentine <ivalentine@arizona.edu> (maintainer)
    See:            https://github.com/Checkmk/checkmk/pull/723

 net-mgmt/check_mk_agent/Makefile                   | 11 +++---
 .../files/patch-check__mk__agent.freebsd           | 42 +++++++++++-----------
 2 files changed, 27 insertions(+), 26 deletions(-)
Comment 13 Bernhard Froehlich freebsd_committer freebsd_triage 2024-11-01 17:07:40 UTC
Sorry, that it took so long but it's committed now!