Skip to content

Commit 947b2cb

Browse files
committed
[feature] small fix: COR-3742
1 parent 50641a9 commit 947b2cb

File tree

11 files changed

+123
-249
lines changed

11 files changed

+123
-249
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
REPO digitalocean-monitoring
2-
VERSION_HASH c8dc7e74fa1c
32
LOAD digital-ocean-monitoring.yaml common.yaml do-provider-base.yaml
43
RESOURCES do-provider-base.js common.js digital-ocean-monitoring-sync.js

dist/digitalocean-monitoring/common.js

Lines changed: 12 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/digitalocean-monitoring/common.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ namespace: digitalocean-monitoring
33
common:
44
defines: module
55
metadata:
6-
version-hash: c8dc7e74fa1c
6+
version-hash: f3893f88d990
77
source: <<< common.js

dist/digitalocean-monitoring/digital-ocean-monitoring.yaml

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
namespace: digitalocean-monitoring
2-
digital-ocean-monitoring:
2+
monitoring:
33
defines: entity
44
metadata:
55
name: DigitalOceanMonitoring
6-
version-hash: c8dc7e74fa1c
6+
version-hash: f3893f88d990
77
schema:
8-
create_when_missing:
9-
type: boolean
10-
description: Whether to create resources when missing (for testing)
11-
default: true
128
name:
139
type: string
1410
description: Name of the alert policy
11+
create_when_missing:
12+
type: boolean
13+
description: Whether to create resources when missing - set to false for testing
14+
default: true
1515
alert_description:
1616
type: string
1717
description: Description of the alert policy
@@ -23,23 +23,13 @@ digital-ocean-monitoring:
2323
- v1/insights/droplet/load_5
2424
- v1/insights/droplet/load_15
2525
- v1/insights/droplet/memory_utilization_percent
26-
- v1/insights/droplet/memory_available
27-
- v1/insights/droplet/memory_cached
28-
- v1/insights/droplet/memory_free
29-
- v1/insights/droplet/memory_total
3026
- v1/insights/droplet/disk_utilization_percent
3127
- v1/insights/droplet/disk_read
3228
- v1/insights/droplet/disk_write
33-
- v1/insights/droplet/filesystem_free
34-
- v1/insights/droplet/filesystem_size
3529
- v1/insights/droplet/public_outbound_bandwidth
3630
- v1/insights/droplet/public_inbound_bandwidth
3731
- v1/insights/droplet/private_outbound_bandwidth
3832
- v1/insights/droplet/private_inbound_bandwidth
39-
- v1/insights/droplet/network_outbound_packets
40-
- v1/insights/droplet/network_inbound_packets
41-
- v1/insights/droplet/network_outbound_errors
42-
- v1/insights/droplet/network_inbound_errors
4333
- v1/insights/lbaas/avg_cpu_utilization_percent
4434
- v1/insights/lbaas/connection_utilization_percent
4535
- v1/insights/lbaas/droplet_health
@@ -56,12 +46,14 @@ digital-ocean-monitoring:
5646
- v1/dbaas/alerts/cpu_alerts
5747
- v1/dbaas/alerts/memory_utilization_alerts
5848
- v1/dbaas/alerts/disk_utilization_alerts
59-
- v1/insights/volumes/filesystem_free
60-
- v1/insights/volumes/filesystem_size
61-
- v1/insights/volumes/read_bytes
62-
- v1/insights/volumes/write_bytes
63-
- v1/insights/apps/cpu_percentage
64-
- v1/insights/apps/memory_percentage
49+
- v1/droplet/autoscale_alerts/current_instances
50+
- v1/droplet/autoscale_alerts/target_instances
51+
- v1/droplet/autoscale_alerts/current_cpu_utilization
52+
- v1/droplet/autoscale_alerts/target_cpu_utilization
53+
- v1/droplet/autoscale_alerts/current_memory_utilization
54+
- v1/droplet/autoscale_alerts/target_memory_utilization
55+
- v1/droplet/autoscale_alerts/scale_up
56+
- v1/droplet/autoscale_alerts/scale_down
6557
description: Type of metric to monitor
6658
compare:
6759
type: string
@@ -138,23 +130,13 @@ digital-ocean-monitoring:
138130
- v1/insights/droplet/load_5
139131
- v1/insights/droplet/load_15
140132
- v1/insights/droplet/memory_utilization_percent
141-
- v1/insights/droplet/memory_available
142-
- v1/insights/droplet/memory_cached
143-
- v1/insights/droplet/memory_free
144-
- v1/insights/droplet/memory_total
145133
- v1/insights/droplet/disk_utilization_percent
146134
- v1/insights/droplet/disk_read
147135
- v1/insights/droplet/disk_write
148-
- v1/insights/droplet/filesystem_free
149-
- v1/insights/droplet/filesystem_size
150136
- v1/insights/droplet/public_outbound_bandwidth
151137
- v1/insights/droplet/public_inbound_bandwidth
152138
- v1/insights/droplet/private_outbound_bandwidth
153139
- v1/insights/droplet/private_inbound_bandwidth
154-
- v1/insights/droplet/network_outbound_packets
155-
- v1/insights/droplet/network_inbound_packets
156-
- v1/insights/droplet/network_outbound_errors
157-
- v1/insights/droplet/network_inbound_errors
158140
- v1/insights/lbaas/avg_cpu_utilization_percent
159141
- v1/insights/lbaas/connection_utilization_percent
160142
- v1/insights/lbaas/droplet_health
@@ -171,12 +153,14 @@ digital-ocean-monitoring:
171153
- v1/dbaas/alerts/cpu_alerts
172154
- v1/dbaas/alerts/memory_utilization_alerts
173155
- v1/dbaas/alerts/disk_utilization_alerts
174-
- v1/insights/volumes/filesystem_free
175-
- v1/insights/volumes/filesystem_size
176-
- v1/insights/volumes/read_bytes
177-
- v1/insights/volumes/write_bytes
178-
- v1/insights/apps/cpu_percentage
179-
- v1/insights/apps/memory_percentage
156+
- v1/droplet/autoscale_alerts/current_instances
157+
- v1/droplet/autoscale_alerts/target_instances
158+
- v1/droplet/autoscale_alerts/current_cpu_utilization
159+
- v1/droplet/autoscale_alerts/target_cpu_utilization
160+
- v1/droplet/autoscale_alerts/current_memory_utilization
161+
- v1/droplet/autoscale_alerts/target_memory_utilization
162+
- v1/droplet/autoscale_alerts/scale_up
163+
- v1/droplet/autoscale_alerts/scale_down
180164
compare:
181165
type: string
182166
enum:

