Skip to content

Commit 88950eb

Browse files
authored
Merge pull request #242 from qonto/fix-rds-status-doc
fix(rds_instance_status): metric description and doc in readme
2 parents e960439 + e11de1e commit 88950eb

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ It collects key metrics about:
6464
| rds_instance_max_iops_average | `aws_account_id`, `aws_region`, `instance_class` | Maximum IOPS of underlying EC2 instance class |
6565
| rds_instance_max_throughput_bytes | `aws_account_id`, `aws_region`, `instance_class` | Maximum throughput of underlying EC2 instance class |
6666
| rds_instance_memory_bytes | `aws_account_id`, `aws_region`, `instance_class` | Instance class memory |
67-
| rds_instance_status | `aws_account_id`, `aws_region`, `dbidentifier` | Instance status (1: ok, 0: can't scrap metrics) |
67+
| rds_instance_status | `aws_account_id`, `aws_region`, `dbidentifier` | Instance status ([refer to supported status list](#supported-rds-status)) |
6868
| rds_instance_tags | `aws_account_id`, `aws_region`, `dbidentifier`, `tag_<AWS_TAG>`... | AWS tags attached to the instance |
6969
| rds_instance_vcpu_average | `aws_account_id`, `aws_region`, `instance_class` | Total vCPU for this instance class |
7070
| rds_max_allocated_storage_bytes | `aws_account_id`, `aws_region`, `dbidentifier` | Upper limit in gibibytes to which Amazon RDS can automatically scale the storage of the DB instance |
@@ -124,6 +124,28 @@ It collects key metrics about:
124124

125125
</details>
126126

127+
### Supported RDS status
128+
129+
| Id | Meaning |
130+
| ---: | :----------------------------- |
131+
| 4 | Modifying |
132+
| 3 | Starting |
133+
| 2 | Backing Up |
134+
| 1 | Available |
135+
| | |
136+
| 0 | Stopped or can't scrap metrics |
137+
| | |
138+
| -1 | Unknown status reported by AWS |
139+
| -2 | Stopping |
140+
| -3 | Creating |
141+
| -4 | Deleting |
142+
| -5 | Rebooting |
143+
| -6 | Failed |
144+
| -7 | Storage Full |
145+
| -8 | Upgrading |
146+
147+
_IDs were arbitrarily chosen when building the exporter but as a rule of thumb, all ID ≤0 means that instance isn't available._
148+
127149
## Dashboards
128150

129151
> [!TIP]

internal/app/exporter/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func NewCollector(logger slog.Logger, collectorConfiguration Configuration, awsA
183183
[]string{"aws_account_id", "aws_region", "dbidentifier"}, nil,
184184
),
185185
status: prometheus.NewDesc("rds_instance_status",
186-
fmt.Sprintf("Instance status (%d: ok, %d: can't scrap metrics)", int(exporterUpStatusCode), int(exporterDownStatusCode)),
186+
"Instance status (0 stopped or can't scrape) (1 ok | 2 backup | 3 startup | 4 modify) (-1 unknown | -2 stopping | -3 creating | -4 deleting | -5 rebooting | -6 failed | -7 full storage | -8 upgrading )",
187187
[]string{"aws_account_id", "aws_region", "dbidentifier"}, nil,
188188
),
189189
logFilesSize: prometheus.NewDesc("rds_instance_log_files_size_bytes",

0 commit comments

Comments
 (0)