Page MenuHomeVyOS Platform

Add service zabbix-agent
Closed, ResolvedPublicFEATURE REQUEST

Description

Add zabbix agent and simple CLI to configure it.

set service zabbix-agent server x.x.x.x
set service zabbix-agent server-active x.x.x.x

https://www.zabbix.com/documentation/current/en/manual/appendix/config/zabbix_agent2
https://www.initmax.cz/wp-content/uploads/2022/05/zabbix-agent-2-6.0.pdf

Details

Version
1.4
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

Viacheslav changed the task status from Open to In progress.Aug 8 2023, 10:47 AM
Viacheslav claimed this task.

PR https://github.com/vyos/vyos-1x/pull/2140

set service monitoring zabbix-agent directory '/config/zabbix/'
set service monitoring zabbix-agent limits buffer-send '8'
set service monitoring zabbix-agent limits buffer-size '120'
set service monitoring zabbix-agent log debug-level 'warning'
set service monitoring zabbix-agent log size '1'
set service monitoring zabbix-agent server '192.0.2.5'
set service  monitoring zabbix-agent server-active 192.0.2.5 port '10051'
set service monitoring zabbix-agent server-active 2001:db8::123
Viacheslav changed Version from - to 1.4.

Cannot pass the smoketest in CI

07:19:00  DEBUG - Running Testcase: /usr/libexec/vyos/tests/smoke/cli/test_service_monitoring_zabbix-agent.py
07:19:02  DEBUG - test_01_zabbix_agent (__main__.TestZabbixAgent.test_01_zabbix_agent) ... FAIL
07:19:04  DEBUG - 
07:19:04  DEBUG - ======================================================================
07:19:04  DEBUG - FAIL: test_01_zabbix_agent (__main__.TestZabbixAgent.test_01_zabbix_agent)
07:19:04  DEBUG - ----------------------------------------------------------------------
07:19:04  DEBUG - Traceback (most recent call last):
07:19:04  DEBUG -   File "/usr/libexec/vyos/tests/smoke/cli/test_service_monitoring_zabbix-agent.py", line 34, in tearDown
07:19:04  DEBUG -     self.assertTrue(process_named_running(PROCESS_NAME))
07:19:04  DEBUG - AssertionError: None is not true
07:19:04  DEBUG - 
07:19:04  DEBUG - ----------------------------------------------------------------------

Is not reproduced in the local VM test

vyos@r14:~$ /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 5.183s

OK
vyos@r14:~$

Thanks, @jestabro
Zabbix-agent really can include config directory, and if it is set and exists any *.conf file it thinks that those files related to zabbix-agent and expects specific config syntax/options.
I.e. it extends zabbix-agent with custom .confg files.
As it was a wrong format, most likely it can't start at all.

Viacheslav moved this task from Open to Finished on the VyOS 1.4 Sagitta board.