{
'key' => 'network_monitoring_system',
- 'section' => '',
+ 'section' => 'network_monitoring',
'description' => 'Networking monitoring system (NMS) integration. <b>Torrus_Internal</b> uses the built-in Torrus ticketing system (see the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:2.1:Documentation:Torrus_Installation">integrated networking monitoring system installation instructions</a>).',
'type' => 'select',
- #'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
'select_enum' => [ '', qw(Torrus_Internal) ],
},
{
+ 'key' => 'nms-auto_add-svc_ips',
+ 'section' => 'network_monitoring',
+ 'description' => 'Automatically add (and remove) IP addresses from these service tables to the network monitoring system.',
+ 'type' => 'selectmultiple',
+ 'select_enum' => [ 'svc_acct', 'svc_broadband', 'svc_dsl' ],
+ },
+
+ {
+ 'key' => 'nms-auto_add-community',
+ 'section' => 'network_monitoring',
+ 'description' => 'SNMP community string to use when automatically adding IP addresses from these services to the network monitoring system.',
+ 'type' => 'text',
+ },
+
+ {
'key' => 'ticket_system-default_queueid',
'section' => 'ticketing',
'description' => 'Default queue used when creating new customer tickets.',
$overlimit_missing_cust_svc_nonfatal_kludge );
use Carp qw( cluck carp croak confess ); #specify cluck have to specify them all
use Scalar::Util qw( blessed );
+use FS::Conf;
use FS::Record qw( qsearch qsearchs fields dbh );
use FS::cust_main_Mixin;
use FS::cust_svc;
use FS::cust_main;
use FS::inventory_item;
use FS::inventory_class;
+use FS::NetworkMonitoringSystem;
@ISA = qw( FS::cust_main_Mixin FS::Record );
}
+ $self->nms_ip_insert;
+
if ( exists $options{'jobnums'} ) {
push @{ $options{'jobnums'} }, @jobnums;
}
}
+=item nms_ip_insert
+
+=cut
+
+sub nms_ip_insert {
+ my $self = shift;
+ my $conf = new FS::Conf;
+ return '' unless grep { $self->table eq $_ }
+ $conf->config('nms-auto_add-svc_ips');
+ my $ip_field = $self->table_info->{'ip_field'};
+
+ #XXX perhaps i should be job-queued, i take awhile, right?
+ my $nms = new FS::NetworkMonitoringSystem;
+ $nms->add_router( $self->$ip_field(),
+ $conf->config('nms-auto_add-community')
+ );
+}
+
+=item nms_delip
+
+=cut
+
+sub nms_ip_delete {
+#XXX not yet implemented
+}
+
=back
=head1 BUGS
'sorts' => [ 'username', 'uid', 'seconds', 'last_login' ],
'display_weight' => 10,
'cancel_weight' => 50,
+ 'ip_field' => 'slipip',
'fields' => {
'dir' => 'Home directory',
'uid' => {
'longname_plural' => 'Fixed (username-less) broadband services',
'display_weight' => 50,
'cancel_weight' => 70,
+ 'ip_field' => 'ip_addr',
'fields' => {
'description' => 'Descriptive label for this particular device.',
'speed_down' => 'Maximum download speed for this service in Kbps. 0 denotes unlimited.',
'sorts' => [ 'phonenum' ],
'display_weight' => 55,
'cancel_weight' => 75,
+ 'ip_field' => 'staticips',
'fields' => {
'pushed' => { label => 'Pushed',
type => 'disabled' },