0

I graph my server's RAM, CPU & bandwidth usage using MRTG. However, when I switch my server off, the RAM & CPU graphs do not display zero values. Instead, at the moment (see picture below) the CPU usage shows 1.1% and the RAM usage shows 67Mb.

I think that maybe this is because these are the last values that the server reported before going offline (although note the oddity on the RAM graph). I would like to fix this if this is case so that the MRTG graphs can accurately represent the time that the server is offline.

Any help with how to do this would be much appreciated. My server is running ESXi 6.5's built in snmp daemon.

MRTG Graphs Screenshot

  • 1
    How can MRTG even connect to your server if it's powered off? Does it respond to ping or anything? What's the output of a commandline SNMP query? – Lenniey Sep 26 '17 at 15:10
  • MRTG cannot connect to the server at all. The server will not respond to ping, it is unplugged so that not even IMPI is running. If you re-read, my assumption is that the values are the last ones reported from the server, but they are effectively cached by MRTG. – Sebastian King Sep 26 '17 at 18:33

1 Answers1

2

You need add to the target the optional keyword:

unknaszero - Log unknown data as zero instead of the default behaviour of repeating the last value seen. Be careful with this, often a flat line in the graph is much more obvious than a line at 0.

It's from MRTG documentation.

Mikhail Khirgiy
  • 2,003
  • 9
  • 7