gadgets slowing nagvis down

This forum was archived to /woltlab and is now in read-only mode.
  • Hi there,

    have used Nagios and Nagvis in a web-based SCADA-system, to monitor states annd values from various technical objects. Everything was fine until I have started to use more gadgets.

    For some reason each simple gadget takes a few hundred ms to create and transfer, even if they usually produce the same simple images (bullets in 3 colors for example). Adding a screenshot with inspect network shown - does it rings a bell for someone, what could be the reason for unbearable sluggishness of this page? The image-producing part of the gadgets is below:

    if($state == 'OK') {

    echo "<img src='images/yellow_dot.gif' width='50%' height='50%' title='$title'/>";

    } elseif($state == 'WARNING') {

    echo "<img src='images/green_dot.gif' width='50%' height='50%' title='$title'/>";

    } else {

    echo "<img src='images/red_dot.gif' width='50%' height='50%' title='$title'/>";


    the same server is running nagios3 (taking 8...80% of cpu) - could it be that the server is simply overloaded or is there also something I could do with the gadgets?

    top - 14:30:29 up 255 days, 14:38, 2 users, load average: 2.08, 2.46, 2.53

    Tasks: 148 total, 11 running, 137 sleeping, 0 stopped, 0 zombie

    %Cpu(s): 4.0 us, 22.8 sy, 9.7 ni, 63.1 id, 0.2 wa, 0.0 hi, 0.2 si, 0.0 st

    KiB Mem: 4048188 total, 3165396 used, 882792 free, 171740 buffers

    KiB Swap: 0 total, 0 used, 0 free. 1942488 cached Mem

  • It's hard to tell so just a few hints/guesses (please take a look at the chapter "Optimization tips" from the documentation as well):

    - Nagios 3 (and equivalent monitoring cores) make use of just one core so if you have things blocking it (e.g. notifications) other processes retrieving information will wait

    - try using a RAM disk for temporary data like status.dat and objects.cache which are processed very often

    - the same might apply to Apache as you mentioned the objects created by the gadgets (e.g. copying the images to a RAM disk during Apache startup)