1

So, I am using Zabbix to monitor my server. At / file system I have 63 GB free. So I wanted to fake a huge file on that directory to see if the Zabbix graphs would correctly show that the used space had increased. So I ran this :

cd / && sudo fallocate -l 50000000000 archivogrande.txt

Which is working correctly and creating a file of approximately 50 GB. Unfortunately, Zabbix graph does not get updated. I can still see that there is 63 Gb free when actually it should say 17. The graph is getting updated every 10 seconds by the way.

So, my question is, regardless of what Zabbix might or might not doing wrong here, is my command actually doing what I expected? Would monitoring software correctly see the increase in used space, even if its not a "real" file?

Matias Barrios
  • 213
  • 3
  • 12
  • What does `df -h` say? If you look at the item history in Zabbix, does it get new values? – Richlv May 02 '18 at 18:42
  • @Richlv df -h returns the right size for the file. I did not check the history ill do – Matias Barrios May 02 '18 at 19:27
  • Hmm, `df` is not supposed to show size of a single file usually. Could you please clarify what you are seeing? – Richlv May 02 '18 at 22:30
  • @Richlv yes, i ran df -h and i can see the free available space on the hard drive has decreased as expected. also, i ran ls-lh and i can see the file being ALMOST 50 gb – Matias Barrios May 03 '18 at 21:43
  • What is the item key your are using? If you query the agent using `zabbix_get` for that key, what is returned? – Richlv May 08 '18 at 12:56
  • when I run zabbix_get I get command not found. And I cant install it through apt because although I added all the necessary repos the package is never found :( – Matias Barrios May 08 '18 at 13:30
  • The package name is zabbix-get, the command name is zabbix_get. If you still can't find it, add the zabbix repo and it should do the trick. – SBO Jul 12 '18 at 13:12

1 Answers1

0

to answer your question - yes fallocate command is actually doing what you think it is - you are occupying about ~50 GB of space by the file you created.

Your zabbix-agent binary should be able to detect the space has decreased and alert you that free space is bellow 10% if you're using the correct item and trigger and the monitoring is working OK.

Since this is not the case please verify:

look at the logs of server and agent to figure out what's wrong.

Roman Spiak
  • 583
  • 3
  • 11