In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Sensors & Trigger
Inductor & trigger
Sensor: a Python plug-in for inbound or outbound integration that accepts or monitors events, respectively. When an external system generates an event and is processed by a sensor, the system generates a trigger action. The sensor can not only passively accept the event trigger inbound, but also take the initiative to poll the event regularly and trigger the corresponding action. Trigger: the event built by ST2 to identify the incoming st2 is a tuple of type (string) and optional parameters (object). Rules works with triggers. In general, sensors register a trigger, but this is not necessary, such as webhook triggers.
How to write Sensor:
The inductor is written in Python and must follow the interface requirements defined by ST2.
Action
action
When trigger triggers and matches the canonical crieria, the action is executed. It can perform operations directly from the client through cli/API/UI, and multiple operations can be integrated into workflows to complete complex operations, which can be done in any programming language. Common actions: restart the service / create a new CVM / accept an alarm / send a notification via SMS or email
/ send notification to IRC channel/ that a message occurs to slack/ to enable a container / take a VM snapshot / run Nagios check
Action Runners
Action operator
The environment in which the user implements the action, ST2 provides some basic action runner so that the user can focus on the implementation of the action itself, rather than setting up the environment
Custom action
Use metadata described by yaml to describe actions and inputs
A script that implements the logic of action
Specification:
The script must exit successful execution with a state of 0, and all log information of non-0 exit errors must be printed out as standard error.
To be continued. )
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.