{"id":20069852,"url":"https://github.com/spaghettidba/xesmarttarget","last_synced_at":"2026-01-16T06:55:29.502Z","repository":{"id":37550432,"uuid":"55555200","full_name":"spaghettidba/XESmartTarget","owner":"spaghettidba","description":"A configurable target for SQL Server Extended Events. Write to a table or perform custom actions with no effort.","archived":false,"fork":false,"pushed_at":"2024-12-05T10:10:03.000Z","size":334,"stargazers_count":85,"open_issues_count":13,"forks_count":23,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-30T01:11:25.292Z","etag":null,"topics":["extended-events","sql-server"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spaghettidba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-05T21:37:56.000Z","updated_at":"2025-03-12T04:55:50.000Z","dependencies_parsed_at":"2024-01-14T12:17:45.579Z","dependency_job_id":"b2a981df-d0a0-4583-8d9a-4602a3e60be4","html_url":"https://github.com/spaghettidba/XESmartTarget","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaghettidba%2FXESmartTarget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaghettidba%2FXESmartTarget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaghettidba%2FXESmartTarget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaghettidba%2FXESmartTarget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spaghettidba","download_url":"https://codeload.github.com/spaghettidba/XESmartTarget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423514,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extended-events","sql-server"],"created_at":"2024-11-13T14:16:21.851Z","updated_at":"2026-01-16T06:55:29.469Z","avatar_url":"https://github.com/spaghettidba.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XESmartTarget\n\n*XESmartTarget is the simplest way to write Extended Events data to a database table. But wait: there's more! XESmartTarget is the easiest way to process events without writing a single line of code!*\n\nXESmartTarget is a command line tool to help you working with SQL Server Extended Events. It offers the ability to perform custom actions in response to Events, in a way that is not possible by using the built-in targets.\n\nWhile you are free to extend XESmartTarget with your own Response types, XESmartTarget does not require any coding. Instead, it can be configured with simple `.json` configuration files.\n\nFor instance, the following configuration file instructs XESmartTarget to connect to the server `(local)`, hook to the Extended Events session `test_session` and forward all the events of type `sql_batch_completed` to a Response of type `TableAppenderResponse`, which will insert all events every `10 seconds` into a table named `test_session_data` in the server `(local)`, Database `XESmartTargetTest`, only the columns specified, only the rows with duration \u003e 10000 microseconds.\n\u003cBR\u003eIt will also replay the `sql_batch_completed` events to the instance `(local)\\SQL2014` using the `ReplayResponse` Response type.\n\n```javascript\n{\n    \"Target\": {\n        \"ServerName\": \"(local)\",\n        \"SessionName\": \"test_session\",\n        \"Responses\": [\n            {\n                //  JSON config files can contain comments\n                \"__type\": \"TableAppenderResponse\",\n                \"ServerName\": \"(local)\",\n                \"DatabaseName\": \"XESmartTargetTest\",\n                \"TableName\": \"test_session_data\",\n                \"AutoCreateTargetTable\": true,\n                \"UploadIntervalSeconds\": 10,\n                \"Events\": [\n                    \"sql_batch_completed\"\n                ],\n                \"OutputColumns\": [\n                    \"cpu_time\", \n                    \"duration\", \n                    \"physical_reads\", \n                    \"logical_reads\", \n                    \"writes\", \n                    \"row_count\", \n                    \"batch_text\"\n                ],\n                \"Filter\": \"duration \u003e 10000\"\n            },\n            {\n                \"__type\": \"ReplayResponse\",\n                \"ServerName\": \"(local)\\\\SQL2014\",\n                \"DatabaseName\": \"XESmartTargetTest\",\n                \"Events\": [\n                    \"sql_batch_completed\"\n                ],\n                \"StopOnError\" : false\n            }\n        ]\n    }\n}\n```\n\nA complete description of all the setting you can control in the `.JSON` input file can be found in the [Documentation](https://github.com/spaghettidba/XESmartTarget/wiki).\n\nHere is the output it produces: \n![Screenshot 1](https://github.com/spaghettidba/XESmartTarget/blob/master/Images/Screenshot1.png?raw=true \"Screenshot\")\n\nAnd here is the output it produces in the database:\n![Screenshot 2](https://github.com/spaghettidba/XESmartTarget/blob/master/Images/Screenshot2.png?raw=true \"Screenshot\")\n\nFor the moment, the following Response types are available: \n* `CsvAppenderResponse`\n* `EmailResponse`\n* `ExecuteTSQLResponse`\n* `ReplayResponse`\n* `TableAppenderResponse`\n\nNew Response types are in the works, such as `GroupedTableAppenderResponse` (groups data before writing to a table). \nSuggestions for new Response Types are more than welcome.\n\nCheck out the [Documentation](https://github.com/spaghettidba/XESmartTarget/wiki) for more information.\n\n\n# XelToCsv\nXESmartTarget also includes a command line tool to convert .XEL files to .CSV. \n\nUsage is very simple. Here's an example:\n\n```\nXelToCsv.exe -s c:\\temp\\events.xel -d c:\\temp\\events.csv\n```\n\n# It's a Library!\nXESmartTarget is a .dll that you can use in your project. Not sure how to use it? No problem, look at `Program.cs` in the XESmartTarget project. It's super easy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaghettidba%2Fxesmarttarget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspaghettidba%2Fxesmarttarget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaghettidba%2Fxesmarttarget/lists"}