Hi all,
When i commit my script, it got error prevent i commit.
Here are the error meassage:
datnt11@juniper# show | compare
[edit]
+ event-options {
+ generate-event {
+ every-minute time-interval 60;
+ }
+ policy check-port-b2b-subscriber {
+ events every-minute;
+ then {
+ event-script check-port-b2b-subscriber.slax;
+ }
+ }
+ event-script {
+ file check-port-b2b-subscriber.slax;
+ }
+ }
{master}[edit]
datnt11@juniper# commit check
re1:
configuration check succeeds
re0:
error: invalid filename: /var/db/scripts/event//check-port-b2b-subscriber.slax
error: Reading the configuration from event scripts failed
error: configuration check-out failed
re1:
error: remote commit-configuration failed on re0
here are the script:
version 1.0;
ns Junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
match / {
<op-script-results> {
var $cmd = <command> "show subscribers summary port";
var $results = jcs:invoke($cmd);
var $kq = {
for-each ( $results/counters/port-name ) {
expr . _ " " _ ./following-sibling::port-count _ " ";
}
}
var $rpc = <request-snmp-utility-mib-set> {
<object-type> "string";
<instance> "subscriber_b2b";
<object-value> $kq;
}
var $res = jcs:invoke($rpc);
}
}
Can anyone tell me how can i do to slove this problem?