diff options
author | Christian Breunig <christian@breunig.cc> | 2025-01-04 12:07:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-04 12:07:28 +0100 |
commit | 9a5f14b2e98b6efb90798c70c37db5a8df11b368 (patch) | |
tree | 3a3fd6a48d44e9ee51a6dd895d6ff84333a4a7ff /smoketest/scripts | |
parent | bb4611544ff73a979f927a7a1c8ea3dd1c56fb48 (diff) | |
parent | 20842f57383258910009222d4588e635e5a9042e (diff) | |
download | vyos-1x-9a5f14b2e98b6efb90798c70c37db5a8df11b368.tar.gz vyos-1x-9a5f14b2e98b6efb90798c70c37db5a8df11b368.zip |
Merge pull request #4271 from nvollmar/T6994
T6994: Add textfile collector config option
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-x | smoketest/scripts/cli/test_service_monitoring_prometheus.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_monitoring_prometheus.py b/smoketest/scripts/cli/test_service_monitoring_prometheus.py index df737f840..6e7f8c808 100755 --- a/smoketest/scripts/cli/test_service_monitoring_prometheus.py +++ b/smoketest/scripts/cli/test_service_monitoring_prometheus.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +import os import unittest from base_vyostest_shim import VyOSUnitTestSHIM @@ -55,6 +56,7 @@ class TestMonitoringPrometheus(VyOSUnitTestSHIM.TestCase): def test_01_node_exporter(self): self.cli_set(base_path + ['node-exporter', 'listen-address', listen_ip]) + self.cli_set(base_path + ['node-exporter', 'collectors', 'textfile']) # commit changes self.cli_commit() @@ -62,6 +64,11 @@ class TestMonitoringPrometheus(VyOSUnitTestSHIM.TestCase): file_content = read_file(node_exporter_service_file) self.assertIn(f'{listen_ip}:9100', file_content) + self.assertTrue(os.path.isdir('/run/node_exporter/collector')) + self.assertIn( + '--collector.textfile.directory=/run/node_exporter/collector', file_content + ) + # Check for running process self.assertTrue(process_named_running(NODE_EXPORTER_PROCESS_NAME)) |