Archive

Posts Tagged ‘Cacti’

Graphs screen stays blank after >0.8.7e/PA2.5 upgrade

November 21st, 2009 peter No comments

In the last weeks, i have been busy with doing some upgrades of CactiEZ 0.8.7c with PA2.2 to 0.8.7e with PA2.5. As always, at first sight everything seems to be OK when the upgrade has finished. But when you have a full blown Cacti server (with a lot of plugins and tweaks running), it can be different..

In some cases, the GRAPHS screen did stay blank when i clicked on the GRAPHS tab after the upgrade. The only thing i could do to see the graphs, was to click the TREE tab, resulting in showing up the graph tree on the left of the screen. Then i have to click on the appropriate graph in the tree to see it.

In a few words, i did the following to fix this problem (it’s not the most neat one:/)

1. Backup your Cacti files!
2. Download the official
Cacti 0.8.7e files
3. Overwrite the files in the ‘/var/www/html’ directory on your server with the official Cacti 0.8.7e files
4. Now overwrite the files in the ‘/var/www/html’ directory again with the 0.8.7e/PA2.5 files

Now some files have to be edited for Cacti to function correctly;

5. Edit /var/www/html/include/config.php

Go to rule number 30 and edit the following line;

$database_password = "change_this_to_your_dbpassword";

6. Edit /var/www/html/include/global.php

Add the plugins you have installed with the $plugins statements. You can get those from your backup files.

Now Cacti should operate normal again. When you click the GRAPHS tab, the main graph screen will show up again!

Categories: Cacti Tags:

Cacti TCP Port Template not working (nan)

September 17th, 2009 peter No comments

I was struggling with the TCP Port Template for Cacti. I installed the plugin, but the state of the monitored port stays 0 (nan) in the graph.

image

It seems that this problem is in the /var/www/html/scripts/tcp.php file. Modify lines 54 & 56 as follows;

  print "0";
} else {
  print "1";

in

  return "0";
} else {
  return "1";

This should fix the problem.

Categories: Cacti Tags:

CactiEZ 0.6 not graphing after time change

March 28th, 2009 peter 2 comments

Recently I did a fresh install of CactiEZ 0.6. After I changed the timezone and time (synced it to a NTP source), the graphs didn’t get filled anymore. Even the localhost graphs, which are installed by default, aren’t working anymore.

Here I do the sync with a NTP source;

[root@localhost /]# ntpdate pool.ntp.org
27 Mar 17:07:18 ntpdate[4602]: adjust time server 83.98.201.133 offset -0.025180 sec

After this, the graphs are not being filled anymore. At first seeing, I had no idea what caused this problem. So i decided to put the logging level of the poller in DEBUG mode to see what is going wrong. This can by done in the Cacti console via Settings > Poller Logging Level > DEBUG.

Now, when I do a poller cycle, the following output is generated;

[root@localhost /]# php /var/www/html/poller.php
03/27/2009 05:14:04 PM – POLLER: Poller[0] NOTE: Poller Int: ’60′, Cron Int: ’60′, Time Since Last: ‘-20937′, Max Runtime ’58′, Poller Runs: ’1′

03/27/2009 05:14:04 PM – POLLER: Poller[0] NOTE: Cron is configured to run too often!  The Poller Interval is ’60′ seconds, with a minimum Cron period of ’60′ seconds, but only -20937 seconds have passed since the poller last ran.

As you can see, the time since the last poll has passed is a negative number! Somewhere, there is a timestamp at which the poller can see that it must not run yet. But because the time has been changed, this timestamp is somewhere in the future.

To solve this problem, you have to run the poller mode in forced mode;

[root@localhost /]# php /var/www/html/poller.php –force

Now the poller start all over again with a new timestamp. You can see the timestamp is accurate when you launch the poller again;

[root@localhost /]# php /var/www/html/poller.php
03/27/2009 05:25:18 PM – POLLER: Poller[0] NOTE: Poller Int: ’60′, Cron Int: ’60′, Time Since Last: ’17′, Max Runtime ’58′, Poller Runs: ’1′

03/27/2009 05:25:18 PM – POLLER: Poller[0] NOTE: Cron is configured to run too often!  The Poller Interval is ’60′ seconds, with a minimum Cron period of ’60′ seconds, but only 17 seconds have passed since the poller last ran.

Categories: Cacti Tags: