Skip to content

Commit

Permalink
Changes requested in PR
Browse files Browse the repository at this point in the history
- rename metric to sqlserver.database.count
- Add more info to err log
  • Loading branch information
crobert-1 committed May 16, 2024
1 parent 7edd6c7 commit 20d536b
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 121 deletions.
32 changes: 16 additions & 16 deletions receiver/sqlserverreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@ metrics:
enabled: true
```
### sqlserver.database.count
The number of databases
This metric is only available when the receiver is configured to directly connect to SQL Server.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {databases} | Gauge | Int |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| database.status | The current status of a database | Str: ``online``, ``restoring``, ``recovering``, ``pending_recovery``, ``suspect``, ``offline`` |
### sqlserver.database.io.read_latency
Total time that the users waited for reads issued on this file.
Expand Down Expand Up @@ -254,22 +270,6 @@ This metric is only available when the receiver is configured to directly connec
| ---- | ----------- | ---------- |
| {processes} | Gauge | Int |
### sqlserver.properties.db.status
The number of databases that are in a given state.
This metric is only available when the receiver is configured to directly connect to SQL Server.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {databases} | Gauge | Int |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| database.status | The current status of a database | Str: ``online``, ``restoring``, ``recovering``, ``pending_recovery``, ``suspect``, ``offline`` |
### sqlserver.resource_pool.disk.throttled.read.rate
The number of read operations that were throttled in the last second
Expand Down
2 changes: 1 addition & 1 deletion receiver/sqlserverreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func setupQueries(cfg *Config) []string {
queries = append(queries, getSQLServerPerformanceCounterQuery(cfg.InstanceName))
}

if cfg.MetricsBuilderConfig.Metrics.SqlserverPropertiesDbStatus.Enabled {
if cfg.MetricsBuilderConfig.Metrics.SqlserverDatabaseCount.Enabled {
queries = append(queries, getSQLServerPropertiesQuery(cfg.InstanceName))
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 64 additions & 64 deletions receiver/sqlserverreceiver/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 20d536b

Please sign in to comment.