1 <% header('Router added') %>
6 unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring');
8 my $host = $cgi->param('host');
9 die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/;
11 my $community = $cgi->param('community');
12 die 'invalid SNMP community string' unless $community =~ /^[0-9.a-zA-Z\-]*$/;
14 my $nms = new FS::NetworkMonitoringSystem;
15 $nms->add_router($host,$community);