Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6c544cf
new changes for transaction datastream
muthu-mps May 19, 2022
1519e1d
codeowner and format changes
muthu-mps May 20, 2022
b3fa097
Naming changes for dashboard, updated img file
muthu-mps May 20, 2022
669063c
Name changes updated
muthu-mps May 20, 2022
9d4439e
kibana version upgraded to latest
muthu-mps May 20, 2022
bde0d4d
Updated fields and added documentation
muthu-mps May 24, 2022
5936aef
Added Readme file
muthu-mps May 24, 2022
655a0aa
Added Readme file
muthu-mps May 24, 2022
e8112f8
Added Readme file
muthu-mps May 24, 2022
4367a9c
Revert "Added Readme file"
muthu-mps May 24, 2022
5f39acc
Revert "Updated fields and added documentation"
muthu-mps May 24, 2022
d643da6
Revert "Added Readme file"
muthu-mps May 24, 2022
8106660
Revert "Added Readme file"
muthu-mps May 24, 2022
a232927
Updated the fields and dashboard names
muthu-mps May 24, 2022
94ed940
document update
muthu-mps May 24, 2022
58b0be2
transaction datastream testing
muthu-mps May 24, 2022
9002a79
Format changes and ECS version change
muthu-mps May 25, 2022
fb4ae99
doc update
muthu-mps May 25, 2022
d8b90b2
Updated the database name
muthu-mps May 26, 2022
f6a273a
Merge branch 'main' into mssql_transaction_log_data_stream
muthu-mps May 26, 2022
1eb3f47
updated manifest and changelog entreies
muthu-mps May 26, 2022
ad28113
renamed sql to mssql & updated 60s
muthu-mps Jun 2, 2022
e6dea96
events updated
muthu-mps Jun 2, 2022
41dad43
dashboard changes
muthu-mps Jun 3, 2022
adc5335
Dashboards By Value & updated mb to bytes
muthu-mps Jun 3, 2022
a8e67b5
Dashboards By Value & updated mb to bytes
muthu-mps Jun 3, 2022
573f755
visualization by value
muthu-mps Jun 3, 2022
1159a60
visualization by value
muthu-mps Jun 3, 2022
2f5d7f6
updated fields
muthu-mps Jun 3, 2022
271b171
added dimensions and updated ECS reference
muthu-mps Jun 6, 2022
f338a30
added dimensions and updated ECS reference
muthu-mps Jun 6, 2022
d44010c
Added reference to ECS fields & removed query, driver fields
muthu-mps Jun 8, 2022
1ca96a3
formating events
muthu-mps Jun 8, 2022
9e9079b
pipeline update
muthu-mps Jun 8, 2022
2489810
Added co-owners
muthu-mps Jun 8, 2022
ab33d10
renaming to audit_log
muthu-mps Jun 8, 2022
3ebbdff
removed query field
muthu-mps Jun 9, 2022
e9436dd
updated pipeline
muthu-mps Jun 9, 2022
357e6b4
Update stream.yml.hbs
muthu-mps Jun 14, 2022
3f9a2a4
Readme file updated
muthu-mps Jun 14, 2022
4717288
Merge branch 'mssql_transaction_log_data_stream' of github.com:muthu-…
muthu-mps Jun 14, 2022
7716acc
performance datastream conflicts resolved
muthu-mps Jun 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/microsoft_sqlserver/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# newer versions go on top
- version: "0.5.2"
changes:
- description: Added transaction log datastream
type: enhancement
link: https://github.com/elastic/integrations/pull/3395
- version: "0.5.1"
changes:
- description: Added performance datastream
type: enhancement
link: https://github.com/elastic/integrations/pull/3391
- version: "0.5.0"
changes:
- description: Update to ECS 8.2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
metricsets: ["query"]
hosts:
- sqlserver://{{username}}:{{password}}@{{hosts}}:{{port}}
period: {{period}}
driver: mssql
raw_data.enabled: true
# Collect the transaction logs from the system database
sql_queries:
- query: "SELECT name As 'database_name', database_id FROM sys.databases WHERE database_id=1;"
Comment thread
ruflin marked this conversation as resolved.
response_format: table
- query: "SELECT 'master' As database_name, database_id,total_log_size_mb,active_log_size_mb,log_backup_time,log_since_last_log_backup_mb,log_since_last_checkpoint_mb,log_recovery_size_mb FROM sys.dm_db_log_stats(1) master"
response_format: table
- query: "SELECT *, 'master' As 'database_name' FROM sys.dm_db_log_space_usage master"
response_format: table
- query: "SELECT name As 'database_name', database_id FROM sys.databases WHERE database_id=2;"
response_format: table
- query: "SELECT database_id,'tempdb' As 'database_name',total_log_size_mb,active_log_size_mb,log_backup_time,log_since_last_log_backup_mb,log_since_last_checkpoint_mb,log_recovery_size_mb FROM sys.dm_db_log_stats(2) tempdb"
response_format: table
- query: "SELECT *, 'tempdb' As 'database_name' FROM sys.dm_db_log_space_usage tempdb"
response_format: table
- query: "SELECT name As 'database_name', database_id FROM sys.databases WHERE database_id=3;"
response_format: table
- query: "SELECT 'model' As 'database_name',database_id,total_log_size_mb,active_log_size_mb,log_backup_time,log_since_last_log_backup_mb,log_since_last_checkpoint_mb,log_recovery_size_mb FROM sys.dm_db_log_stats(3) model"
response_format: table
- query: "SELECT *, 'model' As 'database_name' FROM sys.dm_db_log_space_usage model"
response_format: table
- query: "SELECT name As 'database_name', database_id FROM sys.databases WHERE database_id=4;"
response_format: table
- query: "SELECT 'msdb' As 'database_name',database_id,total_log_size_mb,active_log_size_mb,log_backup_time,log_since_last_log_backup_mb,log_since_last_checkpoint_mb,log_recovery_size_mb FROM sys.dm_db_log_stats(4) msdb"
response_format: table
- query: "SELECT *, 'msdb' As 'database_name' FROM sys.dm_db_log_space_usage model"
response_format: table
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: data_stream.type
type: constant_keyword
description: Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: Data stream namespace.
- name: '@timestamp'
type: date
description: Event timestamp.
Comment thread
muthu-mps marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
- name: sql
Comment thread
muthu-mps marked this conversation as resolved.
Outdated
type: group
release: experimental
fields:
- name: driver
Comment thread
muthu-mps marked this conversation as resolved.
Outdated
type: keyword
description: Driver used to execute the query.
- name: query

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to index the query? Should we set it to index: false?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont need to index the query, will set as false.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, do we need the query at all in the final document? This is an implementation detail of the integration, I think that it could be removed.

