diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-05-05 19:07:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 19:07:18 +0200 |
commit | c1757b0f420b9407213233ecba67e99333c38143 (patch) | |
tree | a27ab0932ee6cb50e6a01424f207dc1f3aa7c167 /src | |
parent | a177f40a841b21193399dedc724340b5e1bcec86 (diff) | |
parent | 80e3120d7945786b4c053fc18b6de803d82888c1 (diff) | |
download | vyos-1x-c1757b0f420b9407213233ecba67e99333c38143.tar.gz vyos-1x-c1757b0f420b9407213233ecba67e99333c38143.zip |
Merge pull request #1312 from sever-sever/T4410
monitoring: T4410: Add telegraf output Plugin http for Splunk
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/service_monitoring_telegraf.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/service_monitoring_telegraf.py b/src/conf_mode/service_monitoring_telegraf.py index 2398b0174..102a87318 100755 --- a/src/conf_mode/service_monitoring_telegraf.py +++ b/src/conf_mode/service_monitoring_telegraf.py @@ -124,6 +124,15 @@ def verify(monitoring): if 'url' not in monitoring: raise ConfigError(f'Monitoring "url" is mandatory!') + # Verify Splunk + if 'splunk' in monitoring: + if 'authentication' not in monitoring['splunk'] or \ + 'token' not in monitoring['splunk']['authentication']: + raise ConfigError(f'Authentication "organization and token" are mandatory!') + + if 'url' not in monitoring['splunk']: + raise ConfigError(f'Monitoring splunk "url" is mandatory!') + return None def generate(monitoring): |