{"_id":"57fcc4870312b20e00ac64ea","project":"5435687035740020002a1c04","version":{"_id":"57fcc4860312b20e00ac64c0","project":"5435687035740020002a1c04","__v":1,"createdAt":"2016-10-11T10:52:54.637Z","releaseDate":"2016-10-11T10:52:54.637Z","categories":["57fcc4860312b20e00ac64c1","57fcc4860312b20e00ac64c2","57fcc4860312b20e00ac64c3","57fcc4860312b20e00ac64c4","57fcc4860312b20e00ac64c5","57fcc4860312b20e00ac64c6","57fcc4860312b20e00ac64c7","57fcc4860312b20e00ac64c8","57fcc4860312b20e00ac64c9","57fcc4860312b20e00ac64ca","57fcc4860312b20e00ac64cb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"[APP-1265], [APP-1035]","version_clean":"5.2.0","version":"5.2"},"__v":0,"parentDoc":null,"category":{"_id":"57fcc4860312b20e00ac64c7","__v":0,"version":"57fcc4860312b20e00ac64c0","project":"5435687035740020002a1c04","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-11-25T22:05:12.981Z","from_sync":false,"order":6,"slug":"agent-integration","title":"Data Agent"},"user":"5435682035740020002a1c01","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-12T16:06:23.261Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"The Agent embeds [Lua](http://www.lua.org/) to provide extensibility without requiring external programs.  Lua support in the Agent is designed to help you manipulate the Agent's data storage and use it to feed metrics to the API.  \n\nYou are free to make changes to your script files at any time; the Agent will automatically detect that their contents have changed and reload them as needed.\n\n## Language Reference\n\nPlease see the [Lua Introduction](doc:lua-introduction) for more information on the functions and capabilities with TelemetryTV and Lua.\n\n\n# Use Cases\n## Processing Graphite Data\n\nThe Agent can be used to process data collected via Graphite.   The Graphite data is sent and saved by the agent in a local database where it then can query to generate summarized metrics from which are used to populate flows.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/mtt12wvyQfGQtU4hVOk6_methods.png\",\n        \"methods.png\",\n        \"1122\",\n        \"538\",\n        \"#2ba1f8\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nSee the [Graphite](doc:graphite) documentation page for more information on how to send Graphite data to the Agent.\n\nPlease see the [Graphite](doc:graphite-example) integration example and the [Logfile](doc:tailing-logfiles) integration example for more information on how to integrate TelemetryTV using Graphite data sources.\n\n## Reading Excel Files\n\nThe Agent is able to read Excel files and extract their contents into​ a series and sent as metrics to flows.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Mb5YjyJ9QLOUirP1Fj9s_methods.png\",\n        \"methods.png\",\n        \"1427\",\n        \"280\",\n        \"#2aa0f8\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nPlease see the [Excel Document](doc:excel-document) integration example for a detailed example on how to use Excel with Telemetry.\n\n## Calling External APIs\n\nThe Agent can call external API's, process their responses and use it to populate metrics in flow updates.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/NpToVOrwQ1UbYTtuWnjd_methods.png\",\n        \"methods.png\",\n        \"1397\",\n        \"277\",\n        \"#29a0f8\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nPlease see the [Third Party API](doc:third-party-apis) integration example for a detailed example for how to use an external API with TelemetryTV.","excerpt":"","slug":"asl-scripts","type":"basic","title":"Lua Scripts"}
The Agent embeds [Lua](http://www.lua.org/) to provide extensibility without requiring external programs. Lua support in the Agent is designed to help you manipulate the Agent's data storage and use it to feed metrics to the API. You are free to make changes to your script files at any time; the Agent will automatically detect that their contents have changed and reload them as needed. ## Language Reference Please see the [Lua Introduction](doc:lua-introduction) for more information on the functions and capabilities with TelemetryTV and Lua. # Use Cases ## Processing Graphite Data The Agent can be used to process data collected via Graphite. The Graphite data is sent and saved by the agent in a local database where it then can query to generate summarized metrics from which are used to populate flows. [block:image] { "images": [ { "image": [ "https://files.readme.io/mtt12wvyQfGQtU4hVOk6_methods.png", "methods.png", "1122", "538", "#2ba1f8", "" ] } ] } [/block] See the [Graphite](doc:graphite) documentation page for more information on how to send Graphite data to the Agent. Please see the [Graphite](doc:graphite-example) integration example and the [Logfile](doc:tailing-logfiles) integration example for more information on how to integrate TelemetryTV using Graphite data sources. ## Reading Excel Files The Agent is able to read Excel files and extract their contents into​ a series and sent as metrics to flows. [block:image] { "images": [ { "image": [ "https://files.readme.io/Mb5YjyJ9QLOUirP1Fj9s_methods.png", "methods.png", "1427", "280", "#2aa0f8", "" ] } ] } [/block] Please see the [Excel Document](doc:excel-document) integration example for a detailed example on how to use Excel with Telemetry. ## Calling External APIs The Agent can call external API's, process their responses and use it to populate metrics in flow updates. [block:image] { "images": [ { "image": [ "https://files.readme.io/NpToVOrwQ1UbYTtuWnjd_methods.png", "methods.png", "1397", "277", "#29a0f8", "" ] } ] } [/block] Please see the [Third Party API](doc:third-party-apis) integration example for a detailed example for how to use an external API with TelemetryTV.