X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FNetworkMonitoringSystem%2FTorrus_Internal.pm;h=04a6b295457872c50ca03175a023c968cf73aa51;hb=80511cb4158b98db01deec317e5408675487bc6e;hp=63a93268c4f0b931037844e7484ea23b6b747624;hpb=acdcfc79977617610989a3a5eee39c63e373a546;p=freeside.git
diff --git a/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm b/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm
index 63a93268c..04a6b2954 100644
--- a/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm
+++ b/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm
@@ -155,11 +155,14 @@ sub report {
}
sub add_router {
- my($self, $ip) = @_;
+ my($self, $ip, $community) = @_;
+
+ $community = qq!\n !
+ if length($community) > 1;
my $newhost =
qq( \n).
- qq( \n).
+ qq( \n).$community.
qq( \n);
my $ddx = $self->_torrus_loadddx;
@@ -173,8 +176,10 @@ sub add_router {
sub add_interface {
my($self, $router_ip, $interface, $serviceid ) = @_;
+ #false laziness w/torrus/perllib/Torrus/Renderer.pm iface_underscore, update both
$interface =~ s(\/)(_)g; #slashes become underscores
$interface =~ s(\.)(_)g; #periods too, huh
+ $interface =~ s(\-)(_)g; #yup, and dashes
#should just use a proper XML parser huh
@@ -212,7 +217,7 @@ sub add_interface {
unless ( $added ) {
$new .=
qq( \n).
- qq( $newline\n").
+ qq( $newline\n).
qq( \n);
}
$new .= "$hostline\n";