Automation

last person joined: 18 hours ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
Expand all | Collapse all

Primary nexthop script failure

  • 1.  Primary nexthop script failure

    Posted 10-21-2013 12:15

    I'm very new to junoscript so please be kind  Smiley LOL 

     

    So here's my situation (just as a few others have posted in the past).  I'm to get a SRX210 to be able to do automatic failover to a different ISP in case access to internet is interupted from the primary ISP.  On the firewall the first & primary ISP is on ge-0/0/0 & the backup is ge-0/0/1.  I found a junoscript that seems like it would work in my case but it doesn't seem to.  After enabling logs under event-options, I found this message "Policy <test-completed>'s conditions dont match for event <PING_TEST_COMPLETED>"  The way I read that is that I don't have something configured properly. 

     

    Here is my config:

     

    system {
        host-name TEST;
        time-zone America/New_York;
        root-authentication {
            encrypted-password "SECRET"; ## SECRET-DATA
        }
        name-server {
            8.8.8.8;
            8.8.4.4;
        }
        services {
            ssh {
                protocol-version v2;
            }
            telnet;
            web-management {
                https {
                    system-generated-certificate;
                }
            }
            telnet;
            dhcp {
                pool 10.1.130.0/24 {
                    address-range low 10.1.130.30 high 10.1.130.90;
                    name-server {
                        8.8.8.8;
                        8.8.4.4;
                    }
                    router {
                        10.1.130.1;
                    }
                }
            }
        }
        syslog {
            archive size 100k files 3;
            host 10.2.2.55 {
                any any;
                change-log none;
                interactive-commands none;
            }
            file messages {
                any any;
                authorization any;
            }
            file interactive-commands {
                interactive-commands error;
            }
            file policy_session {
                user info;
                match RT_FLOW;
                archive size 1000k world-readable;
                structured-data;
            }
            file default-log-messages {
                any any;
                structured-data;
            }
        }
        max-configurations-on-flash 5;
        max-configuration-rollbacks 5;
        license {
            autoupdate {
                url https://ae1.juniper.net/junos/key_retrieval;
            }
        }
    }
    interfaces {
        ge-0/0/0 {
            unit 0 {
                family inet {
                    address 111.111.111.2/28;
                }
            }
        }
        ge-0/0/1 {
            unit 0 {
                family inet {
                    address 192.168.0.2/24;
                }
            }
        }
        fe-0/0/2 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/3 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/4 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/5 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/6 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/7 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        vlan {
            unit 0 {
                family inet {
                    address 10.1.130.1/24;
                }
            }
        }
    }
    routing-options {
        static {
            route 0.0.0.0/0 {
                qualified-next-hop 111.111.111.1;
                qualified-next-hop 192.168.0.1 {
                    preference 200;
                }
            }
        }
    }
    protocols {
        stp;
    }
    event-options {
        policy test-failed {
            events PING_TEST_FAILED;
            within 240 events [ PING_TEST_COMPLETED KERNEL SYSTEM ];
            attributes-match {
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
                SYSTEM.message matches "Starting of initial processes complete";
                KERNEL.message matches "event-processing \(PID.*\)started";
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        policy test-completed {
            events PING_TEST_COMPLETED;
            within 240 events [ PING_TEST_FAILED KERNEL SYSTEM ];
            attributes-match {
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
                SYSTEM.message matches "Starting of initial processes complete";
                KERNEL.message matches "event-processing \(PID .*\) started";
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        event-script {
            file watch-default-route.slax;
        }
    }
    security {
        screen {
            ids-option untrust-screen {
                icmp {
                    ping-death;
                }
                ip {
                    source-route-option;
                    tear-drop;
                }
                tcp {
                    syn-flood {
                        alarm-threshold 1024;
                        attack-threshold 200;
                        source-threshold 1024;
                        destination-threshold 2048;
                        timeout 20;
                    }
                    land;
                }
            }
        }
        nat {
            source {
                rule-set trust-to-untrust {
                    from zone trust;
                    to zone untrust;
                    rule source-nat-rule {
                        match {
                            source-address 0.0.0.0/0;
                        }
                        then {
                            source-nat {
                                interface;
                            }
                        }
                    }
                }
            }
        }
        policies {
            from-zone trust to-zone untrust {
                policy trust-to-untrust {
                    match {
                        source-address any;
                        destination-address any;
                        application any;
                    }
                    then {
                        permit;
                    }
                }
            }
        }
        zones {
            security-zone trust {
                host-inbound-traffic {
                    system-services {
                        all;
                    }
                    protocols {
                        all;
                    }
                }
                interfaces {
                    vlan.0 {
                        host-inbound-traffic {
                            system-services {
                                all;
                            }
                            protocols {
                                all;
                            }
                        }
                    }
                }
            }
            security-zone untrust {
                screen untrust-screen;
                interfaces {
                    ge-0/0/0.0 {
                        host-inbound-traffic {
                            system-services {
                                all;
                            }
                        }
                    }
                    ge-0/0/1.0 {
                        host-inbound-traffic {
                            system-services {
                                all;
                            }
                        }
                    }
                }
            }
        }
    }
    services {
        rpm {
            probe icmp-ping-probe {
                test ping-probe-test {
                    probe-type icmp-ping;
                    target address 8.8.8.8;
                    test-interval 60;
                }
            }
        }
    }
    vlans {
        vlan-trust {
            vlan-id 3;
            l3-interface vlan.0;
        }
    }

     

    This is the script that I am using...  it is stored in the appropriate area & is called watch-default-route.slax

     

    /*

     * This event script activates/deactivates the qualified next-hop of the default

     * route based on the success or failure of a RPM test. When the test is successful

     * the route will be activated.  When the test fails the route will be deactivated.

     *

     * The qualified next-hop must be passed as the next-hop argument.

     *

     */

     

    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";

     

    param $next-hop = "10.0.0.1";

     

    match / {

        <event-script-results> {   

            /* Learn the event type, either a PING_TEST_FAILED or PING_TEST_COMPLETED */

            var $event-type = event-script-input/trigger-event/id;

     

            /* Retrieve the current configuration for the static route */

            var $configuration-rpc = {

                <get-configuration database="committed"> {

                    <configuration> {

                        <routing-options>;

                    }

                }

            }

            var $current = jcs:invoke( $configuration-rpc );

           

            /* Grab the routing-options static node to make further location paths shorter */

            var $static = $current/routing-options/static;

     

            /* Is the route currently inactive? */

            var $inactive = $static/route[name == "0.0.0.0/0"]/qualified-next-hop[name == $next-hop]/@inactive;

           

            /*

             * Compare the event type vs the current value of $inactive.  If they

             * do not match then a configuration change must be performed.

             */

            

            /* RPM test failed but the route is currently active */

            if( $event-type == "PING_TEST_FAILED" && jcs:empty( $inactive ) ) {

               

                /* Needed configuration change */

                var $configuration = {

                    <configuration> {

                        <routing-options> {

                            <static> {

                                <route> {

                                    <name> "0.0.0.0/0";

                                    <qualified-next-hop inactive="inactive"> {

                                        <name> $next-hop;

                                    }

                                }

                            }

                        }

                    }

                }

               

                /* Open connection, load and commit the change, and close connection  */

                var $connection = jcs:open();

                var $results := {

                    call jcs:load-configuration( $connection, $configuration );

                    copy-of jcs:close( $connection );

                }

               

                /* If any errors occurred during the commit process then report them to the syslog */

                if( $results//xnm:error ) {

                    for-each( $results//xnm:error ) {

                        expr jcs:syslog( "external.error", "Error deactivating ", $next-hop, " next-hop: ", message );

                    }  

                }

                /* Otherwise, report success */

                else {

                    expr jcs:syslog( "external.notice", "0/0 next-hop ", $next-hop, " disabled." );

                }

            }

            /* RPM test succeeded but the route is currently inactive */

            else if( $event-type == "PING_TEST_COMPLETED" && $inactive ) {

               

                /* Needed configuration change */

                var $configuration = {

                    <configuration> {

                        <routing-options> {

                            <static> {

                                <route> {

                                    <name> "0.0.0.0/0";

                                   
    <qualified-next-hop active="active"> {

                                        <name> $next-hop;

                                    }

                                }

                            }

                        }

                    }

                }

               

                /* Open connection, load and commit the change, and close connection  */

                var $connection = jcs:open();

                var $results := {

                    call jcs:load-configuration( $connection, $configuration );

                    copy-of jcs:close( $connection );

                }

               

                /* If any errors occurred during the commit process then report them to the syslog */

                if( $results//xnm:error ) {

                    for-each( $results//xnm:error ) {

                        expr jcs:syslog( "external.error", "Error activating ", $next-hop, " next-hop: ", message );

                    }  

                }

                /* Otherwise, report success */

                else {

                    expr jcs:syslog( "external.notice", "0/0 next-hop ", $next-hop, " activated." );

                }

            }

        }

    }

     

    Please help me out here.



  • 2.  RE: Primary nexthop script failure

     
    Posted 10-21-2013 21:10

    Hi David,

     

    is there any particular reason why you are matching also against the log messages "Starting of initial processes complete" and  "event-processing \(PID.*\)started"?

    This may explain why the script is not being triggered: because those log messages are not found within 240 seconds from when the ping test completed.

     

    If you don't need to match also against those events, you can try to configure the event-policy as follows:

     

    event-options {
        policy test-failed {
            events PING_TEST_FAILED;
            within 240 events [ PING_TEST_COMPLETED];
            attributes-match {
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop IP Address;
                    }
                }
            }
        }
        policy test-completed {
            events PING_TEST_COMPLETED;
            within 240 events [ PING_TEST_FAILED ];
            attributes-match {
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop IP Address;
                    }
                }
            }

    Hope it helps,

    Mattia

     



  • 3.  RE: Primary nexthop script failure

    Posted 10-22-2013 07:22

    Ah..  Yeah... I grabbed that from another post.  Let me try it with your adjustments to see.  I'll let you know.



  • 4.  RE: Primary nexthop script failure

    Posted 10-22-2013 08:10

    Hey Mattia,

     

    Just tried out your fix.  Still nogo.  Here's the current log:

     

    Oct 22 18:51:18 eventd_get_struct
    Oct 22 18:51:18 eventd_recalculate_output_time
    Oct 22 18:51:18 eventd_sl_delete_file
    Oct 22 18:51:18 eventd_sl_get_file_by_name
    Oct 22 18:51:18 eventd_sl_make_file
    Oct 22 18:51:18 eventd_get_struct
    Oct 22 18:51:18 eventd_sl_get_file_by_name
    Oct 22 18:51:18 eventd_get_struct
    Oct 22 18:51:18 eventd_sl_delete_file
    Oct 22 18:51:18 eventd_sl_get_file_by_name
    Oct 22 18:51:18 eventd_sl_clean_up_files
    Oct 22 18:51:18 eventd_check_file_transfer
    Oct 22 18:51:18 Executing command </usr/libexec/ui/cscript -mescriptdefinition -f  watch-default-route.slax -M >
    Oct 22 18:51:19 CHLD process /usr/libexec/ui/cscript with pid <4415> terminated successfully
    Oct 22 18:51:19 Executing command </usr/sbin/mgd -P/tmp/eventd-temp-db.nh1SA xml-load /tmp/escript-config-xml.wxBQF >
    Oct 22 18:51:22 CHLD process /usr/sbin/mgd with pid <4416> terminated successfully
    Oct 22 18:51:22 eventd_config_read_event_options
    Oct 22 18:51:22 eventd_config_event_options_object
    Oct 22 18:51:22 eventd_config_release_objects
    Oct 22 18:51:22 eventd_db_replace
    Oct 22 18:51:22 eventd_delete_event_policy_list
    Oct 22 18:51:22 eventd_free_event_policy
    Oct 22 18:51:22 eventd_free_event_policy
    Oct 22 18:51:22 eventd_delete_destination_list
    Oct 22 18:51:22 eventd_delete_cfgd_eventid_list
    Oct 22 18:51:22 eventd_delete_eventscript_traceoptions
    Oct 22 18:51:22 eventd_delete_event_script_list
    Oct 22 18:51:22 eventd_internal_event_cleanup
    Oct 22 18:51:22 eventd_delete_cfgd_policy_list
    Oct 22 18:51:23 SIGCHLD received
    Oct 22 18:51:23 SIGCHLD received pid <-1>
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_create
    Oct 22 18:51:23 eventd_event_preprocess
    Oct 22 18:51:23 event_syslog_preprocess
    Oct 22 18:51:23 Number of events in the queue for processing 1
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_create
    Oct 22 18:51:23 eventd_event_preprocess
    Oct 22 18:51:23 event_syslog_preprocess
    Oct 22 18:51:23 Number of events in the queue for processing 2
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_create
    Oct 22 18:51:23 eventd_event_preprocess
    Oct 22 18:51:23 event_syslog_preprocess
    Oct 22 18:51:23 Number of events in the queue for processing 3
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_create
    Oct 22 18:51:23 eventd_event_preprocess
    Oct 22 18:51:23 event_syslog_preprocess
    Oct 22 18:51:23 Number of events in the queue for processing 4
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_create
    Oct 22 18:51:23 eventd_event_preprocess
    Oct 22 18:51:23 event_syslog_preprocess
    Oct 22 18:51:23 Number of events in the queue for processing 5
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_create
    Oct 22 18:51:23 eventd_event_preprocess
    Oct 22 18:51:23 event_syslog_preprocess
    Oct 22 18:51:23 Number of events in the queue for processing 6
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_create
    Oct 22 18:51:23 eventd_event_preprocess
    Oct 22 18:51:23 event_syslog_preprocess
    Oct 22 18:51:23 Number of events in the queue for processing 7
    Oct 22 18:51:23 eventd_message_read
    Oct 22 18:51:23 eventd_event_process_queue
    Oct 22 18:51:23 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 eventd_event_process
    Oct 22 18:51:23 eventd_get_event_policies
    Oct 22 18:51:23 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 event_syslog_process
    Oct 22 18:51:23 eventd_notify_daemons
    Oct 22 18:51:23 eventd_event_clear_ref
    Oct 22 18:51:23 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 eventd_event_process
    Oct 22 18:51:23 eventd_get_event_policies
    Oct 22 18:51:23 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 event_syslog_process
    Oct 22 18:51:23 eventd_notify_daemons
    Oct 22 18:51:23 eventd_event_clear_ref
    Oct 22 18:51:23 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 eventd_event_process
    Oct 22 18:51:23 eventd_get_event_policies
    Oct 22 18:51:23 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 event_syslog_process
    Oct 22 18:51:23 eventd_notify_daemons
    Oct 22 18:51:23 eventd_event_clear_ref
    Oct 22 18:51:23 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 eventd_event_process
    Oct 22 18:51:23 eventd_get_event_policies
    Oct 22 18:51:23 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 event_syslog_process
    Oct 22 18:51:23 eventd_notify_daemons
    Oct 22 18:51:23 eventd_event_clear_ref
    Oct 22 18:51:23 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 eventd_event_process
    Oct 22 18:51:23 eventd_get_event_policies
    Oct 22 18:51:23 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 event_syslog_process
    Oct 22 18:51:23 eventd_notify_daemons
    Oct 22 18:51:23 eventd_event_clear_ref
    Oct 22 18:51:23 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 eventd_event_process
    Oct 22 18:51:23 eventd_get_event_policies
    Oct 22 18:51:23 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 18:51:23 event_syslog_process
    Oct 22 18:51:23 eventd_notify_daemons
    Oct 22 18:51:23 eventd_event_clear_ref
    Oct 22 18:51:23 Processing event <UI_CFG_AUDIT_OTHER>
    Oct 22 18:51:23 eventd_event_process
    Oct 22 18:51:23 eventd_get_event_policies
    Oct 22 18:51:23 No policies for event <UI_CFG_AUDIT_OTHER>
    Oct 22 18:51:23 event_syslog_process
    Oct 22 18:51:23 eventd_notify_daemons
    Oct 22 18:51:23 eventd_event_clear_ref
    Oct 22 18:51:27 eventd_message_read
    Oct 22 18:51:27 eventd_event_create
    Oct 22 18:51:27 eventd_event_preprocess
    Oct 22 18:51:27 event_syslog_preprocess
    Oct 22 18:51:27 Number of events in the queue for processing 1
    Oct 22 18:51:27 eventd_message_read
    Oct 22 18:51:27 eventd_event_process_queue
    Oct 22 18:51:27 Processing event <UI_CMDLINE_READ_LINE>
    Oct 22 18:51:27 eventd_event_process
    Oct 22 18:51:27 eventd_event_clear_ref
    Oct 22 18:51:27 eventd_get_event_policies
    Oct 22 18:51:27 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 22 18:51:27 event_syslog_process
    Oct 22 18:51:27 eventd_notify_daemons
    Oct 22 18:51:27 eventd_event_clear_ref
    Oct 22 18:51:30 eventd_message_read
    Oct 22 18:51:30 eventd_event_create
    Oct 22 18:51:30 eventd_event_preprocess
    Oct 22 18:51:30 event_syslog_preprocess
    Oct 22 18:51:30 Number of events in the queue for processing 1
    Oct 22 18:51:30 eventd_message_read
    Oct 22 18:51:30 eventd_event_process_queue
    Oct 22 18:51:30 Processing event <PING_TEST_COMPLETED>
    Oct 22 18:51:30 eventd_event_process
    Oct 22 18:51:30 eventd_get_event_policies
    Oct 22 18:51:30 event_get_attr_val
    Oct 22 18:51:30 event_get_attr_val
    Oct 22 18:51:30 eventd_find_rcvd_event
    Oct 22 18:51:30 Policy <test-completed>'s conditions dont match for event <PING_TEST_COMPLETED>
    Oct 22 18:51:30 eventd_cache_event
    Oct 22 18:51:30 before deleting cached events, num events cached <500>
    Oct 22 18:51:30 eventd_event_clear_ref
    Oct 22 18:51:30 after deleting cached events, num events cached <499>
    Oct 22 18:51:30 event_syslog_process
    Oct 22 18:51:30 eventd_notify_daemons
    Oct 22 18:52:33 eventd_message_read
    Oct 22 18:52:33 eventd_event_create
    Oct 22 18:52:33 eventd_event_preprocess
    Oct 22 18:52:33 event_syslog_preprocess
    Oct 22 18:52:33 Number of events in the queue for processing 1
    Oct 22 18:52:33 eventd_message_read
    Oct 22 18:52:33 eventd_event_process_queue
    Oct 22 18:52:33 Processing event <PING_TEST_COMPLETED>
    Oct 22 18:52:33 eventd_event_process
    Oct 22 18:52:33 eventd_get_event_policies
    Oct 22 18:52:33 event_get_attr_val
    Oct 22 18:52:33 event_get_attr_val
    Oct 22 18:52:33 eventd_find_rcvd_event
    Oct 22 18:52:33 Policy <test-completed>'s conditions dont match for event <PING_TEST_COMPLETED>
    Oct 22 18:52:33 eventd_cache_event
    Oct 22 18:52:33 before deleting cached events, num events cached <500>
    Oct 22 18:52:33 eventd_event_clear_ref
    Oct 22 18:52:33 after deleting cached events, num events cached <499>
    Oct 22 18:52:33 event_syslog_process
    Oct 22 18:52:33 eventd_notify_daemons
    Oct 22 18:52:41 eventd_message_read
    Oct 22 18:52:42 eventd_event_create
    Oct 22 18:52:42 eventd_event_preprocess
    Oct 22 18:52:42 event_syslog_preprocess
    Oct 22 18:52:42 Number of events in the queue for processing 1
    Oct 22 18:52:42 eventd_message_read
    Oct 22 18:52:42 eventd_event_create
    Oct 22 18:52:42 eventd_event_preprocess
    Oct 22 18:52:42 event_syslog_preprocess
    Oct 22 18:52:42 Number of events in the queue for processing 2
    Oct 22 18:52:42 eventd_message_read
    Oct 22 18:52:42 eventd_event_process_queue
    Oct 22 18:52:42 Processing event <UI_CMDLINE_READ_LINE>
    Oct 22 18:52:42 eventd_event_process
    Oct 22 18:52:42 eventd_event_clear_ref
    Oct 22 18:52:42 eventd_get_event_policies
    Oct 22 18:52:42 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 22 18:52:42 event_syslog_process
    Oct 22 18:52:42 eventd_notify_daemons
    Oct 22 18:52:42 eventd_event_clear_ref
    Oct 22 18:52:42 Processing event <UI_DBASE_LOGOUT_EVENT>
    Oct 22 18:52:42 eventd_event_process
    Oct 22 18:52:42 eventd_get_event_policies
    Oct 22 18:52:42 No policies for event <UI_DBASE_LOGOUT_EVENT>
    Oct 22 18:52:42 event_syslog_process
    Oct 22 18:52:42 eventd_notify_daemons
    Oct 22 18:52:42 eventd_event_clear_ref
    Oct 22 18:52:44 eventd_message_read
    Oct 22 18:52:44 eventd_event_create
    Oct 22 18:52:44 eventd_event_preprocess
    Oct 22 18:52:44 event_syslog_preprocess
    Oct 22 18:52:44 Number of events in the queue for processing 1
    Oct 22 18:52:44 eventd_message_read
    Oct 22 18:52:44 eventd_event_process_queue
    Oct 22 18:52:44 Processing event <UI_CMDLINE_READ_LINE>
    Oct 22 18:52:44 eventd_event_process
    Oct 22 18:52:44 eventd_event_clear_ref
    Oct 22 18:52:44 eventd_get_event_policies
    Oct 22 18:52:44 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 22 18:52:44 event_syslog_process
    Oct 22 18:52:44 eventd_notify_daemons
    Oct 22 18:52:44 eventd_event_clear_ref
    

     



  • 5.  RE: Primary nexthop script failure

     
    Posted 10-22-2013 09:00

    So, it looks like the other conditions are not being matched: in order to trigger the script, within 240 seconds from when the PING_TEST_COMPLETED event happened, also the event PING_TEST_FAILED should have happened, otherwise the policy matching conditions will not apply. Be sure also to match the test-owner and test-name values; it looks so from the configuration, but you can confirm that by inspecting the log messages file:

     

    R1 rmopd[1345]: PING_TEST_COMPLETED: pingCtlOwnerIndex = icmp-ping-probe, pingCtlTestName = ping-probe-test

     

    Furthermore, as a convenient way to test the triggering conditions for the script I'd suggest you to try the logger utility to simulate events; it is explained in the Applying Junos Automation Day One book.



  • 6.  RE: Primary nexthop script failure

    Posted 10-22-2013 09:38

    Looking at test-owner and test-name, there is no mention of it besides under event-options.  Where should they be in the configuration?



  • 7.  RE: Primary nexthop script failure

     
    Posted 10-22-2013 10:07

    test-owner is the probe name and test-name is the test name in the rpm configuration:

     

        rpm {
            probe icmp-ping-probe {
                test ping-probe-test {
                    probe-type icmp-ping;
                    target address 8.8.8.8;
                    test-interval 60;

     



  • 8.  RE: Primary nexthop script failure

    Posted 10-22-2013 10:40

    Gotcha..  Now I see.  Well it looks good in the config then.  I'll try to fumble through the logger utility.  Never really messed with it.

     

    If you see any other issues while I'm fumbling, let me know.



  • 9.  RE: Primary nexthop script failure

    Posted 10-22-2013 11:34

    The event policy you referenced is designed to react to changes in RPM test status from success to failure or failure to success. You could have successful tests every thirty seconds for weeks on end, so you really don't want to script to execute each time. Instead, you only want it to execute when that success suddenly becomes a failure (or vice versa).

     

    The catch is that you need to make sure your config is correctly synchronized with the current RPM state when you first start using the script, otherwise you could get in a situation where the script doesn't fire (because no change in RPM test status is occurring, either the test is constantly up or constantly down).

     

    Try restarting the event process. (That is what the kernel event is trying to catch) Or cause the RPM test to start failing/succeeding and see if it kicks into gear.



  • 10.  RE: Primary nexthop script failure

    Posted 10-22-2013 11:58

    ccall,

     

    As far as causing the RPM test to start failing, that is essentially what I'm doing.  I have a modem connected to a dummy switch and then connect the SRX to that switch via ge-0/0/0.  The primary first hop works fine & if I disconnect the cable from ge-0/0/0 it then fails over to other next hop ge-0/0/1 & no issues.  The issue occurs when there's still activity in the ge-0/0/0 port.  It doesn't switch over which is why the script was needed and the RPM.  So to trigger the RPM test to fail, I leave the cable connected to ge-0/0/0 and just unplug the cable from the dummy switch to the ISP modem.  Pinging to 8.8.8.8 fails on a test pc but the failover doesn't happen.  I'm new to all this so please excuse my ignorance.  Trying to get this project going for my boss.  Maybe I'm missing something?  Wrong target address in the RPM?  Wrong IP's in the event-options?  Perhaps I need to start from scratch with a different script that would suit our needs.  Again, I'm looking for a way for the SRX to detect lack of outside access on the primary hop & switch to the secondary & once access is re-established on the primary hop, have it switch back to the primary.  You guys are the experts.  I'm at your mercy. 



  • 11.  RE: Primary nexthop script failure

    Posted 10-22-2013 12:09

    You can use this command to check on your RPM test:

     

     show services rpm probe-results

     

    Is it showing success or failure as you expect? If not, then you'll want to focus on the RPM config.

     

    To simplify the event options, you can deactivate your current policies and create a new one that matches the two events
    PING_TEST_FAILED and PING_TEST_COMPLETED and executes the mentioned event script as an action. At that point, the script should run every minute. (based on the RPM test interval)



  • 12.  RE: Primary nexthop script failure

    Posted 10-22-2013 12:31

    Yeah...  With everything connected properly, loss percentage is 0.  With the modem unplugged from the switch, loss percentage is 100

     

    As far as event-options, I'll try to mess with it.  Still to new to it to be comfortable but I'll give it a whirl



  • 13.  RE: Primary nexthop script failure

    Posted 10-22-2013 13:32

    This is going to be long so bear with me...  Here's the log with my slightly simplified event-options.... well let me put the event-options in first (I probably messed that up):

    event-options {
        inactive: policy test-failed {
            events PING_TEST_FAILED;
            within 240 events PING_TEST_COMPLETED;
            attributes-match {
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        inactive: policy test-completed {
            events PING_TEST_COMPLETED;
            within 240 events PING_TEST_FAILED;
            attributes-match {
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        policy DC-test-failed {
            events ping_test_failed;
            attributes-match {
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        policy DC-test-completed {
            events ping_test_completed;
            attributes-match {
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        event-script {
            file watch-default-route.slax;
        }
        traceoptions {
            file TRACE_EVENT_OPTIONS size 1m;
            flag all;
        }
    }
    

     Here's the log

    Oct 22 23:57:16 TEST clear-log[5849]: logfile cleared
    Oct 22 23:57:42 eventd_config_read_destinations
    Oct 22 23:57:42 eventd_config_read_attributes
    Oct 22 23:57:42 eventd_config_read_policy_list
    Oct 22 23:57:42 eventd_init_event_policy_list
    Oct 22 23:57:42 eventd_init_cfgd_eventid_list
    Oct 22 23:57:42 eventd_init_cfgd_policy_list
    Oct 22 23:57:42 eventd_config_read_policy
    Oct 22 23:57:42 eventd_config_read_policy_events
    Oct 22 23:57:42 eventd_config_read_policy_within
    Oct 22 23:57:42 eventd_config_read_policy_attr_match
    Oct 22 23:57:42 eventd_config_read_policy_then
    Oct 22 23:57:42 eventd_config_read_policy_then_upload
    Oct 22 23:57:42 eventd_config_read_policy_then_exec_cmd
    Oct 22 23:57:42 eventd_config_read_policy_then_event_script
    Oct 22 23:57:42 eventd_add_event_policy
    Oct 22 23:57:42 eventd_config_read_policy
    Oct 22 23:57:42 eventd_config_read_policy_events
    Oct 22 23:57:42 eventd_config_read_policy_within
    Oct 22 23:57:42 eventd_config_read_policy_attr_match
    Oct 22 23:57:42 eventd_config_read_policy_then
    Oct 22 23:57:42 eventd_config_read_policy_then_upload
    Oct 22 23:57:42 eventd_config_read_policy_then_exec_cmd
    Oct 22 23:57:42 eventd_config_read_policy_then_event_script
    Oct 22 23:57:42 eventd_add_event_policy
    Oct 22 23:57:42 eventd_config_read_generate_event_list
    Oct 22 23:57:42 eventd_config_read_event_script_list
    Oct 22 23:57:42 eventd_init_event_script_list
    Oct 22 23:57:42 eventd_init_register_event_listener
    Oct 22 23:57:42 eventd_config_release_objects
    Oct 22 23:57:42 eventd_safari_config_read
    Oct 22 23:57:42 eventd_sl_file_config
    Oct 22 23:57:42 eventd_sl_read_file_config
    Oct 22 23:57:42 eventd_sl_make_file
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_sl_delete_file
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_sl_make_file
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_sl_delete_file
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_sl_make_file
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_recalculate_output_time
    Oct 22 23:57:42 eventd_sl_delete_file
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_sl_make_file
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_get_struct
    Oct 22 23:57:42 eventd_sl_delete_file
    Oct 22 23:57:42 eventd_sl_get_file_by_name
    Oct 22 23:57:42 eventd_sl_clean_up_files
    Oct 22 23:57:42 eventd_check_file_transfer
    Oct 22 23:57:42 Executing command </usr/libexec/ui/cscript -mescriptdefinition -f  watch-default-route.slax -M >
    Oct 22 23:57:44 CHLD process /usr/libexec/ui/cscript with pid <5866> terminated successfully
    Oct 22 23:57:44 Executing command </usr/sbin/mgd -P/tmp/eventd-temp-db.yYlBC xml-load /tmp/escript-config-xml.C1Lcv >
    Oct 22 23:57:46 CHLD process /usr/sbin/mgd with pid <5867> terminated successfully
    Oct 22 23:57:46 eventd_config_read_event_options
    Oct 22 23:57:46 eventd_config_event_options_object
    Oct 22 23:57:46 eventd_config_release_objects
    Oct 22 23:57:46 eventd_db_replace
    Oct 22 23:57:46 eventd_delete_event_policy_list
    Oct 22 23:57:46 eventd_delete_destination_list
    Oct 22 23:57:46 eventd_delete_cfgd_eventid_list
    Oct 22 23:57:46 eventd_delete_eventscript_traceoptions
    Oct 22 23:57:46 eventd_delete_event_script_list
    Oct 22 23:57:46 eventd_internal_event_cleanup
    Oct 22 23:57:46 eventd_delete_cfgd_policy_list
    Oct 22 23:57:47 SIGCHLD received
    Oct 22 23:57:47 SIGCHLD received pid <-1>
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_create
    Oct 22 23:57:47 eventd_event_preprocess
    Oct 22 23:57:47 event_syslog_preprocess
    Oct 22 23:57:47 Number of events in the queue for processing 1
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_create
    Oct 22 23:57:47 eventd_event_preprocess
    Oct 22 23:57:47 event_syslog_preprocess
    Oct 22 23:57:47 Number of events in the queue for processing 2
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_create
    Oct 22 23:57:47 eventd_event_preprocess
    Oct 22 23:57:47 event_syslog_preprocess
    Oct 22 23:57:47 Number of events in the queue for processing 3
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_create
    Oct 22 23:57:47 eventd_event_preprocess
    Oct 22 23:57:47 event_syslog_preprocess
    Oct 22 23:57:47 Number of events in the queue for processing 4
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_create
    Oct 22 23:57:47 eventd_event_preprocess
    Oct 22 23:57:47 event_syslog_preprocess
    Oct 22 23:57:47 Number of events in the queue for processing 5
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_create
    Oct 22 23:57:47 eventd_event_preprocess
    Oct 22 23:57:47 event_syslog_preprocess
    Oct 22 23:57:47 Number of events in the queue for processing 6
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_create
    Oct 22 23:57:47 eventd_event_preprocess
    Oct 22 23:57:47 event_syslog_preprocess
    Oct 22 23:57:47 Number of events in the queue for processing 7
    Oct 22 23:57:47 eventd_message_read
    Oct 22 23:57:47 eventd_event_process_queue
    Oct 22 23:57:47 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 eventd_event_process
    Oct 22 23:57:47 eventd_get_event_policies
    Oct 22 23:57:47 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 event_syslog_process
    Oct 22 23:57:47 eventd_notify_daemons
    Oct 22 23:57:47 eventd_event_clear_ref
    Oct 22 23:57:47 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 eventd_event_process
    Oct 22 23:57:47 eventd_get_event_policies
    Oct 22 23:57:47 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 event_syslog_process
    Oct 22 23:57:47 eventd_notify_daemons
    Oct 22 23:57:47 eventd_event_clear_ref
    Oct 22 23:57:47 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 eventd_event_process
    Oct 22 23:57:47 eventd_get_event_policies
    Oct 22 23:57:47 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 event_syslog_process
    Oct 22 23:57:47 eventd_notify_daemons
    Oct 22 23:57:47 eventd_event_clear_ref
    Oct 22 23:57:47 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 eventd_event_process
    Oct 22 23:57:47 eventd_get_event_policies
    Oct 22 23:57:47 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 event_syslog_process
    Oct 22 23:57:47 eventd_notify_daemons
    Oct 22 23:57:47 eventd_event_clear_ref
    Oct 22 23:57:47 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 eventd_event_process
    Oct 22 23:57:47 eventd_get_event_policies
    Oct 22 23:57:47 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 event_syslog_process
    Oct 22 23:57:47 eventd_notify_daemons
    Oct 22 23:57:47 eventd_event_clear_ref
    Oct 22 23:57:47 Processing event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 eventd_event_process
    Oct 22 23:57:47 eventd_get_event_policies
    Oct 22 23:57:47 No policies for event <UI_COMMIT_PROGRESS>
    Oct 22 23:57:47 event_syslog_process
    Oct 22 23:57:47 eventd_notify_daemons
    Oct 22 23:57:47 eventd_event_clear_ref
    Oct 22 23:57:47 Processing event <UI_CFG_AUDIT_OTHER>
    Oct 22 23:57:47 eventd_event_process
    Oct 22 23:57:47 eventd_get_event_policies
    Oct 22 23:57:47 No policies for event <UI_CFG_AUDIT_OTHER>
    Oct 22 23:57:47 event_syslog_process
    Oct 22 23:57:47 eventd_notify_daemons
    Oct 22 23:57:47 eventd_event_clear_ref
    Oct 22 23:57:58 eventd_message_read
    Oct 22 23:57:58 eventd_event_create
    Oct 22 23:57:58 eventd_event_preprocess
    Oct 22 23:57:58 event_syslog_preprocess
    Oct 22 23:57:58 Number of events in the queue for processing 1
    Oct 22 23:57:58 eventd_message_read
    Oct 22 23:57:58 eventd_event_create
    Oct 22 23:57:58 eventd_event_preprocess
    Oct 22 23:57:58 event_syslog_preprocess
    Oct 22 23:57:58 Number of events in the queue for processing 2
    Oct 22 23:57:58 eventd_message_read
    Oct 22 23:57:58 eventd_event_process_queue
    Oct 22 23:57:58 Processing event <UI_CMDLINE_READ_LINE>
    Oct 22 23:57:58 eventd_event_process
    Oct 22 23:57:58 eventd_event_clear_ref
    Oct 22 23:57:58 eventd_get_event_policies
    Oct 22 23:57:58 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 22 23:57:58 event_syslog_process
    Oct 22 23:57:58 eventd_notify_daemons
    Oct 22 23:57:58 eventd_event_clear_ref
    Oct 22 23:57:58 Processing event <UI_DBASE_LOGOUT_EVENT>
    Oct 22 23:57:58 eventd_event_process
    Oct 22 23:57:58 eventd_get_event_policies
    Oct 22 23:57:58 No policies for event <UI_DBASE_LOGOUT_EVENT>
    Oct 22 23:57:58 event_syslog_process
    Oct 22 23:57:58 eventd_notify_daemons
    Oct 22 23:57:58 eventd_event_clear_ref
    Oct 22 23:58:02 eventd_message_read
    Oct 22 23:58:02 eventd_event_create
    Oct 22 23:58:02 eventd_event_preprocess
    Oct 22 23:58:02 event_syslog_preprocess
    Oct 22 23:58:02 Number of events in the queue for processing 1
    Oct 22 23:58:02 eventd_message_read
    Oct 22 23:58:02 eventd_event_process_queue
    Oct 22 23:58:02 Processing event <UI_CMDLINE_READ_LINE>
    Oct 22 23:58:02 eventd_event_process
    Oct 22 23:58:02 eventd_event_clear_ref
    Oct 22 23:58:02 eventd_get_event_policies
    Oct 22 23:58:02 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 22 23:58:02 event_syslog_process
    Oct 22 23:58:02 eventd_notify_daemons
    Oct 22 23:58:02 eventd_event_clear_ref
    Oct 22 23:58:02 eventd_message_read
    Oct 22 23:58:02 eventd_event_create
    Oct 22 23:58:02 eventd_event_preprocess
    Oct 22 23:58:02 event_syslog_preprocess
    Oct 22 23:58:02 Number of events in the queue for processing 1
    Oct 22 23:58:02 eventd_message_read
    Oct 22 23:58:02 eventd_event_process_queue
    Oct 22 23:58:02 Processing event <PING_TEST_COMPLETED>
    Oct 22 23:58:02 eventd_event_process
    Oct 22 23:58:02 eventd_get_event_policies
    Oct 22 23:58:02 event_get_attr_val
    Oct 22 23:58:02 event_get_attr_val
    Oct 22 23:58:02 policy <DC-test-completed> should now be executed
    Oct 22 23:58:02 Executing policy: <DC-test-completed>
    Oct 22 23:58:02 eventd_policy_action_next
    Oct 22 23:58:02 eventd_policy_action_next
    Oct 22 23:58:02 eventd_policy_action_next
    Oct 22 23:58:02 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_xOhsjg' as the temporary command file, and '/tmp/evt_op_9iu3UN' as the temporary output file
    Oct 22 23:58:02 eventd_substitute_variable_cmd
    Oct 22 23:58:02 eventd_substitute_variable_cmd
    Oct 22 23:58:02 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 22 23:58:02 eventd_event_script_input
    Oct 22 23:58:02 eventd_cache_event
    Oct 22 23:58:02 before deleting cached events, num events cached <500>
    Oct 22 23:58:02 eventd_event_clear_ref
    Oct 22 23:58:02 after deleting cached events, num events cached <499>
    Oct 22 23:58:02 event_syslog_process
    Oct 22 23:58:02 eventd_notify_daemons
    Oct 22 23:58:02 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_xOhsjg /tmp/evt_op_9iu3UN XML>
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_create
    Oct 22 23:58:05 eventd_event_preprocess
    Oct 22 23:58:05 event_syslog_preprocess
    Oct 22 23:58:05 Number of events in the queue for processing 1
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_process_queue
    Oct 22 23:58:05 Processing event <UI_AUTH_EVENT>
    Oct 22 23:58:05 eventd_event_process
    Oct 22 23:58:05 eventd_get_event_policies
    Oct 22 23:58:05 No policies for event <UI_AUTH_EVENT>
    Oct 22 23:58:05 event_syslog_process
    Oct 22 23:58:05 eventd_notify_daemons
    Oct 22 23:58:05 eventd_event_clear_ref
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_create
    Oct 22 23:58:05 eventd_event_preprocess
    Oct 22 23:58:05 event_syslog_preprocess
    Oct 22 23:58:05 Number of events in the queue for processing 1
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_process_queue
    Oct 22 23:58:05 Processing event <UI_LOGIN_EVENT>
    Oct 22 23:58:05 eventd_event_process
    Oct 22 23:58:05 eventd_event_clear_ref
    Oct 22 23:58:05 eventd_get_event_policies
    Oct 22 23:58:05 No policies for event <UI_LOGIN_EVENT>
    Oct 22 23:58:05 event_syslog_process
    Oct 22 23:58:05 eventd_notify_daemons
    Oct 22 23:58:05 eventd_event_clear_ref
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_create
    Oct 22 23:58:05 eventd_event_preprocess
    Oct 22 23:58:05 event_syslog_preprocess
    Oct 22 23:58:05 Number of events in the queue for processing 1
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_process_queue
    Oct 22 23:58:05 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 22 23:58:05 eventd_event_process
    Oct 22 23:58:05 eventd_get_event_policies
    Oct 22 23:58:05 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 22 23:58:05 event_syslog_process
    Oct 22 23:58:05 eventd_notify_daemons
    Oct 22 23:58:05 eventd_event_clear_ref
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_create
    Oct 22 23:58:05 eventd_event_preprocess
    Oct 22 23:58:05 event_syslog_preprocess
    Oct 22 23:58:05 Number of events in the queue for processing 1
    Oct 22 23:58:05 eventd_message_read
    Oct 22 23:58:05 eventd_event_process_queue
    Oct 22 23:58:05 SIGCHLD received
    Oct 22 23:58:05 SIGCHLD received pid <5872>
    Oct 22 23:58:05 CHLD pid <5872> terminated successfully
    Oct 22 23:58:05 in eventd_policy_action_finished for pid 5872
    Oct 22 23:58:05 eventd_policy_action_next
    Oct 22 23:58:05 eventd_policy_action_next
    Oct 22 23:58:05 eventd_policy_action_next
    Oct 22 23:58:05 removing active policy with name <DC-test-completed>
    Oct 22 23:58:05 eventd_event_clear_ref
    Oct 22 23:58:05 eventd_free_event_policy
    Oct 22 23:58:05 SIGCHLD received pid <-1>
    Oct 22 23:59:00 eventd_message_read
    Oct 22 23:59:00 eventd_event_create
    Oct 22 23:59:00 eventd_event_preprocess
    Oct 22 23:59:00 event_syslog_preprocess
    Oct 22 23:59:00 Number of events in the queue for processing 2
    Oct 22 23:59:00 eventd_message_read
    Oct 22 23:59:00 eventd_event_process_queue
    Oct 22 23:59:00 Processing event <UI_LOGOUT_EVENT>
    Oct 22 23:59:00 eventd_event_process
    Oct 22 23:59:00 eventd_event_clear_ref
    Oct 22 23:59:00 eventd_get_event_policies
    Oct 22 23:59:00 No policies for event <UI_LOGOUT_EVENT>
    Oct 22 23:59:00 event_syslog_process
    Oct 22 23:59:00 eventd_notify_daemons
    Oct 22 23:59:00 eventd_event_clear_ref
    Oct 22 23:59:00 Processing event <UI_CMDLINE_READ_LINE>
    Oct 22 23:59:00 eventd_event_process
    Oct 22 23:59:00 eventd_event_clear_ref
    Oct 22 23:59:00 eventd_get_event_policies
    Oct 22 23:59:00 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 22 23:59:00 event_syslog_process
    Oct 22 23:59:00 eventd_notify_daemons
    Oct 22 23:59:00 eventd_event_clear_ref
    Oct 22 23:59:02 eventd_message_read
    Oct 22 23:59:02 eventd_event_create
    Oct 22 23:59:02 eventd_event_preprocess
    Oct 22 23:59:02 event_syslog_preprocess
    Oct 22 23:59:02 Number of events in the queue for processing 1
    Oct 22 23:59:02 eventd_message_read
    Oct 22 23:59:02 eventd_event_process_queue
    Oct 22 23:59:02 Processing event <PING_TEST_COMPLETED>
    Oct 22 23:59:02 eventd_event_process
    Oct 22 23:59:02 eventd_get_event_policies
    Oct 22 23:59:02 event_get_attr_val
    Oct 22 23:59:02 event_get_attr_val
    Oct 22 23:59:02 policy <DC-test-completed> should now be executed
    Oct 22 23:59:02 Executing policy: <DC-test-completed>
    Oct 22 23:59:02 eventd_policy_action_next
    Oct 22 23:59:02 eventd_policy_action_next
    Oct 22 23:59:02 eventd_policy_action_next
    Oct 22 23:59:02 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_diUA2a' as the temporary command file, and '/tmp/evt_op_MoZ7dL' as the temporary output file
    Oct 22 23:59:02 eventd_substitute_variable_cmd
    Oct 22 23:59:02 eventd_substitute_variable_cmd
    Oct 22 23:59:02 eventd_event_script_input
    Oct 22 23:59:02 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 22 23:59:02 eventd_cache_event
    Oct 22 23:59:02 before deleting cached events, num events cached <500>
    Oct 22 23:59:02 eventd_event_clear_ref
    Oct 22 23:59:02 after deleting cached events, num events cached <499>
    Oct 22 23:59:02 event_syslog_process
    Oct 22 23:59:03 eventd_notify_daemons
    Oct 22 23:59:03 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_diUA2a /tmp/evt_op_MoZ7dL XML>
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_create
    Oct 22 23:59:05 eventd_event_preprocess
    Oct 22 23:59:05 event_syslog_preprocess
    Oct 22 23:59:05 Number of events in the queue for processing 1
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_process_queue
    Oct 22 23:59:05 Processing event <UI_AUTH_EVENT>
    Oct 22 23:59:05 eventd_event_process
    Oct 22 23:59:05 eventd_get_event_policies
    Oct 22 23:59:05 No policies for event <UI_AUTH_EVENT>
    Oct 22 23:59:05 event_syslog_process
    Oct 22 23:59:05 eventd_notify_daemons
    Oct 22 23:59:05 eventd_event_clear_ref
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_create
    Oct 22 23:59:05 eventd_event_preprocess
    Oct 22 23:59:05 event_syslog_preprocess
    Oct 22 23:59:05 Number of events in the queue for processing 1
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_process_queue
    Oct 22 23:59:05 Processing event <UI_LOGIN_EVENT>
    Oct 22 23:59:05 eventd_event_process
    Oct 22 23:59:05 eventd_event_clear_ref
    Oct 22 23:59:05 eventd_get_event_policies
    Oct 22 23:59:05 No policies for event <UI_LOGIN_EVENT>
    Oct 22 23:59:05 event_syslog_process
    Oct 22 23:59:05 eventd_notify_daemons
    Oct 22 23:59:05 eventd_event_clear_ref
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_create
    Oct 22 23:59:05 eventd_event_preprocess
    Oct 22 23:59:05 event_syslog_preprocess
    Oct 22 23:59:05 Number of events in the queue for processing 1
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_process_queue
    Oct 22 23:59:05 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 22 23:59:05 eventd_event_process
    Oct 22 23:59:05 eventd_get_event_policies
    Oct 22 23:59:05 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 22 23:59:05 event_syslog_process
    Oct 22 23:59:05 eventd_notify_daemons
    Oct 22 23:59:05 eventd_event_clear_ref
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_create
    Oct 22 23:59:05 eventd_event_preprocess
    Oct 22 23:59:05 event_syslog_preprocess
    Oct 22 23:59:05 Number of events in the queue for processing 1
    Oct 22 23:59:05 eventd_message_read
    Oct 22 23:59:05 eventd_event_process_queue
    Oct 22 23:59:05 SIGCHLD received
    Oct 22 23:59:05 SIGCHLD received pid <5876>
    Oct 22 23:59:05 CHLD pid <5876> terminated successfully
    Oct 22 23:59:05 in eventd_policy_action_finished for pid 5876
    Oct 22 23:59:05 eventd_policy_action_next
    Oct 22 23:59:05 eventd_policy_action_next
    Oct 22 23:59:05 eventd_policy_action_next
    Oct 22 23:59:05 removing active policy with name <DC-test-completed>
    Oct 22 23:59:05 eventd_event_clear_ref
    Oct 22 23:59:05 eventd_free_event_policy
    Oct 22 23:59:05 SIGCHLD received pid <-1>
    Oct 23 00:00:00 eventd_event_preprocess
    Oct 23 00:00:00 event_syslog_preprocess
    Oct 23 00:00:00 Number of events in the queue for processing 2
    Oct 23 00:00:00 eventd_event_preprocess
    Oct 23 00:00:00 event_syslog_preprocess
    Oct 23 00:00:00 Number of events in the queue for processing 3
    Oct 23 00:00:00 eventd_event_process_queue
    Oct 23 00:00:00 Processing event <UI_LOGOUT_EVENT>
    Oct 23 00:00:00 eventd_event_process
    Oct 23 00:00:00 eventd_event_clear_ref
    Oct 23 00:00:00 eventd_get_event_policies
    Oct 23 00:00:00 No policies for event <UI_LOGOUT_EVENT>
    Oct 23 00:00:00 event_syslog_process
    Oct 23 00:00:00 eventd_notify_daemons
    Oct 23 00:00:00 eventd_event_clear_ref
    Oct 23 00:00:00 Processing event <SYSTEM>
    Oct 23 00:00:00 eventd_event_process
    Oct 23 00:00:00 eventd_get_event_policies
    Oct 23 00:00:00 No policies for event <SYSTEM>
    Oct 23 00:00:00 event_syslog_process
    Oct 23 00:00:00 eventd_notify_daemons
    Oct 23 00:00:00 eventd_event_clear_ref
    Oct 23 00:00:00 Processing event <SYSTEM>
    Oct 23 00:00:00 eventd_event_process
    Oct 23 00:00:00 eventd_get_event_policies
    Oct 23 00:00:00 No policies for event <SYSTEM>
    Oct 23 00:00:00 event_syslog_process
    Oct 23 00:00:00 eventd_notify_daemons
    Oct 23 00:00:00 eventd_event_clear_ref
    Oct 23 00:00:01 EVENTD_RECONFIGURE_SIGHUP: SIGHUP received -- rereading configuration
    Oct 23 00:00:01 SIGHUP - re-reading configuration, pid 1073
    Oct 23 00:00:01 eventd_config_read
    Oct 23 00:00:01 eventd_config_objects_changed
    Oct 23 00:00:01 eventd_config_release_objects
    Oct 23 00:00:01 eventd_safari_config_read
    Oct 23 00:00:01 eventd_sl_file_config
    Oct 23 00:00:01 eventd_sl_read_file_config
    Oct 23 00:00:01 eventd_sl_make_file
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_sl_delete_file
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_sl_make_file
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_sl_delete_file
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_sl_make_file
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_recalculate_output_time
    Oct 23 00:00:01 eventd_sl_delete_file
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_sl_make_file
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_get_struct
    Oct 23 00:00:01 eventd_sl_delete_file
    Oct 23 00:00:01 eventd_sl_get_file_by_name
    Oct 23 00:00:01 eventd_sl_clean_up_files
    Oct 23 00:00:01 eventd_check_file_transfer
    Oct 23 00:00:06 eventd_message_read
    Oct 23 00:00:06 eventd_event_create
    Oct 23 00:00:06 eventd_event_preprocess
    Oct 23 00:00:06 event_syslog_preprocess
    Oct 23 00:00:06 Number of events in the queue for processing 1
    Oct 23 00:00:06 eventd_message_read
    Oct 23 00:00:06 eventd_event_process_queue
    Oct 23 00:00:06 Processing event <PING_TEST_COMPLETED>
    Oct 23 00:00:06 eventd_event_process
    Oct 23 00:00:06 eventd_get_event_policies
    Oct 23 00:00:06 event_get_attr_val
    Oct 23 00:00:06 event_get_attr_val
    Oct 23 00:00:06 policy <DC-test-completed> should now be executed
    Oct 23 00:00:06 Executing policy: <DC-test-completed>
    Oct 23 00:00:06 eventd_policy_action_next
    Oct 23 00:00:06 eventd_policy_action_next
    Oct 23 00:00:06 eventd_policy_action_next
    Oct 23 00:00:06 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_9vb97L' as the temporary command file, and '/tmp/evt_op_HNS8I4' as the temporary output file
    Oct 23 00:00:06 eventd_substitute_variable_cmd
    Oct 23 00:00:06 eventd_substitute_variable_cmd
    Oct 23 00:00:06 eventd_event_script_input
    Oct 23 00:00:06 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 23 00:00:06 eventd_cache_event
    Oct 23 00:00:06 before deleting cached events, num events cached <500>
    Oct 23 00:00:06 eventd_event_clear_ref
    Oct 23 00:00:06 after deleting cached events, num events cached <499>
    Oct 23 00:00:06 event_syslog_process
    Oct 23 00:00:06 eventd_notify_daemons
    Oct 23 00:00:06 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_9vb97L /tmp/evt_op_HNS8I4 XML>
    Oct 23 00:00:08 eventd_message_read
    Oct 23 00:00:08 eventd_event_create
    Oct 23 00:00:08 eventd_event_preprocess
    Oct 23 00:00:08 event_syslog_preprocess
    Oct 23 00:00:08 Number of events in the queue for processing 1
    Oct 23 00:00:08 eventd_message_read
    Oct 23 00:00:08 eventd_event_process_queue
    Oct 23 00:00:08 Processing event <UI_AUTH_EVENT>
    Oct 23 00:00:08 eventd_event_process
    Oct 23 00:00:08 eventd_get_event_policies
    Oct 23 00:00:08 No policies for event <UI_AUTH_EVENT>
    Oct 23 00:00:08 event_syslog_process
    Oct 23 00:00:08 eventd_notify_daemons
    Oct 23 00:00:08 eventd_event_clear_ref
    Oct 23 00:00:08 eventd_message_read
    Oct 23 00:00:08 eventd_event_create
    Oct 23 00:00:08 eventd_event_preprocess
    Oct 23 00:00:08 event_syslog_preprocess
    Oct 23 00:00:08 Number of events in the queue for processing 1
    Oct 23 00:00:08 eventd_message_read
    Oct 23 00:00:08 eventd_event_process_queue
    Oct 23 00:00:08 Processing event <UI_LOGIN_EVENT>
    Oct 23 00:00:08 eventd_event_process
    Oct 23 00:00:08 eventd_event_clear_ref
    Oct 23 00:00:08 eventd_get_event_policies
    Oct 23 00:00:08 No policies for event <UI_LOGIN_EVENT>
    Oct 23 00:00:08 event_syslog_process
    Oct 23 00:00:08 eventd_notify_daemons
    Oct 23 00:00:08 eventd_event_clear_ref
    Oct 23 00:00:08 eventd_message_read
    Oct 23 00:00:08 eventd_event_create
    Oct 23 00:00:08 eventd_event_preprocess
    Oct 23 00:00:08 event_syslog_preprocess
    Oct 23 00:00:08 Number of events in the queue for processing 1
    Oct 23 00:00:08 eventd_message_read
    Oct 23 00:00:08 eventd_event_process_queue
    Oct 23 00:00:08 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:00:08 eventd_event_process
    Oct 23 00:00:08 eventd_get_event_policies
    Oct 23 00:00:08 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:00:08 event_syslog_process
    Oct 23 00:00:08 eventd_notify_daemons
    Oct 23 00:00:08 eventd_event_clear_ref
    Oct 23 00:00:08 eventd_message_read
    Oct 23 00:00:09 eventd_event_create
    Oct 23 00:00:09 eventd_event_preprocess
    Oct 23 00:00:09 event_syslog_preprocess
    Oct 23 00:00:09 Number of events in the queue for processing 1
    Oct 23 00:00:09 eventd_message_read
    Oct 23 00:00:09 eventd_event_process_queue
    Oct 23 00:00:09 Processing event <UI_LOGOUT_EVENT>
    Oct 23 00:00:09 eventd_event_process
    Oct 23 00:00:09 eventd_event_clear_ref
    Oct 23 00:00:09 eventd_get_event_policies
    Oct 23 00:00:09 No policies for event <UI_LOGOUT_EVENT>
    Oct 23 00:00:09 event_syslog_process
    Oct 23 00:00:09 eventd_notify_daemons
    Oct 23 00:00:09 eventd_event_clear_ref
    Oct 23 00:00:09 SIGCHLD received
    Oct 23 00:00:09 SIGCHLD received pid <5884>
    Oct 23 00:00:09 CHLD pid <5884> terminated successfully
    Oct 23 00:00:09 in eventd_policy_action_finished for pid 5884
    Oct 23 00:00:09 eventd_policy_action_next
    Oct 23 00:00:09 eventd_policy_action_next
    Oct 23 00:00:09 eventd_policy_action_next
    Oct 23 00:00:09 removing active policy with name <DC-test-completed>
    Oct 23 00:00:09 eventd_event_clear_ref
    Oct 23 00:00:09 eventd_free_event_policy
    Oct 23 00:00:09 SIGCHLD received pid <-1>
    Oct 23 00:00:35 eventd_message_read
    Oct 23 00:00:35 eventd_event_create
    Oct 23 00:00:35 eventd_event_preprocess
    Oct 23 00:00:35 event_syslog_preprocess
    Oct 23 00:00:35 Number of events in the queue for processing 1
    Oct 23 00:00:35 eventd_message_read
    Oct 23 00:00:35 eventd_event_process_queue
    Oct 23 00:00:35 Processing event <UI_CMDLINE_READ_LINE>
    Oct 23 00:00:35 eventd_event_process
    Oct 23 00:00:35 eventd_event_clear_ref
    Oct 23 00:00:35 eventd_get_event_policies
    Oct 23 00:00:35 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 23 00:00:35 event_syslog_process
    Oct 23 00:00:35 eventd_notify_daemons
    Oct 23 00:00:35 eventd_event_clear_ref
    Oct 23 00:01:01 eventd_event_preprocess
    Oct 23 00:01:01 event_syslog_preprocess
    Oct 23 00:01:01 Number of events in the queue for processing 1
    Oct 23 00:01:01 eventd_event_process_queue
    Oct 23 00:01:01 Processing event <SYSTEM>
    Oct 23 00:01:01 eventd_event_process
    Oct 23 00:01:01 eventd_get_event_policies
    Oct 23 00:01:01 No policies for event <SYSTEM>
    Oct 23 00:01:01 event_syslog_process
    Oct 23 00:01:01 eventd_notify_daemons
    Oct 23 00:01:01 eventd_event_clear_ref
    Oct 23 00:01:09 eventd_message_read
    Oct 23 00:01:09 eventd_event_create
    Oct 23 00:01:09 eventd_event_preprocess
    Oct 23 00:01:09 event_syslog_preprocess
    Oct 23 00:01:09 Number of events in the queue for processing 1
    Oct 23 00:01:09 eventd_message_read
    Oct 23 00:01:09 eventd_event_process_queue
    Oct 23 00:01:09 Processing event <PING_TEST_COMPLETED>
    Oct 23 00:01:09 eventd_event_process
    Oct 23 00:01:09 eventd_get_event_policies
    Oct 23 00:01:09 event_get_attr_val
    Oct 23 00:01:09 event_get_attr_val
    Oct 23 00:01:09 policy <DC-test-completed> should now be executed
    Oct 23 00:01:09 Executing policy: <DC-test-completed>
    Oct 23 00:01:09 eventd_policy_action_next
    Oct 23 00:01:09 eventd_policy_action_next
    Oct 23 00:01:09 eventd_policy_action_next
    Oct 23 00:01:09 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_QeBrNc' as the temporary command file, and '/tmp/evt_op_3Z3iQN' as the temporary output file
    Oct 23 00:01:09 eventd_substitute_variable_cmd
    Oct 23 00:01:09 eventd_substitute_variable_cmd
    Oct 23 00:01:09 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 23 00:01:09 eventd_cache_event
    Oct 23 00:01:09 before deleting cached events, num events cached <500>
    Oct 23 00:01:09 eventd_event_clear_ref
    Oct 23 00:01:09 after deleting cached events, num events cached <499>
    Oct 23 00:01:09 event_syslog_process
    Oct 23 00:01:09 eventd_event_script_input
    Oct 23 00:01:09 eventd_notify_daemons
    Oct 23 00:01:09 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_QeBrNc /tmp/evt_op_3Z3iQN XML>
    Oct 23 00:01:11 eventd_message_read
    Oct 23 00:01:11 eventd_event_create
    Oct 23 00:01:11 eventd_event_preprocess
    Oct 23 00:01:11 event_syslog_preprocess
    Oct 23 00:01:11 Number of events in the queue for processing 1
    Oct 23 00:01:11 eventd_message_read
    Oct 23 00:01:11 eventd_event_process_queue
    Oct 23 00:01:11 Processing event <UI_AUTH_EVENT>
    Oct 23 00:01:11 eventd_event_process
    Oct 23 00:01:11 eventd_get_event_policies
    Oct 23 00:01:11 No policies for event <UI_AUTH_EVENT>
    Oct 23 00:01:11 event_syslog_process
    Oct 23 00:01:11 eventd_notify_daemons
    Oct 23 00:01:11 eventd_event_clear_ref
    Oct 23 00:01:11 eventd_message_read
    Oct 23 00:01:11 eventd_event_create
    Oct 23 00:01:11 eventd_event_preprocess
    Oct 23 00:01:11 event_syslog_preprocess
    Oct 23 00:01:11 Number of events in the queue for processing 1
    Oct 23 00:01:11 eventd_message_read
    Oct 23 00:01:11 eventd_event_process_queue
    Oct 23 00:01:11 Processing event <UI_LOGIN_EVENT>
    Oct 23 00:01:11 eventd_event_process
    Oct 23 00:01:11 eventd_event_clear_ref
    Oct 23 00:01:11 eventd_get_event_policies
    Oct 23 00:01:11 No policies for event <UI_LOGIN_EVENT>
    Oct 23 00:01:11 event_syslog_process
    Oct 23 00:01:11 eventd_notify_daemons
    Oct 23 00:01:11 eventd_event_clear_ref
    Oct 23 00:01:11 eventd_message_read
    Oct 23 00:01:11 eventd_event_create
    Oct 23 00:01:11 eventd_event_preprocess
    Oct 23 00:01:11 event_syslog_preprocess
    Oct 23 00:01:11 Number of events in the queue for processing 1
    Oct 23 00:01:11 eventd_message_read
    Oct 23 00:01:11 eventd_event_process_queue
    Oct 23 00:01:11 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:01:11 eventd_event_process
    Oct 23 00:01:11 eventd_get_event_policies
    Oct 23 00:01:11 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:01:11 event_syslog_process
    Oct 23 00:01:11 eventd_notify_daemons
    Oct 23 00:01:11 eventd_event_clear_ref
    Oct 23 00:01:11 eventd_message_read
    Oct 23 00:01:12 eventd_event_create
    Oct 23 00:01:12 eventd_event_preprocess
    Oct 23 00:01:12 event_syslog_preprocess
    Oct 23 00:01:12 Number of events in the queue for processing 1
    Oct 23 00:01:12 eventd_message_read
    Oct 23 00:01:12 eventd_event_process_queue
    Oct 23 00:01:12 SIGCHLD received
    Oct 23 00:01:12 SIGCHLD received pid <5892>
    Oct 23 00:01:12 CHLD pid <5892> terminated successfully
    Oct 23 00:01:12 in eventd_policy_action_finished for pid 5892
    Oct 23 00:01:12 eventd_policy_action_next
    Oct 23 00:01:12 eventd_policy_action_next
    Oct 23 00:01:12 eventd_policy_action_next
    Oct 23 00:01:12 removing active policy with name <DC-test-completed>
    Oct 23 00:01:12 eventd_event_clear_ref
    Oct 23 00:01:12 eventd_free_event_policy
    Oct 23 00:01:12 SIGCHLD received pid <-1>
    Oct 23 00:02:12 eventd_message_read
    Oct 23 00:02:12 eventd_event_create
    Oct 23 00:02:12 eventd_event_preprocess
    Oct 23 00:02:12 event_syslog_preprocess
    Oct 23 00:02:12 Number of events in the queue for processing 2
    Oct 23 00:02:12 eventd_message_read
    Oct 23 00:02:12 eventd_event_process_queue
    Oct 23 00:02:12 Processing event <UI_LOGOUT_EVENT>
    Oct 23 00:02:12 eventd_event_process
    Oct 23 00:02:12 eventd_event_clear_ref
    Oct 23 00:02:12 eventd_get_event_policies
    Oct 23 00:02:12 No policies for event <UI_LOGOUT_EVENT>
    Oct 23 00:02:12 event_syslog_process
    Oct 23 00:02:12 eventd_notify_daemons
    Oct 23 00:02:12 eventd_event_clear_ref
    Oct 23 00:02:12 Processing event <PING_TEST_COMPLETED>
    Oct 23 00:02:12 eventd_event_process
    Oct 23 00:02:12 eventd_get_event_policies
    Oct 23 00:02:12 event_get_attr_val
    Oct 23 00:02:12 event_get_attr_val
    Oct 23 00:02:12 policy <DC-test-completed> should now be executed
    Oct 23 00:02:12 Executing policy: <DC-test-completed>
    Oct 23 00:02:12 eventd_policy_action_next
    Oct 23 00:02:12 eventd_policy_action_next
    Oct 23 00:02:12 eventd_policy_action_next
    Oct 23 00:02:12 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_IK3Eht' as the temporary command file, and '/tmp/evt_op_qEVuqA' as the temporary output file
    Oct 23 00:02:12 eventd_substitute_variable_cmd
    Oct 23 00:02:12 eventd_substitute_variable_cmd
    Oct 23 00:02:12 eventd_event_script_input
    Oct 23 00:02:12 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 23 00:02:12 eventd_cache_event
    Oct 23 00:02:12 before deleting cached events, num events cached <500>
    Oct 23 00:02:12 eventd_event_clear_ref
    Oct 23 00:02:12 after deleting cached events, num events cached <499>
    Oct 23 00:02:12 event_syslog_process
    Oct 23 00:02:12 eventd_notify_daemons
    Oct 23 00:02:12 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_IK3Eht /tmp/evt_op_qEVuqA XML>
    Oct 23 00:02:13 eventd_message_read
    Oct 23 00:02:13 eventd_event_create
    Oct 23 00:02:13 eventd_event_preprocess
    Oct 23 00:02:13 event_syslog_preprocess
    Oct 23 00:02:13 Number of events in the queue for processing 1
    Oct 23 00:02:13 eventd_message_read
    Oct 23 00:02:13 eventd_event_process_queue
    Oct 23 00:02:13 Processing event <UI_CMDLINE_READ_LINE>
    Oct 23 00:02:13 eventd_event_process
    Oct 23 00:02:13 eventd_event_clear_ref
    Oct 23 00:02:13 eventd_get_event_policies
    Oct 23 00:02:13 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 23 00:02:13 event_syslog_process
    Oct 23 00:02:13 eventd_notify_daemons
    Oct 23 00:02:13 eventd_event_clear_ref
    Oct 23 00:02:14 eventd_message_read
    Oct 23 00:02:14 eventd_event_create
    Oct 23 00:02:14 eventd_event_preprocess
    Oct 23 00:02:14 event_syslog_preprocess
    Oct 23 00:02:14 Number of events in the queue for processing 1
    Oct 23 00:02:14 eventd_message_read
    Oct 23 00:02:14 eventd_event_process_queue
    Oct 23 00:02:14 Processing event <UI_AUTH_EVENT>
    Oct 23 00:02:14 eventd_event_process
    Oct 23 00:02:14 eventd_get_event_policies
    Oct 23 00:02:14 No policies for event <UI_AUTH_EVENT>
    Oct 23 00:02:14 event_syslog_process
    Oct 23 00:02:14 eventd_notify_daemons
    Oct 23 00:02:14 eventd_event_clear_ref
    Oct 23 00:02:14 eventd_message_read
    Oct 23 00:02:14 eventd_event_create
    Oct 23 00:02:14 eventd_event_preprocess
    Oct 23 00:02:14 event_syslog_preprocess
    Oct 23 00:02:14 Number of events in the queue for processing 1
    Oct 23 00:02:14 eventd_message_read
    Oct 23 00:02:14 eventd_event_process_queue
    Oct 23 00:02:14 Processing event <UI_LOGIN_EVENT>
    Oct 23 00:02:14 eventd_event_process
    Oct 23 00:02:14 eventd_event_clear_ref
    Oct 23 00:02:14 eventd_get_event_policies
    Oct 23 00:02:14 No policies for event <UI_LOGIN_EVENT>
    Oct 23 00:02:14 event_syslog_process
    Oct 23 00:02:14 eventd_notify_daemons
    Oct 23 00:02:14 eventd_event_clear_ref
    Oct 23 00:02:14 eventd_message_read
    Oct 23 00:02:14 eventd_event_create
    Oct 23 00:02:14 eventd_event_preprocess
    Oct 23 00:02:14 event_syslog_preprocess
    Oct 23 00:02:14 Number of events in the queue for processing 1
    Oct 23 00:02:14 eventd_message_read
    Oct 23 00:02:14 eventd_event_process_queue
    Oct 23 00:02:14 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:02:14 eventd_event_process
    Oct 23 00:02:14 eventd_get_event_policies
    Oct 23 00:02:14 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:02:14 event_syslog_process
    Oct 23 00:02:14 eventd_notify_daemons
    Oct 23 00:02:14 eventd_event_clear_ref
    Oct 23 00:02:14 eventd_message_read
    Oct 23 00:02:15 eventd_event_create
    Oct 23 00:02:15 eventd_event_preprocess
    Oct 23 00:02:15 event_syslog_preprocess
    Oct 23 00:02:15 Number of events in the queue for processing 1
    Oct 23 00:02:15 eventd_message_read
    Oct 23 00:02:15 eventd_event_process_queue
    Oct 23 00:02:15 Processing event <UI_LOGOUT_EVENT>
    Oct 23 00:02:15 eventd_event_process
    Oct 23 00:02:15 eventd_event_clear_ref
    Oct 23 00:02:15 eventd_get_event_policies
    Oct 23 00:02:15 No policies for event <UI_LOGOUT_EVENT>
    Oct 23 00:02:15 event_syslog_process
    Oct 23 00:02:15 eventd_notify_daemons
    Oct 23 00:02:15 eventd_event_clear_ref
    Oct 23 00:02:15 SIGCHLD received
    Oct 23 00:02:15 SIGCHLD received pid <5894>
    Oct 23 00:02:15 CHLD pid <5894> terminated successfully
    Oct 23 00:02:15 in eventd_policy_action_finished for pid 5894
    Oct 23 00:02:15 eventd_policy_action_next
    Oct 23 00:02:15 eventd_policy_action_next
    Oct 23 00:02:15 eventd_policy_action_next
    Oct 23 00:02:15 removing active policy with name <DC-test-completed>
    Oct 23 00:02:15 eventd_event_clear_ref
    Oct 23 00:02:15 eventd_free_event_policy
    Oct 23 00:02:15 SIGCHLD received pid <-1>
    Oct 23 00:03:15 eventd_message_read
    Oct 23 00:03:15 eventd_event_create
    Oct 23 00:03:15 eventd_event_preprocess
    Oct 23 00:03:15 event_syslog_preprocess
    Oct 23 00:03:15 Number of events in the queue for processing 1
    Oct 23 00:03:15 eventd_message_read
    Oct 23 00:03:15 eventd_event_process_queue
    Oct 23 00:03:15 Processing event <PING_TEST_COMPLETED>
    Oct 23 00:03:15 eventd_event_process
    Oct 23 00:03:15 eventd_get_event_policies
    Oct 23 00:03:15 event_get_attr_val
    Oct 23 00:03:15 event_get_attr_val
    Oct 23 00:03:15 policy <DC-test-completed> should now be executed
    Oct 23 00:03:15 Executing policy: <DC-test-completed>
    Oct 23 00:03:15 eventd_policy_action_next
    Oct 23 00:03:15 eventd_policy_action_next
    Oct 23 00:03:15 eventd_policy_action_next
    Oct 23 00:03:15 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_wnVFqK' as the temporary command file, and '/tmp/evt_op_1MUbqz' as the temporary output file
    Oct 23 00:03:15 eventd_substitute_variable_cmd
    Oct 23 00:03:15 eventd_substitute_variable_cmd
    Oct 23 00:03:15 eventd_event_script_input
    Oct 23 00:03:15 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 23 00:03:15 eventd_cache_event
    Oct 23 00:03:15 before deleting cached events, num events cached <500>
    Oct 23 00:03:15 eventd_event_clear_ref
    Oct 23 00:03:15 after deleting cached events, num events cached <499>
    Oct 23 00:03:15 event_syslog_process
    Oct 23 00:03:15 eventd_notify_daemons
    Oct 23 00:03:15 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_wnVFqK /tmp/evt_op_1MUbqz XML>
    Oct 23 00:03:17 eventd_message_read
    Oct 23 00:03:17 eventd_event_create
    Oct 23 00:03:17 eventd_event_preprocess
    Oct 23 00:03:17 event_syslog_preprocess
    Oct 23 00:03:17 Number of events in the queue for processing 1
    Oct 23 00:03:17 eventd_message_read
    Oct 23 00:03:17 eventd_event_process_queue
    Oct 23 00:03:17 Processing event <UI_AUTH_EVENT>
    Oct 23 00:03:17 eventd_event_process
    Oct 23 00:03:17 eventd_get_event_policies
    Oct 23 00:03:17 No policies for event <UI_AUTH_EVENT>
    Oct 23 00:03:17 event_syslog_process
    Oct 23 00:03:17 eventd_notify_daemons
    Oct 23 00:03:17 eventd_event_clear_ref
    Oct 23 00:03:17 eventd_message_read
    Oct 23 00:03:17 eventd_event_create
    Oct 23 00:03:17 eventd_event_preprocess
    Oct 23 00:03:17 event_syslog_preprocess
    Oct 23 00:03:17 Number of events in the queue for processing 1
    Oct 23 00:03:17 eventd_message_read
    Oct 23 00:03:17 eventd_event_process_queue
    Oct 23 00:03:17 Processing event <UI_LOGIN_EVENT>
    Oct 23 00:03:17 eventd_event_process
    Oct 23 00:03:17 eventd_event_clear_ref
    Oct 23 00:03:17 eventd_get_event_policies
    Oct 23 00:03:17 No policies for event <UI_LOGIN_EVENT>
    Oct 23 00:03:17 event_syslog_process
    Oct 23 00:03:17 eventd_notify_daemons
    Oct 23 00:03:17 eventd_event_clear_ref
    Oct 23 00:03:17 eventd_message_read
    Oct 23 00:03:17 eventd_event_create
    Oct 23 00:03:17 eventd_event_preprocess
    Oct 23 00:03:17 event_syslog_preprocess
    Oct 23 00:03:17 Number of events in the queue for processing 1
    Oct 23 00:03:17 eventd_message_read
    Oct 23 00:03:17 eventd_event_process_queue
    Oct 23 00:03:17 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:03:17 eventd_event_process
    Oct 23 00:03:17 eventd_get_event_policies
    Oct 23 00:03:17 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:03:17 event_syslog_process
    Oct 23 00:03:17 eventd_notify_daemons
    Oct 23 00:03:17 eventd_event_clear_ref
    Oct 23 00:03:17 eventd_message_read
    Oct 23 00:03:18 eventd_event_create
    Oct 23 00:03:18 eventd_event_preprocess
    Oct 23 00:03:18 event_syslog_preprocess
    Oct 23 00:03:18 Number of events in the queue for processing 1
    Oct 23 00:03:18 eventd_message_read
    Oct 23 00:03:18 eventd_event_process_queue
    Oct 23 00:03:18 SIGCHLD received
    Oct 23 00:03:18 SIGCHLD received pid <5898>
    Oct 23 00:03:18 CHLD pid <5898> terminated successfully
    Oct 23 00:03:18 in eventd_policy_action_finished for pid 5898
    Oct 23 00:03:18 eventd_policy_action_next
    Oct 23 00:03:18 eventd_policy_action_next
    Oct 23 00:03:18 eventd_policy_action_next
    Oct 23 00:03:18 removing active policy with name <DC-test-completed>
    Oct 23 00:03:18 eventd_event_clear_ref
    Oct 23 00:03:18 eventd_free_event_policy
    Oct 23 00:03:18 SIGCHLD received pid <-1>
    Oct 23 00:04:02 eventd_message_read
    Oct 23 00:04:02 eventd_event_create
    Oct 23 00:04:02 eventd_event_preprocess
    Oct 23 00:04:02 event_syslog_preprocess
    Oct 23 00:04:02 Number of events in the queue for processing 2
    Oct 23 00:04:02 eventd_message_read
    Oct 23 00:04:02 eventd_event_create
    Oct 23 00:04:02 eventd_event_preprocess
    Oct 23 00:04:02 event_syslog_preprocess
    Oct 23 00:04:02 Number of events in the queue for processing 3
    Oct 23 00:04:02 eventd_message_read
    Oct 23 00:04:02 eventd_event_process_queue
    Oct 23 00:04:02 Processing event <UI_LOGOUT_EVENT>
    Oct 23 00:04:02 eventd_event_process
    Oct 23 00:04:02 eventd_event_clear_ref
    Oct 23 00:04:02 eventd_get_event_policies
    Oct 23 00:04:02 No policies for event <UI_LOGOUT_EVENT>
    Oct 23 00:04:02 event_syslog_process
    Oct 23 00:04:02 eventd_notify_daemons
    Oct 23 00:04:02 eventd_event_clear_ref
    Oct 23 00:04:02 Processing event <UI_CMDLINE_READ_LINE>
    Oct 23 00:04:02 eventd_event_process
    Oct 23 00:04:02 eventd_event_clear_ref
    Oct 23 00:04:02 eventd_get_event_policies
    Oct 23 00:04:02 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 23 00:04:02 event_syslog_process
    Oct 23 00:04:02 eventd_notify_daemons
    Oct 23 00:04:02 eventd_event_clear_ref
    Oct 23 00:04:02 Processing event <UI_DBASE_LOGIN_EVENT>
    Oct 23 00:04:02 eventd_event_process
    Oct 23 00:04:02 eventd_get_event_policies
    Oct 23 00:04:02 No policies for event <UI_DBASE_LOGIN_EVENT>
    Oct 23 00:04:02 event_syslog_process
    Oct 23 00:04:02 eventd_notify_daemons
    Oct 23 00:04:02 eventd_event_clear_ref
    Oct 23 00:04:10 eventd_message_read
    Oct 23 00:04:10 eventd_event_create
    Oct 23 00:04:10 eventd_event_preprocess
    Oct 23 00:04:10 event_syslog_preprocess
    Oct 23 00:04:10 Number of events in the queue for processing 1
    Oct 23 00:04:10 eventd_message_read
    Oct 23 00:04:10 eventd_event_process_queue
    Oct 23 00:04:10 Processing event <UI_CMDLINE_READ_LINE>
    Oct 23 00:04:10 eventd_event_process
    Oct 23 00:04:10 eventd_event_clear_ref
    Oct 23 00:04:10 eventd_get_event_policies
    Oct 23 00:04:10 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 23 00:04:10 event_syslog_process
    Oct 23 00:04:10 eventd_notify_daemons
    Oct 23 00:04:10 eventd_event_clear_ref
    Oct 23 00:04:18 eventd_message_read
    Oct 23 00:04:18 eventd_event_create
    Oct 23 00:04:18 eventd_event_preprocess
    Oct 23 00:04:18 event_syslog_preprocess
    Oct 23 00:04:18 Number of events in the queue for processing 1
    Oct 23 00:04:18 eventd_message_read
    Oct 23 00:04:18 eventd_event_process_queue
    Oct 23 00:04:18 Processing event <PING_TEST_COMPLETED>
    Oct 23 00:04:18 eventd_event_process
    Oct 23 00:04:18 eventd_get_event_policies
    Oct 23 00:04:18 event_get_attr_val
    Oct 23 00:04:18 event_get_attr_val
    Oct 23 00:04:18 policy <DC-test-completed> should now be executed
    Oct 23 00:04:18 Executing policy: <DC-test-completed>
    Oct 23 00:04:18 eventd_policy_action_next
    Oct 23 00:04:18 eventd_policy_action_next
    Oct 23 00:04:18 eventd_policy_action_next
    Oct 23 00:04:18 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_NiAU3n' as the temporary command file, and '/tmp/evt_op_jNVTny' as the temporary output file
    Oct 23 00:04:18 eventd_substitute_variable_cmd
    Oct 23 00:04:18 eventd_substitute_variable_cmd
    Oct 23 00:04:18 eventd_event_script_input
    Oct 23 00:04:18 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 23 00:04:18 eventd_cache_event
    Oct 23 00:04:18 before deleting cached events, num events cached <500>
    Oct 23 00:04:18 eventd_event_clear_ref
    Oct 23 00:04:18 after deleting cached events, num events cached <499>
    Oct 23 00:04:18 event_syslog_process
    Oct 23 00:04:18 eventd_notify_daemons
    Oct 23 00:04:18 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_NiAU3n /tmp/evt_op_jNVTny XML>
    Oct 23 00:04:20 eventd_message_read
    Oct 23 00:04:20 eventd_event_create
    Oct 23 00:04:20 eventd_event_preprocess
    Oct 23 00:04:20 event_syslog_preprocess
    Oct 23 00:04:20 Number of events in the queue for processing 1
    Oct 23 00:04:20 eventd_message_read
    Oct 23 00:04:20 eventd_event_process_queue
    Oct 23 00:04:20 Processing event <UI_AUTH_EVENT>
    Oct 23 00:04:20 eventd_event_process
    Oct 23 00:04:20 eventd_get_event_policies
    Oct 23 00:04:20 No policies for event <UI_AUTH_EVENT>
    Oct 23 00:04:20 event_syslog_process
    Oct 23 00:04:20 eventd_notify_daemons
    Oct 23 00:04:20 eventd_event_clear_ref
    Oct 23 00:04:20 eventd_message_read
    Oct 23 00:04:20 eventd_event_create
    Oct 23 00:04:20 eventd_event_preprocess
    Oct 23 00:04:20 event_syslog_preprocess
    Oct 23 00:04:20 Number of events in the queue for processing 1
    Oct 23 00:04:20 eventd_message_read
    Oct 23 00:04:20 eventd_event_process_queue
    Oct 23 00:04:20 Processing event <UI_LOGIN_EVENT>
    Oct 23 00:04:20 eventd_event_process
    Oct 23 00:04:20 eventd_event_clear_ref
    Oct 23 00:04:20 eventd_get_event_policies
    Oct 23 00:04:20 No policies for event <UI_LOGIN_EVENT>
    Oct 23 00:04:20 event_syslog_process
    Oct 23 00:04:20 eventd_notify_daemons
    Oct 23 00:04:20 eventd_event_clear_ref
    Oct 23 00:04:20 eventd_message_read
    Oct 23 00:04:20 eventd_event_create
    Oct 23 00:04:20 eventd_event_preprocess
    Oct 23 00:04:20 event_syslog_preprocess
    Oct 23 00:04:20 Number of events in the queue for processing 1
    Oct 23 00:04:20 eventd_message_read
    Oct 23 00:04:20 eventd_event_process_queue
    Oct 23 00:04:20 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:04:20 eventd_event_process
    Oct 23 00:04:20 eventd_get_event_policies
    Oct 23 00:04:20 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:04:20 event_syslog_process
    Oct 23 00:04:20 eventd_notify_daemons
    Oct 23 00:04:20 eventd_event_clear_ref
    Oct 23 00:04:21 eventd_message_read
    Oct 23 00:04:21 eventd_event_create
    Oct 23 00:04:21 eventd_event_preprocess
    Oct 23 00:04:21 event_syslog_preprocess
    Oct 23 00:04:21 Number of events in the queue for processing 1
    Oct 23 00:04:21 eventd_message_read
    Oct 23 00:04:21 eventd_event_process_queue
    Oct 23 00:04:21 SIGCHLD received
    Oct 23 00:04:21 SIGCHLD received pid <5900>
    Oct 23 00:04:21 CHLD pid <5900> terminated successfully
    Oct 23 00:04:21 in eventd_policy_action_finished for pid 5900
    Oct 23 00:04:21 eventd_policy_action_next
    Oct 23 00:04:21 eventd_policy_action_next
    Oct 23 00:04:21 eventd_policy_action_next
    Oct 23 00:04:21 removing active policy with name <DC-test-completed>
    Oct 23 00:04:21 eventd_event_clear_ref
    Oct 23 00:04:21 eventd_free_event_policy
    Oct 23 00:04:21 SIGCHLD received pid <-1>
    Oct 23 00:05:00 eventd_check_file_transfer
    Oct 23 00:05:00 eventd_event_preprocess
    Oct 23 00:05:00 event_syslog_preprocess
    Oct 23 00:05:00 Number of events in the queue for processing 2
    Oct 23 00:05:00 eventd_event_process_queue
    Oct 23 00:05:00 Processing event <UI_LOGOUT_EVENT>
    Oct 23 00:05:00 eventd_event_process
    Oct 23 00:05:00 eventd_event_clear_ref
    Oct 23 00:05:00 eventd_get_event_policies
    Oct 23 00:05:00 No policies for event <UI_LOGOUT_EVENT>
    Oct 23 00:05:00 event_syslog_process
    Oct 23 00:05:00 eventd_notify_daemons
    Oct 23 00:05:00 eventd_event_clear_ref
    Oct 23 00:05:00 Processing event <SYSTEM>
    Oct 23 00:05:00 eventd_event_process
    Oct 23 00:05:00 eventd_get_event_policies
    Oct 23 00:05:00 No policies for event <SYSTEM>
    Oct 23 00:05:00 event_syslog_process
    Oct 23 00:05:00 eventd_notify_daemons
    Oct 23 00:05:00 eventd_event_clear_ref
    Oct 23 00:05:21 eventd_message_read
    Oct 23 00:05:21 eventd_event_create
    Oct 23 00:05:21 eventd_event_preprocess
    Oct 23 00:05:21 event_syslog_preprocess
    Oct 23 00:05:21 Number of events in the queue for processing 1
    Oct 23 00:05:21 eventd_message_read
    Oct 23 00:05:21 eventd_event_process_queue
    Oct 23 00:05:21 Processing event <PING_TEST_COMPLETED>
    Oct 23 00:05:21 eventd_event_process
    Oct 23 00:05:21 eventd_get_event_policies
    Oct 23 00:05:21 event_get_attr_val
    Oct 23 00:05:21 event_get_attr_val
    Oct 23 00:05:21 policy <DC-test-completed> should now be executed
    Oct 23 00:05:21 Executing policy: <DC-test-completed>
    Oct 23 00:05:21 eventd_policy_action_next
    Oct 23 00:05:21 eventd_policy_action_next
    Oct 23 00:05:21 eventd_policy_action_next
    Oct 23 00:05:21 executing event script 'watch-default-route.slax' for policy 'DC-test-completed' triggered on receipt of event 'PING_TEST_COMPLETED', with '/tmp/evt_cmd_UdjRLP' as the temporary command file, and '/tmp/evt_op_2NBJ93' as the temporary output file
    Oct 23 00:05:21 eventd_substitute_variable_cmd
    Oct 23 00:05:21 eventd_substitute_variable_cmd
    Oct 23 00:05:21 eventd_event_script_input
    Oct 23 00:05:21 EVENTD_ESCRIPT_EXECUTION: Trying to execute the script 'watch-default-route.slax' from '/var/db/scripts/event/'
    Oct 23 00:05:21 Executing commands </usr/libexec/invoke-commands /tmp/evt_cmd_UdjRLP /tmp/evt_op_2NBJ93 XML>
    Oct 23 00:05:21 eventd_cache_event
    Oct 23 00:05:21 before deleting cached events, num events cached <500>
    Oct 23 00:05:21 eventd_event_clear_ref
    Oct 23 00:05:21 after deleting cached events, num events cached <499>
    Oct 23 00:05:21 event_syslog_process
    Oct 23 00:05:21 eventd_notify_daemons
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_create
    Oct 23 00:05:24 eventd_event_preprocess
    Oct 23 00:05:24 event_syslog_preprocess
    Oct 23 00:05:24 Number of events in the queue for processing 1
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_process_queue
    Oct 23 00:05:24 Processing event <UI_AUTH_EVENT>
    Oct 23 00:05:24 eventd_event_process
    Oct 23 00:05:24 eventd_get_event_policies
    Oct 23 00:05:24 No policies for event <UI_AUTH_EVENT>
    Oct 23 00:05:24 event_syslog_process
    Oct 23 00:05:24 eventd_notify_daemons
    Oct 23 00:05:24 eventd_event_clear_ref
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_create
    Oct 23 00:05:24 eventd_event_preprocess
    Oct 23 00:05:24 event_syslog_preprocess
    Oct 23 00:05:24 Number of events in the queue for processing 1
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_process_queue
    Oct 23 00:05:24 Processing event <UI_LOGIN_EVENT>
    Oct 23 00:05:24 eventd_event_process
    Oct 23 00:05:24 eventd_event_clear_ref
    Oct 23 00:05:24 eventd_get_event_policies
    Oct 23 00:05:24 No policies for event <UI_LOGIN_EVENT>
    Oct 23 00:05:24 event_syslog_process
    Oct 23 00:05:24 eventd_notify_daemons
    Oct 23 00:05:24 eventd_event_clear_ref
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_create
    Oct 23 00:05:24 eventd_event_preprocess
    Oct 23 00:05:24 event_syslog_preprocess
    Oct 23 00:05:24 Number of events in the queue for processing 1
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_process_queue
    Oct 23 00:05:24 Processing event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:05:24 eventd_event_process
    Oct 23 00:05:24 eventd_get_event_policies
    Oct 23 00:05:24 No policies for event <UI_JUNOSCRIPT_CMD>
    Oct 23 00:05:24 event_syslog_process
    Oct 23 00:05:24 eventd_notify_daemons
    Oct 23 00:05:24 eventd_event_clear_ref
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_create
    Oct 23 00:05:24 eventd_event_preprocess
    Oct 23 00:05:24 event_syslog_preprocess
    Oct 23 00:05:24 Number of events in the queue for processing 1
    Oct 23 00:05:24 eventd_message_read
    Oct 23 00:05:24 eventd_event_process_queue
    Oct 23 00:05:24 SIGCHLD received
    Oct 23 00:05:24 SIGCHLD received pid <5905>
    Oct 23 00:05:24 CHLD pid <5905> terminated successfully
    Oct 23 00:05:24 in eventd_policy_action_finished for pid 5905
    Oct 23 00:05:24 eventd_policy_action_next
    Oct 23 00:05:24 eventd_policy_action_next
    Oct 23 00:05:24 eventd_policy_action_next
    Oct 23 00:05:24 removing active policy with name <DC-test-completed>
    Oct 23 00:05:24 eventd_event_clear_ref
    Oct 23 00:05:24 eventd_free_event_policy
    Oct 23 00:05:24 SIGCHLD received pid <-1>
    Oct 23 00:05:44 eventd_message_read
    Oct 23 00:05:44 eventd_event_create
    Oct 23 00:05:44 eventd_event_preprocess
    Oct 23 00:05:44 event_syslog_preprocess
    Oct 23 00:05:44 Number of events in the queue for processing 2
    Oct 23 00:05:44 eventd_message_read
    Oct 23 00:05:44 eventd_event_create
    Oct 23 00:05:44 eventd_event_preprocess
    Oct 23 00:05:44 event_syslog_preprocess
    Oct 23 00:05:44 Number of events in the queue for processing 3
    Oct 23 00:05:44 eventd_message_read
    Oct 23 00:05:44 eventd_event_process_queue
    Oct 23 00:05:44 Processing event <UI_LOGOUT_EVENT>
    Oct 23 00:05:44 eventd_event_process
    Oct 23 00:05:44 eventd_event_clear_ref
    Oct 23 00:05:44 eventd_get_event_policies
    Oct 23 00:05:44 No policies for event <UI_LOGOUT_EVENT>
    Oct 23 00:05:44 event_syslog_process
    Oct 23 00:05:44 eventd_notify_daemons
    Oct 23 00:05:44 eventd_event_clear_ref
    Oct 23 00:05:44 Processing event <UI_CMDLINE_READ_LINE>
    Oct 23 00:05:44 eventd_event_process
    Oct 23 00:05:44 eventd_event_clear_ref
    Oct 23 00:05:44 eventd_get_event_policies
    Oct 23 00:05:44 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 23 00:05:44 event_syslog_process
    Oct 23 00:05:44 eventd_notify_daemons
    Oct 23 00:05:44 eventd_event_clear_ref
    Oct 23 00:05:44 Processing event <UI_DBASE_LOGOUT_EVENT>
    Oct 23 00:05:44 eventd_event_process
    Oct 23 00:05:44 eventd_get_event_policies
    Oct 23 00:05:44 No policies for event <UI_DBASE_LOGOUT_EVENT>
    Oct 23 00:05:44 event_syslog_process
    Oct 23 00:05:44 eventd_notify_daemons
    Oct 23 00:05:44 eventd_event_clear_ref
    Oct 23 00:05:50 eventd_message_read
    Oct 23 00:05:50 eventd_event_create
    Oct 23 00:05:50 eventd_event_preprocess
    Oct 23 00:05:50 event_syslog_preprocess
    Oct 23 00:05:50 Number of events in the queue for processing 1
    Oct 23 00:05:50 eventd_message_read
    Oct 23 00:05:50 eventd_event_process_queue
    Oct 23 00:05:50 Processing event <UI_CMDLINE_READ_LINE>
    Oct 23 00:05:50 eventd_event_process
    Oct 23 00:05:50 eventd_event_clear_ref
    Oct 23 00:05:50 eventd_get_event_policies
    Oct 23 00:05:50 No policies for event <UI_CMDLINE_READ_LINE>
    Oct 23 00:05:50 event_syslog_process
    Oct 23 00:05:50 eventd_notify_daemons
    Oct 23 00:05:50 eventd_event_clear_ref
    

     So again, I started this with everything working then removing access to the modem.....



  • 14.  RE: Primary nexthop script failure

    Posted 10-22-2013 13:56

    I've been thinking about this...  my target address under rpm is 8.8.8.8.  This is pingable from both ge-0/0/0 & ge-0/0/1.  Wouldn't that mean that once the probe is successful in pinging when the alt next hop is established, it will roll back over to the primary causing a loop?  ccall, maybe that's what you were referring to.  It still doesn't explain it not rolling over but it si someithing I was thinking about.  Or maybe I'm understanding that wrong.



  • 15.  RE: Primary nexthop script failure

    Posted 10-22-2013 14:15

    From the logs I can see that the script is executing now. Are you saying that the configuration is not changing in response to test failures/success?

     

    Either way, you are correct that the target address needs to be reachable ONLY over the primary, otherwise the script logic will not function correctly. The next-hop interface address of the primary circuit is commonly used.



  • 16.  RE: Primary nexthop script failure

    Posted 10-22-2013 14:33

    Correct.  It does show the script is executing but it never executes the ping_test_failed portion of the event-options when unplugged.... all you see is ping_test_completed....  😞

     

    In other words it never deactivates the primary next hop.

     

    Now, this script, rpm & event-options, the way they're configured now, may be pointless.  The whole point is to failover to ge-0/0/1 when network access from ge-0/0/0 is not availabe & then go back to ge-0/0/0 when network access is restored.  I need to do this by having it ping an outside source from ge-0/0/0 in which that same outside source is pingable from ge-0/0/1 as well.  Even if I ping the next hop (which would be the modem or adtran), it may still be pingable but outside network access may not be there.  Sounds like I need a more complicated setup in regards to the script, rpm & event-options.  Can any of you help with that?

     



  • 17.  RE: Primary nexthop script failure

    Posted 10-22-2013 16:43

    Do you ever see a PING_TEST_FAILED event occurring at all? If the address is always reachable one way or another, then the test will never fail. Alternatively, I'm wondering if you need to specify some failure conditions for your RPM test. I don't remember what the defaults are, but typically I've seen more options configured than just the target address and test interval, for example:

     

                    probe-count 3;
                    probe-interval 30;
                    test-interval 100;
                    thresholds {
                        successive-loss 3;
                        total-loss 3;
                    }

    Try adding a probe-count and loss threshold and verify that your target address actually goes away when the primary goes down.



  • 18.  RE: Primary nexthop script failure

    Posted 10-23-2013 05:48

    Yeah, no ping_test_failed in the logs.  I know that the target is going away because when I "run show services rpm probe-results" it shows 100% loss.  To me that means we need to adjust the event-options parameters to use the results of the rpm since it seems it's not doing that now.

     

    I'm adjusting the config under rpm to implement your suggestion.  Lets see what happens.



  • 19.  RE: Primary nexthop script failure

    Posted 10-23-2013 06:28

    Good news.  With the adjustments to the rpm that was suggested, the script is now functioning as intended.

     

    Bad new.  It's doing what we thought it was going to do which is establish outside connection with the secondary hop & which makes the probe test succeed & then reverts back.  So it's looping.

     

    So here's the question...  Can we specify in the rpm to have it probe using the a specific interface & hop?  I would think that we would have to adjust the script to stop it from disabling the primary hop & just swap the primary & secondary.  I'd do that myself but again I'm still new at this.  I'll post the current config & slax as well:

     

    version 11.4R7.5;
    system {
        host-name TEST;
        time-zone America/New_York;
        root-authentication {
            encrypted-password "SECRET"; ## SECRET-DATA
        }
        name-server {
            8.8.8.8;
            8.8.4.4;
        }
        services {
            ssh {
                protocol-version v2;
            }
            telnet;
            web-management {
                https {
                    system-generated-certificate;
                }
            }
            dhcp {
                pool 10.1.130.0/24 {
                    address-range low 10.1.130.30 high 10.1.130.90;
                    name-server {
                        8.8.8.8;
                        8.8.4.4;
                    }
                    router {
                        10.1.130.1;
                    }
                }
            }
        }
        syslog {
            archive size 100k files 3;
            host 10.2.2.55 {
                any any;
                change-log none;
                interactive-commands none;
            }
            file messages {
                any any;
                authorization any;
            }
            file interactive-commands {
                interactive-commands error;
            }
            file policy_session {
                user info;
                match RT_FLOW;
                archive size 1000k world-readable;
                structured-data;
            }
            file default-log-messages {
                any any;
                structured-data;
            }
        }
        max-configurations-on-flash 5;
        max-configuration-rollbacks 5;
        license {
            autoupdate {
                url https://ae1.juniper.net/junos/key_retrieval;
            }
        }
    }
    interfaces {
        ge-0/0/0 {
            unit 0 {
                family inet {
                    address 111.111.111.2/24;
                }
            }
        }
        ge-0/0/1 {
            unit 0 {
                family inet {
                    address 192.168.0.2/24;
                }
            }
        }
        fe-0/0/2 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/3 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/4 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/5 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/6 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        fe-0/0/7 {
            unit 0 {
                family ethernet-switching {
                    vlan {
                        members vlan-trust;
                    }
                }
            }
        }
        vlan {
            unit 0 {
                family inet {
                    address 10.1.130.1/24;
                }
            }
        }
    }
    event-options {
        inactive: policy test-failed {
            events PING_TEST_FAILED;
            within 240 events PING_TEST_COMPLETED;
            attributes-match {
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        inactive: policy test-completed {
            events PING_TEST_COMPLETED;
            within 240 events PING_TEST_FAILED;
            attributes-match {
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        policy DC-test-failed {
            events ping_test_failed;
            attributes-match {
                ping_test_failed.test-owner matches icmp-ping-probe;
                ping_test_failed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        policy DC-test-completed {
            events ping_test_completed;
            attributes-match {
                ping_test_completed.test-owner matches icmp-ping-probe;
                ping_test_completed.test-name matches ping-probe-test;
            }
            then {
                event-script watch-default-route.slax {
                    arguments {
                        next-hop 111.111.111.1;
                    }
                }
            }
        }
        event-script {
            file watch-default-route.slax;
        }
        traceoptions {
            file TRACE_EVENT_OPTIONS size 1m;
            flag all;
        }
    }
    routing-options {
        static {
            route 0.0.0.0/0 {
                qualified-next-hop 111.111.111.1;
                qualified-next-hop 192.168.0.1 {
                    preference 200;
                }
            }
        }
    }
    protocols {
        stp;
    }
    security {
        screen {
            ids-option untrust-screen {
                icmp {
                    ping-death;
                }
                ip {
                    source-route-option;
                    tear-drop;
                }
                tcp {
                    syn-flood {
                        alarm-threshold 1024;
                        attack-threshold 200;
                        source-threshold 1024;
                        destination-threshold 2048;
                        timeout 20;
                    }
                    land;
                }
            }
        }
        nat {
            source {
                rule-set trust-to-untrust {
                    from zone trust;
                    to zone untrust;
                    rule source-nat-rule {
                        match {
                            source-address 0.0.0.0/0;
                        }
                        then {
                            source-nat {
                                interface;
                            }
                        }
                    }
                }
             }
        }
        policies {
            from-zone trust to-zone untrust {
                policy trust-to-untrust {
                    match {
                        source-address any;
                        destination-address any;
                        application any;
                    }
                    then {
                        permit;
                    }
                }
            }
        }
        zones {
            security-zone trust {
                host-inbound-traffic {
                    system-services {
                        all;
                    }
                    protocols {
                        all;
                    }
                }
                interfaces {
                    vlan.0 {
                        host-inbound-traffic {
                            system-services {
                                all;
                            }
                            protocols {
                                all;
                            }
                        }
                    }
                }
            }
            security-zone untrust {
                screen untrust-screen;
                interfaces {
                    ge-0/0/0.0 {
                        host-inbound-traffic {
                            system-services {
                                tftp;
                                all;
                            }
                        }
                    }
                    ge-0/0/1.0 {
                        host-inbound-traffic {
                            system-services {
                                tftp;
                                all;
                            }
                        }
                    }
                }
            }
        }
    }
    services {
        rpm {
            probe icmp-ping-probe {
                test ping-probe-test {
                    probe-type icmp-ping;
                    target address 8.8.8.8;
                    probe-count 3;
                    probe-interval 30;
                    test-interval 100;
                    thresholds {
                        successive-loss 3;
                        total-loss 3;
                    }
                }
            }
        }
    }
    vlans {
        vlan-trust {
            vlan-id 3;
            l3-interface vlan.0;
        }
    }
    

     Here's the slax....  unchanged of course

     

    /*
     * This event script activates/deactivates the qualified next-hop of the default
     * route based on the success or failure of a RPM test. When the test is successful 
     * the route will be activated.  When the test fails the route will be deactivated.
     *
     * The qualified next-hop must be passed as the next-hop argument.
     *
     */
    
    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";
    
    param $next-hop = "10.0.0.1";
    
    match / {
        <event-script-results> {    
            /* Learn the event type, either a PING_TEST_FAILED or PING_TEST_COMPLETED */
            var $event-type = event-script-input/trigger-event/id;
    
            /* Retrieve the current configuration for the static route */
            var $configuration-rpc = {
                <get-configuration database="committed"> {
                    <configuration> {
                        <routing-options>;
                    }
                }
            }
            var $current = jcs:invoke( $configuration-rpc );
            
            /* Grab the routing-options static node to make further location paths shorter */
            var $static = $current/routing-options/static;
    
            /* Is the route currently inactive? */
            var $inactive = $static/route[name == "0.0.0.0/0"]/qualified-next-hop[name == $next-hop]/@inactive;
            
            /* 
             * Compare the event type vs the current value of $inactive.  If they
             * do not match then a configuration change must be performed.
             */
             
            /* RPM test failed but the route is currently active */
            if( $event-type == "PING_TEST_FAILED" && jcs:empty( $inactive ) ) {
                
                /* Needed configuration change */
                var $configuration = {
                    <configuration> {
                        <routing-options> {
                            <static> {
                                <route> {
                                    <name> "0.0.0.0/0";
                                    <qualified-next-hop inactive="inactive"> {
                                        <name> $next-hop;
                                    }
                                }
                            }
                        }
                    }
                }
                
                /* Open connection, load and commit the change, and close connection  */
                var $connection = jcs:open();
                var $results := { 
                    call jcs:load-configuration( $connection, $configuration );
                    copy-of jcs:close( $connection );
                }
                
                /* If any errors occurred during the commit process then report them to the syslog */
                if( $results//xnm:error ) {
                    for-each( $results//xnm:error ) {
                        expr jcs:syslog( "external.error", "Error deactivating ", $next-hop, " next-hop: ", message );
                    }   
                }
                /* Otherwise, report success */
                else {
                    expr jcs:syslog( "external.notice", "0/0 next-hop ", $next-hop, " disabled." );
                }
            }
            /* RPM test succeeded but the route is currently inactive */
            else if( $event-type == "PING_TEST_COMPLETED" && $inactive ) {
                
                /* Needed configuration change */
                var $configuration = {
                    <configuration> {
                        <routing-options> {
                            <static> {
                                <route> {
                                    <name> "0.0.0.0/0";
                                    <qualified-next-hop active="active"> {
                                        <name> $next-hop;
                                    }
                                }
                            }
                        }
                    }
                }
                
                /* Open connection, load and commit the change, and close connection  */
                var $connection = jcs:open();
                var $results := { 
                    call jcs:load-configuration( $connection, $configuration );
                    copy-of jcs:close( $connection );
                }
                
                /* If any errors occurred during the commit process then report them to the syslog */
                if( $results//xnm:error ) {
                    for-each( $results//xnm:error ) {
                        expr jcs:syslog( "external.error", "Error activating ", $next-hop, " next-hop: ", message );
                    }   
                }
                /* Otherwise, report success */
                else {
                    expr jcs:syslog( "external.notice", "0/0 next-hop ", $next-hop, " activated." );
                }
            }
        }
    }
    
    
    

    So again the question is  ...  Can we specify in the rpm to have it probe using the a specific interface & hop?  I would think that we would have to adjust the script to stop it from disabling the primary hop & just swap the primary & secondary.  I'd do that myself but again I'm still new at this.   You guys have been a great help so far.  Hopefully we'll come up with a final solution that all can partake from.  I open it back up to you.

     



  • 20.  RE: Primary nexthop script failure

    Posted 10-23-2013 07:24

    I've never forced a probe out an interface via configuration, but it looks like there might be some options to try:

     

      next-hop             Next-hop to which probe should be sent

      ...

      routing-instance     Routing instance used by probes

    The next-hop seems to easier of the two options. If that doesn't work, then I guess you could try to create a Filter-Based Forwarding instance that directs all traffic out your primary and then specify that routing-instance for the RPM test.



  • 21.  RE: Primary nexthop script failure

    Posted 10-23-2013 07:29
    @ccall wrote:

    I've never forced a probe out an interface via configuration, but it looks like there might be some options to try:

     

      next-hop             Next-hop to which probe should be sent

      ...

      routing-instance     Routing instance used by probes

    The next-hop seems to easier of the two options. If that doesn't work, then I guess you could try to create a Filter-Based Forwarding instance that directs all traffic out your primary and then specify that routing-instance for the RPM test.


    Haha.  We were thinking along the same lines.  As I posted above I used the destination-interface & next-hop for that interface and it worked.



  • 22.  RE: Primary nexthop script failure
    Best Answer

    Posted 10-23-2013 07:47

    So, to make it easy for anyone searching, here's the complete Vanilla config & slax scipt to make a next-hop failover work for those with 2 ISP's

     

    111.111.111.1 is the gateway for the first ISP with 111.111.111.2 for the firewall's ge-0/0/0 interface

    222.222.222.1 is the gateway for the secondary ISP with 222.222.222.2 for the firewall's ge-0/0/1 interface

     

    version 11.4R7.5;
    system {
        host-name TEST
        time-zone America/New_York;
        root-authentication {
            encrypted-password "PUTYOUROWNIN";
    } name-server { 8.8.8.8; 8.8.4.4; } services { ssh { protocol-version v2; } telnet; web-management { https { system-generated-certificate; } } dhcp { pool 10.1.130.0/24 { address-range low 10.1.130.30 high 10.1.130.90; name-server { 8.8.8.8; 8.8.4.4; } router { 10.1.130.1; } } } } syslog { archive size 100k files 3; host 10.2.2.55 { any any; change-log none; interactive-commands none; } file messages { any any; authorization any; } file interactive-commands { interactive-commands error; } file policy_session { user info; match RT_FLOW; archive size 1000k world-readable; structured-data; } file default-log-messages { any any; structured-data; } } max-configurations-on-flash 5; max-configuration-rollbacks 5; license { autoupdate { url https://ae1.juniper.net/junos/key_retrieval; } } } interfaces { ge-0/0/0 { unit 0 { family inet { address 111.111.111.2/24 } } } ge-0/0/1 { unit 0 { family inet { address 222.222.222.2/24; } } } fe-0/0/2 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/3 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/4 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/5 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/6 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/7 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } vlan { unit 0 { family inet { address 10.1.130.1/24; } } } } event-options { policy test-failed { events ping_test_failed; attributes-match { ping_test_failed.test-owner matches icmp-ping-probe; ping_test_failed.test-name matches ping-probe-test; } then { event-script watch-default-route.slax { arguments { next-hop 111.111.111.1; } } } } policy test-completed { events ping_test_completed; attributes-match { ping_test_completed.test-owner matches icmp-ping-probe; ping_test_completed.test-name matches ping-probe-test; } then { event-script watch-default-route.slax { arguments { next-hop 111.111.111.1; } } } } event-script { file watch-default-route.slax; } } routing-options { static { route 0.0.0.0/0 { qualified-next-hop 111.111.111.1; qualified-next-hop 222.222.222.1 { preference 200; } } } } protocols { stp; } security { screen { ids-option untrust-screen { icmp { ping-death; } ip { source-route-option; tear-drop; } tcp { syn-flood { alarm-threshold 1024; attack-threshold 200; source-threshold 1024; destination-threshold 2048; timeout 20; } land; } } } nat { source { rule-set trust-to-untrust { from zone trust; to zone untrust; rule source-nat-rule { match { source-address 0.0.0.0/0; } then { source-nat { interface; } } } } } } policies { from-zone trust to-zone untrust { policy trust-to-untrust { match { source-address any; destination-address any; application any; } then { permit; } } } } zones { security-zone trust { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { vlan.0 { host-inbound-traffic { system-services { all; } protocols { all; } } } } } security-zone untrust { screen untrust-screen; interfaces { ge-0/0/0.0 { host-inbound-traffic { system-services { tftp; all; } } } ge-0/0/1.0 { host-inbound-traffic { system-services { tftp; all; } } } } } } } services { rpm { probe icmp-ping-probe { test ping-probe-test { probe-type icmp-ping; target address 8.8.8.8; probe-count 3; probe-interval 30; test-interval 100; thresholds { successive-loss 3; total-loss 3; } destination-interface ge-0/0/0.0; next-hop 111.111.111.1; } } } } vlans { vlan-trust { vlan-id 3; l3-interface vlan.0; } }

     

    Now the following script needs to be copied to the firewall to /var/db/scripts/event (in my case under winscp it was /cf/var/db/scripts/event).   Make sure that the file type is saved as a .slax file otherwise it will not work.  I take no credit for this script.  ccall is the one who wrote it (though he may not remember)

     

    /*
     * This event script activates/deactivates the qualified next-hop of the default
     * route based on the success or failure of a RPM test. When the test is successful 
     * the route will be activated.  When the test fails the route will be deactivated.
     *
     * The qualified next-hop must be passed as the next-hop argument.
     *
     */
    
    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";
    
    param $next-hop = "10.0.0.1";
    
    match / {
        <event-script-results> {    
            /* Learn the event type, either a PING_TEST_FAILED or PING_TEST_COMPLETED */
            var $event-type = event-script-input/trigger-event/id;
    
            /* Retrieve the current configuration for the static route */
            var $configuration-rpc = {
                <get-configuration database="committed"> {
                    <configuration> {
                        <routing-options>;
                    }
                }
            }
            var $current = jcs:invoke( $configuration-rpc );
            
            /* Grab the routing-options static node to make further location paths shorter */
            var $static = $current/routing-options/static;
    
            /* Is the route currently inactive? */
            var $inactive = $static/route[name == "0.0.0.0/0"]/qualified-next-hop[name == $next-hop]/@inactive;
            
            /* 
             * Compare the event type vs the current value of $inactive.  If they
             * do not match then a configuration change must be performed.
             */
             
            /* RPM test failed but the route is currently active */
            if( $event-type == "PING_TEST_FAILED" && jcs:empty( $inactive ) ) {
                
                /* Needed configuration change */
                var $configuration = {
                    <configuration> {
                        <routing-options> {
                            <static> {
                                <route> {
                                    <name> "0.0.0.0/0";
                                    <qualified-next-hop inactive="inactive"> {
                                        <name> $next-hop;
                                    }
                                }
                            }
                        }
                    }
                }
                
                /* Open connection, load and commit the change, and close connection  */
                var $connection = jcs:open();
                var $results := { 
                    call jcs:load-configuration( $connection, $configuration );
                    copy-of jcs:close( $connection );
                }
                
                /* If any errors occurred during the commit process then report them to the syslog */
                if( $results//xnm:error ) {
                    for-each( $results//xnm:error ) {
                        expr jcs:syslog( "external.error", "Error deactivating ", $next-hop, " next-hop: ", message );
                    }   
                }
                /* Otherwise, report success */
                else {
                    expr jcs:syslog( "external.notice", "0/0 next-hop ", $next-hop, " disabled." );
                }
            }
            /* RPM test succeeded but the route is currently inactive */
            else if( $event-type == "PING_TEST_COMPLETED" && $inactive ) {
                
                /* Needed configuration change */
                var $configuration = {
                    <configuration> {
                        <routing-options> {
                            <static> {
                                <route> {
                                    <name> "0.0.0.0/0";
                                    <qualified-next-hop active="active"> {
                                        <name> $next-hop;
                                    }
                                }
                            }
                        }
                    }
                }
                
                /* Open connection, load and commit the change, and close connection  */
                var $connection = jcs:open();
                var $results := { 
                    call jcs:load-configuration( $connection, $configuration );
                    copy-of jcs:close( $connection );
                }
                
                /* If any errors occurred during the commit process then report them to the syslog */
                if( $results//xnm:error ) {
                    for-each( $results//xnm:error ) {
                        expr jcs:syslog( "external.error", "Error activating ", $next-hop, " next-hop: ", message );
                    }   
                }
                /* Otherwise, report success */
                else {
                    expr jcs:syslog( "external.notice", "0/0 next-hop ", $next-hop, " activated." );
                }
            }
        }
    }
    

     

    This is all thanks to Mattia & ccall  Thanks to the both of you 

     

    Now on to make this work with VPN routes....  Smiley Tongue



  • 23.  RE: Primary nexthop script failure

    Posted 10-23-2013 21:53

    Thanks for the solution.

     

    I  would like to test different scenario where i have 100 static route and 100 qualified route for first 100 route. How will i achieve the same with this scipt. I have specific route only and dont want to make my MPLS single link connected to make it down as its the only link which connect to other 100 locations in the network at Central router.

     

    Appreciate if you give me some guidance here.



  • 24.  RE: Primary nexthop script failure

    Posted 10-23-2013 07:27

    Success!  Solution was to specify in the rpm the destination-interface to probe as well at the next-hop for that interface.  This way it pings with ge-0/0/0 only  to the target of 8.8.8.8.  I've tested this several times & it works like a champ.  Granted I need to adjust the intervals & thesholds in the rpm to better suit our needs but it works!...  here's the change:

     

    services {
        rpm {
            probe icmp-ping-probe {
                test ping-probe-test {
                    probe-type icmp-ping;
                    target address 8.8.8.8;
                    probe-count 3;
                    probe-interval 30;
                    test-interval 100;
                    thresholds {
                        successive-loss 3;
                        total-loss 3;
                    }
                    destination-interface ge-0/0/0.0;
                    next-hop 111.111.111.1;
                }
            }
        }
    }