doc-exports/docs/fg/umn/functiongraph_01_0208.html
Chen, Junjie dac566cf2f FG UMN 20230725 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-04-03 10:30:56 +00:00

53 lines
11 KiB
HTML

<a name="functiongraph_01_0208"></a><a name="functiongraph_01_0208"></a>
<h1 class="topictitle1">Using an LTS Trigger</h1>
<div id="body32001227"><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p633032018219">For details about the timer event source, see section "Supported Event Sources".</p>
<div class="section" id="functiongraph_01_0208__en-us_topic_0000001298667461_section134592267445"><h4 class="sectiontitle">Prerequisites</h4><ul id="functiongraph_01_0208__en-us_topic_0000001298667461_ul10299171374519"><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li129531426101119">You have created a function. For details, see <a href="functiongraph_01_0153.html#functiongraph_01_0153">Creating a Function from Scratch</a>.</li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li16121114618115">You have created an agency with the <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b09167468568">LTS FullAccess</strong> permission. For details about how to create an agency, see <a href="functiongraph_01_0920.html#functiongraph_01_0920">Configuring Agency Permissions</a>.</li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li25844311453">You have created a log group, for example, <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b1119718471377">LogGroup1</strong>. For details, see <a href="https://docs.otc.t-systems.com/log-tank-service/umn/log_management/managing_log_groups.html#lts-04-0003" target="_blank" rel="noopener noreferrer">Creating a Log Group</a>.</li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li1535033815524">You have created a log stream, for example, <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b15266143617106">LogTopic1</strong>. For details, see <a href="https://docs.otc.t-systems.com/log-tank-service/umn/log_management/managing_log_streams.html" target="_blank" rel="noopener noreferrer">Creating a Log Stream</a>.</li></ul>
</div>
<div class="section" id="functiongraph_01_0208__en-us_topic_0000001298667461_section198021231234"><h4 class="sectiontitle">Creating an LTS Trigger</h4><ol id="functiongraph_01_0208__en-us_topic_0000001298667461_ol1451315571315"><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li188271311715"><span>Log in to the FunctionGraph console. In the navigation pane, choose <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_en-us_topic_0000001251907924_b033610517502">Functions</strong> &gt; <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_en-us_topic_0000001251907924_b183361950502">Function List</strong>.</span></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li488219139177"><span>Click the function to be configured to go to the function details page.</span></li><li id="functiongraph_01_0208__li48821313121717"><span>Choose <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_en-us_topic_0000001298507405_en-us_topic_0000001251588440_b289510228329">Configuration</strong> &gt; <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_en-us_topic_0000001298507405_en-us_topic_0000001251588440_b156971032183216">Triggers</strong> and click <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_en-us_topic_0000001298507405_en-us_topic_0000001251588440_b98432283337">Create Trigger</strong>.</span><p><div class="fignone" id="functiongraph_01_0208__en-us_topic_0000001298667461_en-us_topic_0000001298507405_en-us_topic_0000001251588440_fig546212168431"><span class="figcap"><b>Figure 1 </b>Creating a trigger</span><br><span><img id="functiongraph_01_0208__en-us_topic_0000001298667461_en-us_topic_0000001298507405_en-us_topic_0000001251588440_image94621716114320" src="en-us_image_0000001679340817.png"></span></div>
</p></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li18496191118346"><span>Set the following parameters:</span><p><ul id="functiongraph_01_0208__en-us_topic_0000001298667461_ul549031118345"><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li19490201111340"><strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b51618366127">Trigger Type</strong>: Select <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b2952173701217">Log Tank Service (LTS)</strong>.</li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li113161829163419"><strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b18738174901219">Log Group</strong>: Select a log group, for example, <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b1670524351313">LogGroup1</strong>.</li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li1878274913412"><strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b12633184731311">Log Stream</strong>: Select a log stream, for example, <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b531451741414">LogStream1</strong>.</li></ul>
</p></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li522552101114"><span>Click <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b1821813182145">OK</strong>.</span></li></ol>
</div>
<div class="section" id="functiongraph_01_0208__en-us_topic_0000001298667461_section15586193653118"><h4 class="sectiontitle">Configuring an LTS Event to Trigger the Function</h4><div class="note" id="functiongraph_01_0208__en-us_topic_0000001298667461_note1127414473525"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p155263485527">When the size of an LTS event message exceeds 75 KB, it will be split into multiple messages by 75 KB to trigger the function.</p>
</div></div>
<ol id="functiongraph_01_0208__en-us_topic_0000001298667461_ol1450442693518"><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li27816470518"><span>Return to the FunctionGraph console. In the navigation pane, choose <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b105210773491525">Functions</strong> &gt; <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b39210608591525">Function List</strong>.</span></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li1080841135117"><span>Click the function to be configured to go to the function details page.</span></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li14296112813525"><span>On the function details page, select a version.</span></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li109080051212"><span>On the <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b83711337113710">Code</strong> tab page, click <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b1437712378374">Test</strong>. The <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b537883711378">Configure Test Event</strong> dialog box is displayed.</span></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li9686135433718"><span>Set the parameters described in <a href="#functiongraph_01_0208__en-us_topic_0000001298667461_table15199135171812">Table 1</a> and click <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b8751423131416">Save</strong>.</span><p>
<div class="tablenoborder"><a name="functiongraph_01_0208__en-us_topic_0000001298667461_table15199135171812"></a><a name="en-us_topic_0000001298667461_table15199135171812"></a><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_01_0208__en-us_topic_0000001298667461_table15199135171812" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Test event information</caption><thead align="left"><tr id="functiongraph_01_0208__en-us_topic_0000001298667461_row31976510182"><th align="left" class="cellrowborder" valign="top" width="28.000000000000004%" id="mcps1.4.4.3.5.2.1.2.3.1.1"><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p71977514187">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="72%" id="mcps1.4.4.3.5.2.1.2.3.1.2"><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p8197165171812">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="functiongraph_01_0208__en-us_topic_0000001298667461_row219735171814"><td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.4.4.3.5.2.1.2.3.1.1 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p3197850189">Configure Test Event</p>
</td>
<td class="cellrowborder" valign="top" width="72%" headers="mcps1.4.4.3.5.2.1.2.3.1.2 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p819718513189">You can choose to create a test event or edit an existing one.</p>
<p id="functiongraph_01_0208__en-us_topic_0000001298667461_p019785141810">Use the default option <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b8423527069132">Create new test event</strong>.</p>
</td>
</tr>
<tr id="functiongraph_01_0208__en-us_topic_0000001298667461_row019845151817"><td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.4.4.3.5.2.1.2.3.1.1 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p1619715519182">Event Template</p>
</td>
<td class="cellrowborder" valign="top" width="72%" headers="mcps1.4.4.3.5.2.1.2.3.1.2 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p519812511182">Select <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b842352706162159">lts-event-template</strong>.</p>
</td>
</tr>
<tr id="functiongraph_01_0208__en-us_topic_0000001298667461_row01981653188"><td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.4.4.3.5.2.1.2.3.1.1 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p619865201814">Event Name</p>
</td>
<td class="cellrowborder" valign="top" width="72%" headers="mcps1.4.4.3.5.2.1.2.3.1.2 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p141661810113715">The event name can contain 1 to 25 characters and must start with a letter and end with a letter or digit. Only letters, digits, underscores (_), and hyphens (-) are allowed. For example, <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b9952132331715">lts-123test</strong>.</p>
</td>
</tr>
<tr id="functiongraph_01_0208__en-us_topic_0000001298667461_row71991752189"><td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.4.4.3.5.2.1.2.3.1.1 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p81983518186">Event data</p>
</td>
<td class="cellrowborder" valign="top" width="72%" headers="mcps1.4.4.3.5.2.1.2.3.1.2 "><p id="functiongraph_01_0208__en-us_topic_0000001298667461_p1419810515185">The system automatically loads the built-in LTS event template, which is used in this example without modifications.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="functiongraph_01_0208__en-us_topic_0000001298667461_li13199125191818"><span>Click <strong id="functiongraph_01_0208__en-us_topic_0000001298667461_b153889551399">Test</strong>. The function test result is displayed.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_01_0200.html">Creating Triggers</a></div>
</div>
</div>