Basic slax for alias in junos


https://forums.juniper.net/t5/IOS-to-Junos-I2J-Tips/A-short-alias-for-any-command/td-p/129773

monitoring command did not work


create the slax file

start shell
vi /var/db/scripts/op/sdss.slax
exit

file show /var/db/scripts/op/sdss.slax

slax file
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";
 
import "../import/junos.xsl";
 
match / {
        <op-script-results> {
 
                var $cmd = <command> 'show dhcp server statistics routing-instance vDHCP_SERVER';
                var $out = jcs:invoke($cmd);
                copy-of ($out);
        }
}
configure the op script

configuration 
set system scripts op file sdss.slax commit and-quit
run

op sdss