dist/digitalocean-monitoring/do-provider-base.js

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/digitalocean-monitoring/do-provider-base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ namespace: digitalocean-monitoring
33
do-provider-base:
44
defines: module
55
metadata:
6-
version-hash: c8dc7e74fa1c
6+
version-hash: f3893f88d990
77
source: <<< do-provider-base.js

src/digitalocean-monitoring/README.md

Lines changed: 37 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This entity provides comprehensive monitoring capabilities for DigitalOcean reso
66

77
- **Alert Policy Management**: Create, update, delete, enable/disable, and list alert policies
88
- **Monitoring Sinks Management**: List and manage monitoring sinks for data collection
9-
- **Comprehensive Metrics Access**: Get detailed metrics for Droplets, Volumes, Apps, Load Balancers, and Databases
10-
- **Multiple Metric Types**: Support for CPU, memory, disk, load, network bandwidth, and I/O metrics
9+
- **Comprehensive Metrics Access**: Get detailed metrics for Droplets, Load Balancers, Databases, and Autoscale alerts
10+
- **Multiple Metric Types**: Support for CPU, memory, disk, load, network bandwidth, autoscale, and database alert metrics
1111
- **Flexible Notifications**: Email and Slack notifications with auto-detection of verified account email
1212
- **Entity and Tag Targeting**: Target specific Droplets by ID or tags
1313
- **Account Management**: Access DigitalOcean account information and limits
@@ -51,30 +51,18 @@ This entity provides comprehensive monitoring capabilities for DigitalOcean reso
5151

