Skip to content

Configuration : Process

per1234 edited this page Apr 26, 2017 · 10 revisions

Process

This document present the NEW, not yet complete process API which is due to be used after the 3.4.x releases.

This statement can be found under the following group:

  • BGP

Please keep in mind that for each section a new helper will be forked. Unless you definitively want more than one process forked ( to make advantage of multicore for example ), you should re-used already defined process sections.

Syntax

process <name> {
   run </path/to/command with its args>  # the command can be quoted
   encoder text|json;
   receive {
     # "message" in notification,open,keepalive,update,refresh,operational
     <message> {
       parsed;          # send parsed BGP data for "message"
       packets;         # send raw BGP message for "message"
       consolidated;    # group parsed and raw information in one JSON object
     }
     neighbor-changes;  # state of peer change (up/down)
     parsed;            # send parsed BGP data for all messages
     packets;           # send raw BGP message for all messages
     consolidated;      # group for all messages
   }
   send {
     packets;           # send all generated BGP messages
   }
}

run

the command can be single or double quoted

encoder

The way to send the data to the helper process. Using text the data with use the, old, text API. Using JSON the process will use the new JSON format.

The default is currently text but user should not rely on this default as it will change to JSON in a future release.

receive

The type of event the program wants to receive. Valid options for are :

  • notification
  • open
  • keepalive
  • update
  • refresh
  • operational

For each type of message, you can indicate if you want :

  • parsed, ExaBGP to parse the data and present the representation
  • raw, ExaBGP to present the raw BGP message ( JSON only )
  • consolidate, present both parse and raw information in ONE JSON object (instead of two)

ExaBGP let you define these keyword within the root of "received" if you want to apply the setting to every message type.

neighbor-changes

You want to be informed of adjacency changes ( TCP session going up/down )

send

You should know what you ask ExaBGP to send to its peer, but should you want to know what raw data was generated and sent on the wire, ExaBGP can pass the JSON object with the packet sent on the wire to the helper process.