View Full Version : Swap percentage
I'm using zabbix 1.0. Is there a way for me to monitor the percentage of swap used? I know I could set up a trigger with a formula to figure it out, but I'd like to set it up as a normal monitored item (sorry - I'm new to zabbix and am not that familiar with the terminology yet).
Part of the reason I want to do this is so that I can graph percentage of swap used for several hosts.
Thanks in advance.
I'm using zabbix 1.0. Is there a way for me to monitor the percentage of swap used? I know I could set up a trigger with a formula to figure it out, but I'd like to set it up as a normal monitored item (sorry - I'm new to zabbix and am not that familiar with the terminology yet).
Part of the reason I want to do this is so that I can graph percentage of swap used for several hosts.
Thanks in advance.
swap % is not supported as an item in agent (yet?). The easiest way would be to set it up as a user defiend item in agentd.conf (http://www.zabbix.com/manual/v1.1/config_extend.php) and then pull that directly. On my gentoo box, the following one-liner would give me the % of swap used
free|tail -n -1|awk '{print $3/$2}'
You could pop it into several agentd.conf files pretty quickly and then add the item to your host template.
HTH
cooper
swap % is not supported as an item in agent (yet?).
Yeah - I think what I was really looking for was to be able to set up an expression as a monitored item. I guess that's a wishlist item. :)
free|tail -n -1|awk '{print $3/$2}'
Just to take this a step further, I'm doing the following (seems to work under linux anyway)
free|awk '/Swap/{print ($3/$2)*100}'
HTH
cooper
It did indeed. Thanks for the info.
-Egon
Just to take this a step further, I'm doing the following (seems to work under linux anyway)
free|awk '/Swap/{print ($3/$2)*100}'
-Egon
Right on. Even with BASH, much like perl, "There's More Than One Way To Do It." Glad you got what you were looking for.
later
cooper