summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-05-04 18:07:45 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-05-05 11:55:01 +0000
commit80e3120d7945786b4c053fc18b6de803d82888c1 (patch)
tree7f69be19431550ab59a0843ec1acc598f3ccf040 /src
parent0400f96c003ca0472a9e1786b5af20e4207b9e59 (diff)
downloadvyos-1x-80e3120d7945786b4c053fc18b6de803d82888c1.tar.gz
vyos-1x-80e3120d7945786b4c053fc18b6de803d82888c1.zip
monitoring: T4410: Add telegraf output Plugin http for Splunk
Ability to send HTTP output to Splunk via telegraf set service monitoring telegraf splunk authentication insecure set service monitoring telegraf splunk authentication token 'xxx' set service monitoring telegraf splunk url 'https://x.x.x.x'
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/service_monitoring_telegraf.py9
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):