5252
#### Memory Metrics
5353
- `v1/insights/droplet/memory_utilization_percent` - Memory utilization percentage
54-
- `v1/insights/droplet/memory_available` - Available memory in bytes
55-
- `v1/insights/droplet/memory_cached` - Cached memory in bytes
56-
- `v1/insights/droplet/memory_free` - Free memory in bytes
57-
- `v1/insights/droplet/memory_total` - Total memory in bytes
5854

59-
#### Disk and Filesystem Metrics
55+
#### Disk Metrics
6056
- `v1/insights/droplet/disk_utilization_percent` - Disk utilization percentage
6157
- `v1/insights/droplet/disk_read` - Disk read operations
6258
- `v1/insights/droplet/disk_write` - Disk write operations
63-
- `v1/insights/droplet/filesystem_free` - Free filesystem space
64-
- `v1/insights/droplet/filesystem_size` - Total filesystem size
6559

6660
#### Network Bandwidth Metrics
6761
- `v1/insights/droplet/public_outbound_bandwidth` - Public outbound bandwidth
6862
- `v1/insights/droplet/public_inbound_bandwidth` - Public inbound bandwidth
6963
- `v1/insights/droplet/private_outbound_bandwidth` - Private outbound bandwidth
7064
- `v1/insights/droplet/private_inbound_bandwidth` - Private inbound bandwidth
7165

72-
#### Network Packet Metrics
73-
- `v1/insights/droplet/network_outbound_packets` - Outbound network packets
74-
- `v1/insights/droplet/network_inbound_packets` - Inbound network packets
75-
- `v1/insights/droplet/network_outbound_errors` - Outbound network errors
76-
- `v1/insights/droplet/network_inbound_errors` - Inbound network errors
77-
7866
### Load Balancer Metrics
7967

8068
#### Performance Metrics
@@ -101,15 +89,15 @@ This entity provides comprehensive monitoring capabilities for DigitalOcean reso
10189
- `v1/dbaas/alerts/memory_utilization_alerts` - Database memory alerts
10290
- `v1/dbaas/alerts/disk_utilization_alerts` - Database disk alerts
10391

104-
### Volume Metrics
105-
- `v1/insights/volumes/filesystem_free` - Volume free space
106-
- `v1/insights/volumes/filesystem_size` - Volume total size
107-
- `v1/insights/volumes/read_bytes` - Volume read bytes
108-
- `v1/insights/volumes/write_bytes` - Volume write bytes
109-
110-
### App Metrics
111-
- `v1/insights/apps/cpu_percentage` - App CPU percentage
112-
- `v1/insights/apps/memory_percentage` - App memory percentage
92+
### Droplet Autoscale Metrics
93+
- `v1/droplet/autoscale_alerts/current_instances` - Current number of instances
94+
- `v1/droplet/autoscale_alerts/target_instances` - Target number of instances
95+
- `v1/droplet/autoscale_alerts/current_cpu_utilization` - Current CPU utilization for autoscaling
96+
- `v1/droplet/autoscale_alerts/target_cpu_utilization` - Target CPU utilization for autoscaling
97+
- `v1/droplet/autoscale_alerts/current_memory_utilization` - Current memory utilization for autoscaling
98+
- `v1/droplet/autoscale_alerts/target_memory_utilization` - Target memory utilization for autoscaling
99+
- `v1/droplet/autoscale_alerts/scale_up` - Scale up events
100+
- `v1/droplet/autoscale_alerts/scale_down` - Scale down events
113101

