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

T5657: Add VRF support for zabbix-agent #3919

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Conversation

sever-sever
Copy link
Member

To start the service under VRF requires starting under User=root otherwise it had issues with cgroups

Change Summary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

zabbix-agent

Proposed changes

How to test

set service monitoring zabbix-agent host-name 'r4'
set service monitoring zabbix-agent server '192.168.122.1'
set service monitoring zabbix-agent vrf 'mgmt'

Check the service:

vyos@r4# sudo systemctl status zabbix-agent2
● zabbix-agent2.service - Zabbix Agent 2
     Loaded: loaded (/lib/systemd/system/zabbix-agent2.service; disabled; preset: enabled)
    Drop-In: /run/systemd/system/zabbix-agent2.service.d
             └─10-override.conf
     Active: active (running) since Wed 2024-07-31 18:01:38 EEST; 23min ago
       Docs: man:zabbix_agent2
   Main PID: 11452 (zabbix_agent2)
      Tasks: 9 (limit: 18718)
     Memory: 15.9M
        CPU: 191ms
     CGroup: /system.slice/zabbix-agent2.service
             └─vrf
               └─mgmt
                 └─11452 /usr/sbin/zabbix_agent2 --config /run/zabbix/zabbix-agent2.conf --foreground

Smoketest result

vyos@r4:~$ /usr/libexec/vyos/tests/smoke/cli/test_service_monitoring_zabbix-agent.py
test_01_zabbix_agent (__main__.TestZabbixAgent.test_01_zabbix_agent) ... ok

----------------------------------------------------------------------
Ran 1 test in 13.460s

OK
vyos@r4:~$

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

To start the service under VRF requires starting under User=root
otherwise it had issues with cgroups
Copy link

👍
No issues in PR Title / Commit Title

Copy link


warning: Unused directories imported from vyos.defaults in src/conf_mode/system_console.py:25.

@c-po c-po merged commit cab6560 into vyos:current Aug 1, 2024
12 of 14 checks passed
@sever-sever sever-sever deleted the T5657 branch August 13, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants