Automation

 View Only
last person joined: 6 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  How to search an existing event for an event policy?

    Posted 09-11-2021 13:03
    set event-options policy jncie events ?  give a long list.

    Can I do some search to quickly find an event I need ?   Any way can I use match via a key word ?

    thanks !!


  • 2.  RE: How to search an existing event for an event policy?

     
    Posted 09-12-2021 15:25

    Hi gongyayu,

     

    In my experience, using the starting keyword and question mark (?) helps narrow down the search quite a bit.  Within Junos that's the best option.

     

    For example:

    [edit]

    root@mx480-re0# set event-options policy test events alarm?  

    Possible completions:

      <event>             

      alarmd_config_access_error 

      alarmd_config_close_error 

      alarmd_config_parse_error 

      alarmd_config_reconfig_error 

      alarmd_connection_failure 

      alarmd_decode_alarm_object_error 

      alarmd_exists       

      alarmd_exists_term_other 

      alarmd_ifdalarm_type_error 

      alarmd_ifdev_rtslib_failure 

      alarmd_ipc_msg_error 

      alarmd_ipc_msg_write_error 

      alarmd_ipc_unexpected_msg 

      alarmd_mem_alloc_failure 

      alarmd_mgr_connect  

      alarmd_multiple_alarm_bit_error 

      alarmd_pidfile_open 

      alarmd_pipe_write_error 

      alarmd_socket_create 

      alarmd_unexpected_exit 

    [edit]

     

    root@mx480-re0# set event-options policy test events chassis?  

    Possible completions:

      <event>             

      chassisd_acquire_mastership 

      chassisd_anticf_pim_check_failed 

      chassisd_anticf_re_check_failed 

      chassisd_anticf_re_rom_read_fail 

      chassisd_anticf_re_sha_read_fail 

      chassisd_anticf_rom_read_failed 

      chassisd_anticf_sha_read_failed 

      chassisd_argument_error 

      chassisd_blowers_speed 

      chassisd_blowers_speed_full 

      chassisd_blowers_speed_medium 

      chassisd_bus_device_open_failure 

      chassisd_cb_clock_checksum 

     

    If you're unaware of the starting keyword, another dirty trick is to log your terminal session with a question marking after events and keep hitting tab until all events are listed out.  That gives you the whole list to search the session logs on your text editor.

     

    Also, there is an option for using non-standard logs that aren't listed in events to trigger your event policy.  Please refer Page 916-917 here:

    https://www.juniper.net/documentation/us/en/software/junos/automation-scripting/automation-scripting.pdf

     

    Hope this helps.

     

    Regards,

    -r.

     

    --------------------------------------------------

     

    If this solves your problem, please mark this post as "Accepted Solution."

    Kudos are always appreciated :).

     

    Sent from Mail for Windows

     


    Juniper Business Use Only






  • 3.  RE: How to search an existing event for an event policy?

    Posted 09-12-2021 22:51
    thanks a lot !!
    The reason I like to know any tricks to this is when I take JNCIE lab exam, the time is so pressed. I need to find what I need as fast as I can.