114102
## Usage Examples
115103

@@ -148,6 +136,22 @@ monk-memory-alert:
148136
create_when_missing: true
149137
```
150138
139+
### Autoscale Instance Monitoring
140+
```yaml
141+
monk-autoscale-instances-alert:
142+
defines: digitalocean-monitoring/digital-ocean-monitoring
143+
name: monk-autoscale-instances-alert
144+
metric_type: v1/droplet/autoscale_alerts/current_instances
145+
compare: GreaterThan
146+
value: 10
147+
window: 5m
148+
tags:
149+
- autoscale
150+
- production
151+
enabled: true
152+
create_when_missing: true
153+
```
154+
151155
## Authentication
152156
153157
The entity uses the DigitalOcean provider for authentication. Configure your API token:
@@ -232,28 +236,12 @@ curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash
232236
- `get-droplet-network-metrics` - Network metrics
233237
- `get-all-droplet-metrics` - All droplet metrics combined
234238

235-
#### Advanced Memory Metrics
236-
- `get-droplet-memory-available` - Available memory metrics
237-
- `get-droplet-memory-cached` - Cached memory metrics
238-
- `get-droplet-memory-free` - Free memory metrics
239-
- `get-droplet-memory-total` - Total memory metrics
240-
241-
#### Filesystem Metrics
242-
- `get-droplet-filesystem-free` - Free filesystem space
243-
- `get-droplet-filesystem-size` - Total filesystem size
244-
245239
#### Network Bandwidth Metrics
246240
- `get-droplet-bandwidth-inbound` - Public inbound bandwidth
247241
- `get-droplet-bandwidth-outbound` - Public outbound bandwidth
248242
- `get-droplet-private-bandwidth-inbound` - Private inbound bandwidth
249243
- `get-droplet-private-bandwidth-outbound` - Private outbound bandwidth
250244

251-
#### Network Packet & Error Metrics
252-
- `get-droplet-network-inbound-packets` - Inbound packet metrics
253-
- `get-droplet-network-outbound-packets` - Outbound packet metrics
254-
- `get-droplet-network-inbound-errors` - Inbound network errors
255-
- `get-droplet-network-outbound-errors` - Outbound network errors
256-
257245
#### Disk I/O & Load Metrics
258246
- `get-droplet-disk-read` - Disk read operations
259247
- `get-droplet-disk-write` - Disk write operations
@@ -294,17 +282,15 @@ curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash
294282
- `get-db-memory-alerts` - Database memory alerts
295283
- `get-db-disk-alerts` - Database disk alerts
296284

297-
### Volume Metrics
298-
- `get-volume-metrics` - Basic volume filesystem metrics
299-
- `get-volume-filesystem-free` - Volume free space metrics
300-
- `get-volume-filesystem-size` - Volume total size (alias)
301-
- `get-volume-read-bytes` - Volume read I/O metrics
302-
- `get-volume-write-bytes` - Volume write I/O metrics
303-
304-
### App Metrics
305-
- `get-app-metrics` - Basic app CPU metrics
306-
- `get-app-cpu-percentage` - App CPU percentage metrics
307-
- `get-app-memory-percentage` - App memory percentage metrics
285+
### Droplet Autoscale Metrics
286+
- `get-autoscale-current-instances` - Current instance count metrics
287+
- `get-autoscale-target-instances` - Target instance count metrics
288+
- `get-autoscale-current-cpu` - Current CPU utilization for autoscaling
289+
- `get-autoscale-target-cpu` - Target CPU utilization for autoscaling
290+
- `get-autoscale-current-memory` - Current memory utilization for autoscaling
291+
- `get-autoscale-target-memory` - Target memory utilization for autoscaling
292+
- `get-autoscale-scale-up` - Scale up event metrics
293+
- `get-autoscale-scale-down` - Scale down event metrics
308294

309295
## API Reference
310296

0 commit comments

Comments
 (0)