PDA

View Full Version : How to show percentage and exactly free space in one notification


crazytux
17-09-2010, 08:28
Hello,

we are using Zabbix 1.8.2 and it is working fine, nothing to complain about.
But now I have a little problem.
If one partition has less than 15% free space, Zabbix will send a notification.
This works fine, too.
Now the notification looks like the following:

Notification Type: {STATUS}

Service: {TRIGGER.NAME}
Host: {HOSTNAME}
Address: {IPADDRESS}
Severity: {TRIGGER.SEVERITY}
Age: {EVENT.AGE}

Date/Time: {DATE}, {TIME}

Additional Info:
{STATUS} - {TRIGGER.NAME}: {ITEM.LASTVALUE}

The result is the following:

Notification Type: PROBLEM

Service: Low free disk space on *HOST* volume /home
Host: *HOST*
Address: 1.2.3.4
Severity: Warning
Age: 4h 0m

Date/Time: 2010.09.16, 20:05:01

Additional Info:
PROBLEM - Low free disk space on *HOST* volume /home: 13 %

As you can see, the partiton /home has 13% free space.
But now the problem is:
The notifications in Nagios did show the percentage and the exactly value of free space. In example: Low free disk space on *HOST* volume /home: 13 % (125 MB free)
How should I realize this in zabbix?
I can't use {{HOSTNAME}:vfs.fs.size[/home,free].last(0)},
because it would be too specific and wouldn't work,
if in example the /opt - Partition and not the /home - Partition is the matter of the notification.
{ITEM.LASTVALUE} only shows the percentage.

If I would use a Trigger, which asks for the exactly free space, I won't have the percentage in the notification.

I am looking for a way to show percentage and exact free space of the partition, which was the matter of the trigger, in one notification.
So that it looks like:
PROBLEM - Low free disk space on *HOST* volume /home: 13 % (125 MB free)

I have to excuse my poor english, it's not my first language.

Thank you for your attention and efforts.

EDVler
04-11-2010, 11:53
I Solved this problem!

I used the same config like crazytux.

To display the Gigabyte in the notification i used the expression of a trigger. My notification look like this:

Additional Info:
{STATUS} - {TRIGGER.NAME}: {ITEM.LASTVALUE} ({DC-1:vfs.fs.size[c:,free].last(0)})

And the result of this look like this:

Low free % disk space on DC-1 volume c: OK

Date/Time: 2010.11.04, 11:42:39

Additional Info:
OK - Low free % disk space on DC-1 volume c: 8 % (3.26 GB)

I hope it helps those who need it.