diff options
author | Daniil Baturin <daniil@baturin.org> | 2014-06-23 18:36:49 +0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2014-06-23 18:36:49 +0700 |
commit | dd80ec321d684962e1d07758f0cd8d855c0181b3 (patch) | |
tree | c696475a847dfad2b83e145c61a0d5cf8227e532 | |
parent | 2294844b6d79d16d37a465bcf0dba37be459f9a7 (diff) | |
parent | 7b344f5365c9ec2d4d746b14216cd09c0e40b2a6 (diff) | |
download | vyatta-cfg-system-dd80ec321d684962e1d07758f0cd8d855c0181b3.tar.gz vyatta-cfg-system-dd80ec321d684962e1d07758f0cd8d855c0181b3.zip |
Merge pull request #11 from ahaitoute/helium
Bug #195: Added feature to send log message to remote syslog server over UDP or TCP.
-rwxr-xr-x | scripts/snmp/vyatta-snmp.pl | 6 | ||||
-rwxr-xr-x | scripts/system/vyatta_update_syslog.pl | 11 | ||||
-rw-r--r-- | templates/service/snmp/smuxpeer/node.def | 4 | ||||
-rw-r--r-- | templates/system/syslog/host/node.tag/facility/node.tag/protocol/node.def | 6 |
4 files changed, 26 insertions, 1 deletions
diff --git a/scripts/snmp/vyatta-snmp.pl b/scripts/snmp/vyatta-snmp.pl index 09ed84b8..7d00be97 100755 --- a/scripts/snmp/vyatta-snmp.pl +++ b/scripts/snmp/vyatta-snmp.pl @@ -215,6 +215,12 @@ sub snmp_get_values { print_community($config, $community); } + $config->setLevel("service snmp smuxpeer"); + my @smuxpeers = $config->returnValues(); + foreach my $smuxpeer (@smuxpeers) { + print "smuxpeer $smuxpeer \n"; + } + $config->setLevel($snmp_level); my $contact = $config->returnValue("contact"); if (defined $contact) { diff --git a/scripts/system/vyatta_update_syslog.pl b/scripts/system/vyatta_update_syslog.pl index 3421d61a..dd834c92 100755 --- a/scripts/system/vyatta_update_syslog.pl +++ b/scripts/system/vyatta_update_syslog.pl @@ -110,7 +110,16 @@ unless (%entries) { read_config( $config, 'console', $CONSOLE ); foreach my $host ( $config->listNodes('host') ) { - read_config( $config, "host $host", '@'. $host ); + my $host_protocol; + foreach my $facility ( $config->listNodes("host $host facility") ) { + my $protocol = $config->returnValue("host $host facility $facility protocol"); + if ($protocol eq "tcp") { + $host_protocol = "@@"; + } else { + $host_protocol = "@"; + } + read_config( $config, "host $host", $host_protocol. $host ); + } } foreach my $file ( $config->listNodes('file') ) { diff --git a/templates/service/snmp/smuxpeer/node.def b/templates/service/snmp/smuxpeer/node.def new file mode 100644 index 00000000..638e9367 --- /dev/null +++ b/templates/service/snmp/smuxpeer/node.def @@ -0,0 +1,4 @@ +multi: +type: txt +help: Register a subtree for SMUX-based processing +val_help: oid; Object Identifier diff --git a/templates/system/syslog/host/node.tag/facility/node.tag/protocol/node.def b/templates/system/syslog/host/node.tag/facility/node.tag/protocol/node.def new file mode 100644 index 00000000..469d7a79 --- /dev/null +++ b/templates/system/syslog/host/node.tag/facility/node.tag/protocol/node.def @@ -0,0 +1,6 @@ +type: txt +help: Syslog communication protocol +syntax:expression: $VAR(@) in "udp", "tcp"; + "Must be \"udp\", or \"tcp\"" +val_help: udp; Send log messages to remote syslog server over UDP +val_help: tcp; Send log messages to remote syslog server over TCP |