X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FNetworkMonitoringSystem%2FTorrus_Internal.pm;h=04a6b295457872c50ca03175a023c968cf73aa51;hp=9df19755ec29c7971468e5bf844d95206abc462e;hb=b490e791cc60013989d908041f174467e362a1ea;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm b/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm index 9df19755e..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