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

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Related Objects

Mentioned In
1.3.1

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

[email protected]:~$ /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
[email protected]:~$

Interfaces:

[email protected]:~$ 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 Need Triage 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