Page MenuHomeVyOS Platform

Add configurable telegraf monitoring service
Closed, ResolvedPublicFEATURE REQUEST

Description

Adding configurable telegraf parameters.
Allow to configurre remote endpoint/port/login/token

Proposed CLI:

set service monitoring telegraf authentication organization 'vyos'
set service monitoring telegraf authentication token '54xxxtyw=='
set service monitoring telegraf bucket 'bucket'
set service monitoring telegraf port '8086'
set service monitoring telegraf source 'all'
set service monitoring telegraf url 'http://foo.local'

Details

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

Related Objects

Mentioned In
1.3.3
rVYOSONEX8a3bc80ca7a3: telegraf: T3872: replace local get_interfaces() function with Section.interface…
rVYOSONEX85e0d4ecbf69: telegraf: T3872: re-use existing XML building blocks
1.3.1
rVYOSONEX2bec8b20d0c7: monitoring: T3872: re-use "port" building block from port-number.xml.i
rVYOSONEX0ec8927476e7: monitoring: T3872: re-use "port" building block from port-number.xml.i
rVYOSONEXe19252a7968c: smoketest: T3872: Fix token check for monitoring test
rVYOSONEX19f65290529a: smoketest: T3872: Fix token check for monitoring test
rVYOSONEX1f4e5c6daf4a: Merge pull request #1216 from sever-sever/T3872
rVYOSONEXa9047dbddf9b: monitoring: T3872: Add required telegraf version >=1.20
rVYOSONEXc3ba275a16a8: monitoring: T3872: Add CLI XML for configuration telegraf
rVYOSONEXb941267395e7: monitoring: T3872: Add tamplates for monitoring
rVYOSONEX12de127056fb: smoketest: T3872: Add smoketest for monitoring telegraf
rVYOSONEX10d67313d320: monitoring: T3872: Add new feature service monitoring telegraf
rVYOSONEXdfce3e3a5190: Merge pull request #1212 from sever-sever/T3872-eq-1x
rVYOSONEX4ddfe9b7e72e: monitoring: T3872: Add input filter for firewall InfluxDB2
rVYOSONEX08484df27aa0: Merge pull request #1209 from sever-sever/T3872
rVYOSONEXd331da994906: monitoring: T3872: Fix template input plugin for running services
rVYOSONEX48d4be3dd3eb: Merge pull request #1200 from sever-sever/T3872
rVYOSONEXceb52d57e965: monitoring: T3872: Delete iptables input plugin as we use nft
rVYOSONEX5177313cfc12: Merge pull request #1189 from sever-sever/T3872
rVYOSONEXf57eef6751a3: monitoring: T3872: Rewrite input filter custom_script
rVYOSONEX140adbe83445: monitoring: T3872: Add just required interfaces for ethtool
rVYOSONEXb34c9664ba69: Merge pull request #1162 from sever-sever/T3872
rVYOSONEX67c25c6468b5: monitoring: T3872: Add templates for telegraf
rVYOSONEXc5a54d4c54d4: monitoring: T3872: Add python handler for service monitoring
rVYOSONEX605cac35526c: monitoring: T3872: Add a new feature service monitoring telegraf
rVYOSONEXca3cd970f297: Merge pull request #1018 from sever-sever/T3872

Event Timeline

Viacheslav changed the task status from Open to Needs testing.Jan 12 2022, 4:38 PM
Viacheslav claimed this task.

Incorrect custom scripts data if used 'tun' interface
https://github.com/vyos/vyos-1x/blob/current/src/etc/telegraf/custom_scripts/show_interfaces_input_filter.py

vyos@r11-roll:~$ /etc/telegraf/custom_scripts/show_interfaces_input_filter.py
show_interfaces,interface=dum0 ip_addresses="172.16.0.1/24",state=0i,link=0i,description="empty" 1642008162000000000
show_interfaces,interface=eth0 ip_addresses="192.168.122.11/24 169.254.0.2/27 192.0.2.55/24 192.168.222.222/24",state=0i,link=0i,description="outside" 1642008162000000000
show_interfaces,interface=eth1 ip_addresses="203.0.113.1/24 192.0.2.1/24 10.0.0.2/24",state=0i,link=0i,description="inside" 1642008162000000000
show_interfaces,interface=eth2 ip_addresses="198.51.100.111/24",state=0i,link=0i,description="empty" 1642008162000000000
show_interfaces,interface=lo ip_addresses="127.0.0.1/8 ::1/128",state=0i,link=0i,description="empty" 1642008162000000000
Traceback (most recent call last):
  File "/etc/telegraf/custom_scripts/show_interfaces_input_filter.py", line 42, in <module>
    f'ip_addresses="{gen_ip_list(index,interfaces)}",'
  File "/etc/telegraf/custom_scripts/show_interfaces_input_filter.py", line 26, in gen_ip_list
    while len(interfaces[index].split())==1:
IndexError: list index out of range
vyos@r11-roll:~$

Interfaces:

vyos@r11-roll:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
dum0             172.16.0.1/24                     u/u  
eth0             192.168.122.11/24                 u/u  outside
                 169.254.0.2/27                         
                 192.0.2.55/24                          
                 192.168.222.222/24                     
eth1             203.0.113.1/24                    u/u  inside
                 192.0.2.1/24                           
                 10.0.0.2/24                            
eth2             198.51.100.111/24                 u/u  
lo               127.0.0.1/8                       u/u  
                 ::1/128                                
tun0             -                                 u/u
  • Incorrect custom scripts data if used tunX interfaces
  • Allow inputs.ethtool only on Ethernet interfaces, by default it tries to get statistics from each interface, template
Jan 12 19:37:30 r11-roll telegraf[7703]: 2022-01-12T17:37:30Z E! [inputs.ethtool] Error in plugin: dum0 stats: operation not supported
Jan 12 19:37:30 r11-roll telegraf[7703]: 2022-01-12T17:37:30Z E! [inputs.ethtool] Error in plugin: gretap0 driver: operation not supported
Jan 12 19:37:30 r11-roll telegraf[7703]: 2022-01-12T17:37:30Z E! [inputs.ethtool] Error in plugin: gre0 driver: operation not supported
Jan 12 19:37:30 r11-roll telegraf[7703]: 2022-01-12T17:37:30Z E! [inputs.ethtool] Error in plugin: erspan0 driver: operation not supported

For example what we can use:

[[inputs.ethtool]]
  ## List of interfaces to pull metrics for
  # interface_include = ["eth0"]

  ## List of interfaces to ignore when pulling metrics.
  # interface_exclude = ["eth1"]
  • Iptables inputs should be rewritten [inputs.iptables] to nft plugin or correct format
Jan 12 19:37:30 r11-roll telegraf[7703]: 2022-01-12T17:37:30Z E! [inputs.iptables] Error in plugin: exit status 1
Jan 12 19:37:30 r11-roll telegraf[7703]: 2022-01-12T17:37:30Z E! [inputs.iptables] Error in plugin: exit status 1
Jan 12 19:37:30 r11-roll telegraf[7703]: 2022-01-12T17:37:30Z E! [inputs.iptables] Error in plugin: exit status 1

There is no official nft plugin at the moment

PR ability to get nftables counters, telegraf input plugin https://github.com/vyos/vyos-1x/pull/1209

Viacheslav moved this task from Open to Finished on the VyOS 1.4 Sagitta board.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus ( 1.3.1) board.
dmbaturin changed Issue type from Unspecified (please specify) to Feature (new functionality).Mar 21 2022, 8:08 AM