Chapter 8. Engines

Engines are another interface that interacts directly with the event bus. While beacons are typically used to import events from external source, engines can be designed bidirectionally. That means they can both import external events and translate them into structured data that can be interpreted by Salt, or export Salt events into different services.

Engines Are Easy to Configure

As most Salt subsystems, engines can be configured on the master or the Minion side depending on the application requirements.

They are configured via a top-level section in the master or (proxy) minion configuration. The following example is an excellent way to monitor the entire Salt activity in real time by pushing the events into Logstsh, via HTTP(S):

engine:
  - http_logstash:
      url: https://logstash.s.as1234.net/salt

Under the engine section we can define a list of Engines, each having its particular settings. In this example, for the http_logstash engine we have only configured the url of the Logstash instance where to log the Salt events.

There are several engines by default embedded into Salt, any of them having a potential to be used in the network automation environment, directly or indirectly, for various services, including Docker, Logstash, or Redis. Engines can be equally used to facilitate “ChatOps”, where they forward the requests between a common chat application, such as HipChat or Slack, and the Salt master.

napalm-logs and the napalm-syslog Engine

For event-driven, ...

Get Network Automation at Scale now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.