[ZBXNEXT-3843] Swap usage graph/reports show the wrong thing Created: 2017 May 02  Updated: 2017 May 31

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Templates (T)
Affects Version/s: 3.2.5
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Josh Soref Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: frontend, graphs, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have a team of people using Zabbix, we occasionally get reports about swap usage being too high (it's a good report, there is a real problem).

So they go to the standard Swap usage graph.

It shows two things:
1. Template OS Linux: Total swap space = system.swap.size[,total]
2. Template OS Linux: Free swap space = system.swap.size[,free]

But, with a title of "Swap usage", what it should show is:
1. Template OS Linux: Total swap space = system.swap.size[,total]
2. Template OS Linux: Used swap space = system.swap.size[,used]

Except, there's no such value ([,used]) in the system.

Expected:
1. system.swap.size[,used] as a thing
2. the template(s) should be switched to use that.

It would be nice if there was a workaround. In theory if Zabbix allows for calculated values, one could calculate system.swap.size[,total] system.swap.size[,free] – and this could be a nice demo of that if it's supported. (If it isn't supported, someone should feel free to create a ticket asking for this.)



 Comments   
Comment by Josh Soref [ 2017 May 03 ]

I think I was able to create a calculated item for this, and I'm crossing my fingers, but I'd definitely encourage Zabbix to include it.

Comment by richlv [ 2017 May 03 ]

is this only about graph title, or is there a use for having a built-in "used" ?

Comment by Josh Soref [ 2017 May 03 ]

Having spoken w/ people, the only reason it makes sense to graph "total" is with "used", otherwise you should just graph available.

If you graph total + available, then you don't get any precision from looking at a small time interval, because it always zooms to the value of total. And since the line is going to be fixed 99% of the time (technically you can add swap), the total line is just a distraction. You could rename the graph "Swap remaining" and remove the "total" line, but...

I think it's better to:
1. Add "used" as a value
2. Change the graph to show total + used.
With this, you can see the amount of swap used as it grows to total, which makes logical sense – the used space is growing and approaching its limit.

Comment by Josh Soref [ 2017 May 04 ]

fwiw, this is how to create the item I'm looking for:
Name: "Used swap space"
Type: "Calculated"
Key: "system.swap.size[,used]"
Formula: last("system.swap.size[,total]") - last("system.swap.size[,free]")
Type of information: Numeric (unsigned)
Data type: Decimal
Units: B
Update interval (in sec): 60
History storage period (in days): 7
Trend storage period (in days): 365
Store value: As is
Show value: As is
Applications: Memory

Comment by Josh Soref [ 2017 May 04 ]

Turns out that one can simply add system.swap.size[,used] as a Zabbix agent item instead of using calculated.

Generated at Wed Apr 24 02:21:12 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.