Skip to content

Commit 4605cce

Browse files
changing wrong formula to calculate percentages
A percentage should be defined by used/total * 100. This is currently being defined as used/free * 100, leading to unexpected calculations and alerts.
1 parent febbbd8 commit 4605cce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

github_app_for_splunk/default/savedsearches.conf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ search = | mstats avg(_value) as "Avg" WHERE `github_collectd` AND metric_name="
3838
| eval metric_name=mvindex(split(metric_name,"."),2)\
3939
| stats avg("disk_gb") as "Avg" by metric_name, host\
4040
| xyseries host metric_name Avg\
41-
| eval disk_util=(used/free)*100\
41+
| eval disk_total=used+free\
42+
| eval disk_util=(used/disk_total)*100\
4243
| fields host disk_util
4344

4445
[GitHub Disk Utilization Over 85%]
@@ -82,7 +83,8 @@ search = | mstats avg(_value) as "Avg" WHERE `github_collectd` AND metric_name="
8283
| eval metric_name=mvindex(split(metric_name,"."),2)\
8384
| stats avg("disk_gb") as "Avg" by metric_name, host\
8485
| xyseries host metric_name Avg\
85-
| eval disk_util=(used/free)*100\
86+
| eval disk_total=used+free\
87+
| eval disk_util=(used/disk_total)*100\
8688
| fields host disk_util
8789

8890
[GitHub Load Average Above 1]

0 commit comments

Comments
 (0)