In crux/rolling, it's allowed to set a port for the syslog host. It appears that this isn't possible in Equulues
# set system syslog host 10.22.22.108:1514 Invalid host FQDN or IP address Value validation failed Set failed
In crux/rolling, it's allowed to set a port for the syslog host. It appears that this isn't possible in Equulues
# set system syslog host 10.22.22.108:1514 Invalid host FQDN or IP address Value validation failed Set failed
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | BUG | hagbard | T1845 syslog host no longer accepts a port | ||
Not Applicable | BUG | None | T1850 syslog protocol can be set multiple times per facility for the same host |
Can this please be splittet in a host and a port node? Only WireGuard uses this notation all other services have a dedicated port node
Actually I found out that the address:port wasn't implemented at all even if you were able to set it, it never was used within the config. I have that fixed now (not pushed yet). I also moved that part within the nodes, so it's going to be:
set system syslog global facility all level 'info' set system syslog global facility protocols level 'debug' set system syslog host 10.100.100.1 facility all level 'all' set system syslog host 10.100.100.1 port '555' set system syslog host 10.100.100.1 protocol 'tcp' set system syslog host 10.100.100.2 facility kern level 'all'
Currently I check if facility and level is set, but I could make *.* as default target if it's not defined or so. Not sure if that would be necessary. I need to write a migration script only for the changed protocol node and if the syntax address:port exists, I gotta rewrite that then too.
It actually does work, if only by accident
host 10.22.22.108:1514 { facility all { level all protocol udp } }
Results in:
admin@edge:~$ cat /etc/rsyslog.d/vyos-rsyslog.conf ## generated by syslog.py ## ## file based logging $PreserveFQDN on $outchannel global,/var/log/messages,262144,/usr/sbin/logrotate /etc/logrotate.d/vyos-rsyslog *.info;local7.debug :omfile:$global ## remote logging *.* @10.22.22.108:1514
Ah yes, it's taken entirely from the string, my fault I tested with the version you can only use an IP address.
https://downloads.vyos.io/rolling/current/amd64/vyos-1.2-rolling-201912061907-amd64.iso and later include the fix
Built a fresh rolling. It failed with:
[ system syslog host 10.22.22.108:1514 ] Invalid host FQDN or IP address [[system syslog]] failed
Trying to apply the fix manually:
admin@edge# set system syslog host 10.22.22.108 port 1514 [edit] admin@edge# commit save [ system syslog ] Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/system-syslog.py", line 328, in <module> c = get_config() File "/usr/libexec/vyos/conf_mode/system-syslog.py", line 201, in get_config 'proto': proto UnboundLocalError: local variable 'proto' referenced before assignment [[system syslog]] failed Commit failed [edit] admin@edge#
@kroy Please let me know if you still experience any issues (setting the port or migration).
@hagbard Confirmed fix. Migration worked perfectly.
host 10.22.22.108:514 { facility all { level all protocol udp } }
to
host 10.22.22.108 { facility all { level all protocol udp } port 514 }
and it looks like the rsyslogd.conf is correct:
*.* @10.22.22.108:514