But, if we are storing metrics coming from different queries in different documents we may need some dimension to distinguish between queries. So we may need to index the query to use it as dimension, or find some other field that could cover this.

We can also wait to have some way to join events (elastic/beats#31806 (comment)), then database_id will be probably enough as dimension.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

type: keyword
description: Query executed to collect metrics.
- name: metrics.database_id
type: long
description: Unique ID of the database inside MSSQL.
- name: metrics.database_name
Comment thread
muthu-mps marked this conversation as resolved.
Outdated
type: keyword
description: Name of the database.
- name: metrics.log_since_last_checkpoint_mb
type: long
description: Log size in bytes since last checkpoint log sequence number (LSN).
- name: metrics.log_recovery_size_mb
type: long
description: Log size in bytes since log recovery log sequence number (LSN).
- name: metrics.total_log_size_mb
type: long
description: Total log size.
- name: metrics.log_backup_time
type: date
Comment thread
muthu-mps marked this conversation as resolved.
Outdated
description: Last transaction log backup time.
- name: metrics.active_log_size_mb
type: long
description: Total active transaction log size in bytes.
- name: metrics.log_since_last_log_backup_mb
type: long
description: Log file size since last backup
- name: metrics.used_log_space_in_percent
type: float
description: A percentage of the occupied size of the log as a percent of the total log size.
- name: metrics.used_log_space_in_bytes
type: long
description: The occupied size of the log in bytes.
- name: metrics.log_space_in_bytes_since_last_backup
type: long
description: The amount of space used since the last log backup in bytes.
- name: metrics.total_log_size_in_bytes
type: long
description: Total transaction log size in bytes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type: metrics
title: Microsoft SqlServer transaction_log metrics
release: experimental
streams:
- input: sql/metrics
vars:
- name: period
type: text
title: Period
multi: false
required: true
show_user: true
default: 10s
title: Microsoft SqlServer transaction_log metrics
description: Collect Microsoft SqlServer transaction_log metrics
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
{
"attributes": {
"description": "An overview of the transaction log of each database in a Microsoft SqlServer instance",
"hits": 0,
"kibanaSavedObjectMeta": {
"searchSourceJSON": {
"filter": [],
"query": {
"language": "kuery",
"query": ""
}
}
},
"optionsJSON": {
"darkTheme": false,
"hidePanelTitles": false,
"useMargins": true
},
"panelsJSON": [
{
"embeddableConfig": {
"enhancements": {},
"hidePanelTitles": false
},
"gridData": {
"h": 12,
"i": "1",
"w": 24,
"x": 0,
"y": 12
},
"panelIndex": "1",
"panelRefName": "panel_1",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
},
{
"embeddableConfig": {
"enhancements": {},
"hidePanelTitles": false
},
"gridData": {
"h": 13,
"i": "2",
"w": 24,
"x": 24,
"y": 24
},
"panelIndex": "2",
"panelRefName": "panel_2",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
},
{
"embeddableConfig": {
"enhancements": {},
"hidePanelTitles": false
},
"gridData": {
"h": 12,
"i": "3",
"w": 18,
"x": 30,
"y": 0
},
"panelIndex": "3",
"panelRefName": "panel_3",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
},
{
"embeddableConfig": {
"enhancements": {},
"hidePanelTitles": false
},
"gridData": {
"h": 13,
"i": "4",
"w": 24,
"x": 0,
"y": 37
},
"panelIndex": "4",
"panelRefName": "panel_4",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
},
{
"embeddableConfig": {
"enhancements": {},
"hidePanelTitles": false
},
"gridData": {
"h": 13,
"i": "5",
"w": 24,
"x": 0,
"y": 24
},
"panelIndex": "5",
"panelRefName": "panel_5",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
},
{
"embeddableConfig": {
"enhancements": {},
"hidePanelTitles": false
},
"gridData": {
"h": 12,
"i": "6",
"w": 24,
"x": 24,
"y": 12
},
"panelIndex": "6",
"panelRefName": "panel_6",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
},
{
"embeddableConfig": {
"enhancements": {},
"hidePanelTitles": false
},
"gridData": {
"h": 12,
"i": "7",
"w": 18,
"x": 12,
"y": 0
},
"panelIndex": "7",
"panelRefName": "panel_7",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
},
{
"embeddableConfig": {
"enhancements": {}
},
"gridData": {
"h": 12,
"i": "8",
"w": 12,
"x": 0,
"y": 0
},
"panelIndex": "8",
"panelRefName": "panel_8",
"type": "visualization",
"version": "8.3.0-SNAPSHOT"
}
],
"timeRestore": false,
"title": "[Metrics Microsoft SqlServer] Transaction log",
"version": 1
},
"coreMigrationVersion": "8.3.0",
"id": "microsoft_sqlserver-18d66970-1fb4-11e9-8a4d-eb34d2834f6b",
"migrationVersion": {
"dashboard": "8.3.0"
},
"references": [
{
"id": "microsoft_sqlserver-e9654a40-1fb2-11e9-8a4d-eb34d2834f6b",
"name": "1:panel_1",
"type": "visualization"
},
{
"id": "microsoft_sqlserver-1757d530-1fb3-11e9-8a4d-eb34d2834f6b",
"name": "2:panel_2",
"type": "visualization"
},
{
"id": "microsoft_sqlserver-a55bb000-1fb2-11e9-8a4d-eb34d2834f6b",
"name": "3:panel_3",
"type": "visualization"
},
{
"id": "microsoft_sqlserver-edb7a0c0-1f2b-11e9-8a4d-eb34d2834f6b",
"name": "4:panel_4",
"type": "visualization"
},
{
"id": "microsoft_sqlserver-c9ead180-1fb2-11e9-8a4d-eb34d2834f6b",
"name": "5:panel_5",
"type": "visualization"
},
{
"id": "microsoft_sqlserver-68fa61b0-1fb2-11e9-8a4d-eb34d2834f6b",
"name": "6:panel_6",
"type": "visualization"
},
{
"id": "microsoft_sqlserver-6710ff20-1f2c-11e9-8a4d-eb34d2834f6b",
"name": "7:panel_7",
"type": "visualization"
},
{
"id": "microsoft_sqlserver-82bf9480-260b-11e9-a46a-471d2a76b305",
"name": "8:panel_8",
"type": "visualization"
}
],
"type": "dashboard"
}
Loading