forked from mattiasgeniar/zabbix-orphaned-data-cleanup
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66d6cd6
commit 4cc1dab
Showing
5 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SELECT count(triggerid) | ||
AS diskspace | ||
FROM triggers | ||
WHERE description LIKE 'Free disk space is less than 20|%%' | ||
ESCAPE '|' | ||
AND NOT description LIKE '%{#FSNAME}%'; | ||
|
||
SELECT count(triggerid) | ||
AS inodes | ||
FROM triggers | ||
WHERE description LIKE 'Free disk space is less than 20|%%' | ||
ESCAPE '|' | ||
AND NOT description LIKE '%{#FSNAME}%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SELECT count(triggerid) | ||
FROM triggers | ||
WHERE description ~* 'disk space.*less.*20%' AND NOT description ~* '{#'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
DELETE FROM triggers | ||
WHERE description LIKE 'Free disk space is less than 20|%%' | ||
ESCAPE '|' | ||
AND NOT description LIKE '%{#FSNAME}%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DELETE | ||
FROM triggers | ||
WHERE description ~* 'disk space.*less.*20%' AND NOT description ~* '{#'; |