summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-08-23 09:32:43 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-08-23 09:42:04 +0000
commit661fa646915907c0f909b8e79c51fbb2f455007b (patch)
tree79ad5c9a93de8ec501f69aebfe4ed204d433ca53 /smoketest
parent8c7fbec24f8bfe064d8ad804951f5ae59b54748f (diff)
downloadvyos-1x-661fa646915907c0f909b8e79c51fbb2f455007b.tar.gz
vyos-1x-661fa646915907c0f909b8e79c51fbb2f455007b.zip
T5448: Add configuration host-name for zabbix-agent
Ability to configure host-name for zabbix-agent set service monitoring zabbix-agent host-name 'r-vyos'
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_service_monitoring_zabbix-agent.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_monitoring_zabbix-agent.py b/smoketest/scripts/cli/test_service_monitoring_zabbix-agent.py
index 7cc661688..cb5f84406 100755
--- a/smoketest/scripts/cli/test_service_monitoring_zabbix-agent.py
+++ b/smoketest/scripts/cli/test_service_monitoring_zabbix-agent.py
@@ -50,6 +50,7 @@ class TestZabbixAgent(VyOSUnitTestSHIM.TestCase):
port = '10050'
timeout = '5'
listen_ip = '0.0.0.0'
+ hostname = 'r-vyos'
self.cli_set(base_path + ['directory', directory])
self.cli_set(base_path + ['limits', 'buffer-flush-interval', buffer_send])
@@ -61,6 +62,7 @@ class TestZabbixAgent(VyOSUnitTestSHIM.TestCase):
for server_active, server_config in servers_active.items():
self.cli_set(base_path + ['server-active', server_active, 'port', server_config['port']])
self.cli_set(base_path + ['timeout', timeout])
+ self.cli_set(base_path + ['host-name', hostname])
# commit changes
self.cli_commit()
@@ -80,6 +82,7 @@ class TestZabbixAgent(VyOSUnitTestSHIM.TestCase):
self.assertIn(f'BufferSize={buffer_size}', config)
self.assertIn(f'Include={directory}/*.conf', config)
self.assertIn(f'Timeout={timeout}', config)
+ self.assertIn(f'Hostname={hostname}', config)
if __name__ == '__main__':