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