Skip to content

Commit

Permalink
Updated the dashboard and alerts.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkudikyala committed Nov 29, 2023
1 parent 30efb17 commit ecd8b82
Show file tree
Hide file tree
Showing 5 changed files with 539 additions and 466 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Scrape Errors
name: CPU Usage

description: |+
This alert is triggered when the cache size limit is reached above 4 for at least 5 minutes.
This alert is triggered when the CPU Usage is exceeds 90% for at least 5 minutes.
type: STATIC
nrql:
query: "FROM Metric SELECT sum(nextcloud_scrape_errors_total) As 'Scrape Errors'"
query: "SELECT average(host.cpuPercent) AS '(%) used CPU' FROM Metric"

# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE).
valueFunction: SINGLE_VALUE
Expand All @@ -16,7 +16,7 @@ terms:
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation.
threshold: 4
threshold: 90
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration?
Expand All @@ -26,7 +26,7 @@ terms:
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation.
threshold: 1
threshold: 80
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Heap Memory Usage
name: Memory Usage

description: |+
This alert is triggered when the Heap Memory Usage is below 2 for at least 5 minutes.
This alert is triggered when the Memory Usage is exceeds 90% for at least 5 minutes.
type: STATIC
nrql:
query: "FROM Metric select latest(go_memstats_heap_inuse_bytes)/1e+6 As 'Heap Memory Usage'"
query: "FROM NextcloudFlexMetrics select (latest(ocs.data.server.php.opcache.memory_usage.used_memory) / 1e+6) / (latest(ocs.data.server.php.opcache.memory_usage.free_memory) / 1e+6) * 100 AS '(%) used memory'"

# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE).
valueFunction: SINGLE_VALUE
Expand All @@ -14,19 +14,19 @@ valueFunction: SINGLE_VALUE
terms:
- priority: CRITICAL
# Operator used to compare against the threshold.
operator: BELOW
operator: ABOVE
# Value that triggers a violation.
threshold: 2
threshold: 90
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration?
thresholdOccurrences: ALL

- priority: WARNING
# Operator used to compare against the threshold.
operator: BELOW
operator: ABOVE
# Value that triggers a violation.
threshold: 4
threshold: 80
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration?
Expand Down
Loading

0 comments on commit ecd8b82

Please sign in to comment.