summaryrefslogtreecommitdiff
path: root/httemplate/misc/process/nms-add_router.html
blob: a77d897d27773bff9cf47429f42c75604bc28d00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<% header('Router added') %>
</BODY></HTML>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring');

my $host = $cgi->param('host'); 
die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/;

my $community = $cgi->param('community'); 
die 'invalid SNMP community string' unless $community =~ /^[0-9.a-zA-Z\-]*$/;

my $nms = new FS::NetworkMonitoringSystem;
$nms->add_router($host,$community);

</%init>