Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Add check_mk_agent as a plugin #2713

Closed
McMarius11 opened this issue Dec 16, 2021 · 13 comments
Closed

[Feature request] Add check_mk_agent as a plugin #2713

McMarius11 opened this issue Dec 16, 2021 · 13 comments
Labels
help wanted Contributor missing incomplete Issue template missing info

Comments

@McMarius11
Copy link

McMarius11 commented Dec 16, 2021

we would love to have the check_mk_agent as a plugin for everyones opnsense firewall.

here are the manual steps in order for it to work,

mkdir -p /opt/bin
wget -P /opt/bin https://raw.githubusercontent.com/tribe29/checkmk/master/agents/check_mk_agent.freebsd
mv /opt/bin/check_mk_agent.freebsd /opt/bin/check_mk_agent
chmod +x /opt/bin/check_mk_agent
pkg install libstatgrab bash

  • Add the following to /etc/inetd.conf
    check_mk stream tcp nowait root /opt/bin/check_mk_agent check_mk_agent

  • Add the following to /etc/services | the agent uses port 6556
    check_mk 6556/tcp #check_mk agent

  • Add the following to /etc/hosts.allow, modify monitoring.server.ip.address as required,
    # Allow nagios server to access us
    check_mk_agent : monitoring.server.ip.address : allow should be configurable in the webgui
    check_mk_agent : ALL : deny should be the default value

  • Start inetd
    /etc/rc.d/inetd onestart it will start the mk_agent

  • Add the following to /etc/rc.conf | to start inetd on boot
    inetd_enable="YES"

Important notices
it would be awesome if the firewall creates a automatic rule that would allow 6556tcp from the "check_mk_agent : monitoring.server.ip.address " to the firewall

Is your feature request related to a problem? Please describe.
it is not easy to install the mk agent on the firewall.

A clear and concise description of what the problem is including your motivation for the request,
The motivation is to make it a breeze to install the mk agent on the opnsense firewall, so that the end-user do not have to use ssh in order for it to configure it.

Describe the solution you like
i want to have a plugin, just like zabbix agent, just install it and configure it finish.

Describe alternatives you considered

a official guide would also be better then some self made one.

Additional context

Add any other context or screenshots about the feature request here or links to relevant forum thread or similar
thanks to everyone for the guides and help
referred to #2544
https://forum.opnsense.org/English_Forums/Tutorials_and_FAQs/Check_MK_Agent_setup
https://forum.opnsense.org/index.php?topic=1310.0
https://forum.checkmk.com/t/opnsense-mk-check-agent-wont-work-freebsd/28709
official client link
here is the official github link "https://github.com/tribe29/checkmk/blob/master/agents/check_mk_agent.freebsd"

@fichtner fichtner transferred this issue from opnsense/core Dec 16, 2021
@OPNsense-bot
Copy link

Thank you for creating an issue.
Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository,
please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

@OPNsense-bot OPNsense-bot added the incomplete Issue template missing info label Dec 16, 2021
@gk998
Copy link

gk998 commented Dec 19, 2021

I'd recommend using ssh and not inetd. Your config gets overwritten after every opnsense update.

@weltzien
Copy link

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[-] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md

[-] I have searched the existing issues and I'm convinced that mine is new.

[-] When the request is meant for an existing plugin, I've added its name to the title.

Is your feature request related to a problem? Please describe.
No, it would be a option to monitor the firewall with more options.

Describe the solution you'd like
Check-MK Agent for Opnsense, so it can be monitored over check_mk SSH Agent.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
SNMP Monitor allready implemented, but not showing results of Openvpn Connections states and so on.
For Openvpn you need the status log, which you can create with: echo "status" | socat UNIX-CONNECT:/var/etc/openvpn/server1.sock - > /var/log/openvpn/openvpn-status.log

Additional context
Add any other context or screenshots about the feature request here.

@mimugmail
Copy link
Member

I don't see any chance to get this as a plugin as long as there is no freebsd port and only a binary

@weltzien
Copy link

alternativ solution: https://forum.opnsense.org/index.php?topic=26165.0 as long there is no offical plugin for it.

best regards

Chris

@gk998
Copy link

gk998 commented Dec 30, 2021

@FingerlessGlov3s
Copy link

Yeah a plugin would be lovely!

@OPNsense-bot
Copy link

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository,
please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue,
just let us know, so we can reopen the issue and assign an owner to it.

@OPNsense-bot OPNsense-bot added the help wanted Contributor missing label Jun 14, 2022
@FingerlessGlov3s
Copy link

dump

@mimugmail
Copy link
Member

You can reopen and assign to me if the port gets into repo

@FingerlessGlov3s
Copy link

There's a third party checkmk agent, that ties better in to OPNsense, as it can report back more detailed information (Sceenshot)
ThirdParty: https://github.com/bashclub/check-opnsense

check_mk_agent is in FreeBSD ports, but I think we'll need some work on extending the checks it does, otherwise the checks will be very basic, compared to what the third party one can provide. It maybe we can chop up this third party script and add apart of the proper agent, as a plugin.

This is turning in to a larger job though, but would be nice to have.

@mimugmail
Copy link
Member

I'm quite sure there will be one asking why using this python script and not the agent. Anyone interesting in this script can already use it :)

@burghy86
Copy link

any chance to have a ufficial plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributor missing incomplete Issue template missing info
Development

No branches or pull requests

7 participants