Realtime (graph), v0.33

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I'll post modifications once I have them.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
laamidd
Posts: 48
Joined: Fri Feb 17, 2006 10:31 am

Post by laamidd »

Thanks Larry, really appreciate it.

Thanks,
Bob
jkstraw
Posts: 34
Joined: Tue Aug 01, 2006 10:24 am
Contact:

Post by jkstraw »

I am having issues getting this plugin to render graphs. All I am seeing is a broken image.

I have already checked the permissions on the /rra directory and they are okay (I even went the extra step and did the a+wx to make sure)

My apache logs are giving me this every time I attempt to use the plugin:

Code: Select all

PHP Warning:  main(include/global.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 27
PHP Warning:  main(): Failed opening 'include/global.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 27
PHP Notice:  Undefined variable:  config in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 28
PHP Warning:  main(/lib/poller.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/cd ../
PHP Warning:  main(): Failed opening '/lib/poller.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 28
PHP Notice:  Undefined variable:  config in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 29
PHP Warning:  main(/lib/data_query.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 29
PHP Warning:  main(): Failed opening '/lib/data_query.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 29
PHP Notice:  Undefined variable:  config in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 30
PHP Warning:  main(/lib/graph_export.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 30
PHP Warning:  main(): Failed opening '/lib/graph_export.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 30
PHP Notice:  Undefined variable:  config in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 31
PHP Warning:  main(/lib/rrd.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 31
PHP Warning:  main(): Failed opening '/lib/rrd.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 31
PHP Fatal error:  Call to undefined function:  read_config_option() in /var/www/html/cacti/plugins/realtime/poller_rt.php on line 98
Looking at those lines it is looking like a base_path issue but everything seems to check out (in reviewing my global.php).

Running 8.7b
Spine 8.7a
RHEL ES4 update 5 (64 bit)
AMD Opterons 64 bit

The following plugins are running correctly:

thold
monitor
reportit
weathermap
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok, all of those watching. I have revised the authors plugin to provide some assistance. I have labeled it 0.3 for now. I am still awaiting feedback from the author. Here are the new features and bug fixes:
-bug: Make compatible with Windows.
-bug: Remove excessive Cacti logging where it should not be.
-bug: Make the poller_id more random to handle multiple users.
-bug: Remove table modification code that was not required.
-bug: Move RRDfiles to their own directory.
-feature: Make the default step "5" to keep all graphs compatible with one another.
-feature: Allow the designation of default timespan and update intervals.
-feature: Resize window based upon actual image size.
-feature: Allow altering of the display window timespan.
-feature: Add a cache directory setting.
Still to do are the following:
-feature: Allow to work with the boost plugin
-feature: Automatically clean the cache folder
If you ran the prior version, you might want to run the following command from the MySQL prompt:

Code: Select all

mysql cacti
ALTER TABLE `host` DROP COLUMN `myplugin`;
quit;
Regards,

TheWitness
Attachments
realtime.tar.gz
(16.21 KiB) Downloaded 471 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

TheWitness,

Anything special we have to do to get this running on Windows? I installed your version (0.3) and it doesn't even look like the poller runs.

Thanks.

NetAdmin
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You have to goto Settings->Misc and setup the cache directory and then the Web Site account (typically 'apache') will need rwx access. As with other plugins, you need to grant yourself access first. What happens when you click the link under graphs?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

I did all those steps.. Even gave everyone full access to the cache directory, but there aren't any rrd files being placed in that directory. I don't think the poller is even running, as I should see the process running on the server, like I do when the 5 min poller runs.
Attachments
realtime.png
realtime.png (25.71 KiB) Viewed 10313 times
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

Interestingly enough, if I use the graph_image_rt.php and graph_popup_rt.php from version 0.2, I can at least see that the .rrd file is being created. Still displaying a red X, but certainly getting a lot farther than the version 0.3 files.
B-rad
Posts: 5
Joined: Fri Feb 15, 2008 7:29 pm

Post by B-rad »

I had that problem as well (windows) look for the url string /plugin/realtime/

I think I had to remove an extra backslash, I think you'll find its trying to load the image http://plugin/realtime/xxx


After I fixed that problem I still couldn't get any data showing, only a blank graph.
B-rad
Posts: 5
Joined: Fri Feb 15, 2008 7:29 pm

Post by B-rad »

Ok, it does work after fixing the url :D

Great plugin
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

Thanks B-rad! That was exactly the problem.

Removing the backslash in front of

Code: Select all

plugins/realtime/graph_image_rt.php?
in the graph_popup_rt.php file.

:D
User avatar
twelzy
Cacti User
Posts: 83
Joined: Wed Mar 30, 2005 6:48 pm
Location: BRAZIL/Brasilia

Post by twelzy »

Hi everybody!

I'm using the TheWitness' version of the Realtime Plugin and I'm still having the following errors on Apache's error_log file:

Code: Select all

PHP Warning:  main(include/global.php): failed to open stream: No such file or directory in /var/www/cacti/plugins/realtime/poller_rt.php on line 27
PHP Warning:  main(): Failed opening 'include/global.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/cacti/plugins/realtime/poller_rt.php on line 27
PHP Notice:  Undefined variable:  config in /var/www/cacti/plugins/realtime/poller_rt.php on line 28
PHP Warning:  main(/lib/poller.php): failed to open stream: No such file or directory in /var/www/cacti/plugins/realtime/poller_rt.php on line 28
PHP Warning:  main(): Failed opening '/lib/poller.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/cacti/plugins/realtime/poller_rt.php on line 28
PHP Notice:  Undefined variable:  config in /var/www/cacti/plugins/realtime/poller_rt.php on line 29
PHP Warning:  main(/lib/data_query.php): failed to open stream: No such file or directory in /var/www/cacti/plugins/realtime/poller_rt.php on line 29
PHP Warning:  main(): Failed opening '/lib/data_query.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/cacti/plugins/realtime/poller_rt.php on line 29
PHP Notice:  Undefined variable:  config in /var/www/cacti/plugins/realtime/poller_rt.php on line 30
PHP Warning:  main(/lib/graph_export.php): failed to open stream: No such file or directory in /var/www/cacti/plugins/realtime/poller_rt.php on line 30
PHP Warning:  main(): Failed opening '/lib/graph_export.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/cacti/plugins/realtime/poller_rt.php on line 30
PHP Notice:  Undefined variable:  config in /var/www/cacti/plugins/realtime/poller_rt.php on line 31
PHP Warning:  main(/lib/rrd.php): failed to open stream: No such file or directory in /var/www/cacti/plugins/realtime/poller_rt.php on line 31
PHP Warning:  main(): Failed opening '/lib/rrd.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/cacti/plugins/realtime/poller_rt.php on line 31
PHP Fatal error:  Call to undefined function:  read_config_option() in /var/www/cacti/plugins/realtime/poller_rt.php on line 96
ERROR: opening '/var/www/cacti/cache/realtime_13_5.rrd': No such file or directory
[/size]
(I gave full permission in the "cache" dir for the Apache's user...)

What am I doing wrong?!

Thanks in advance!
(And sorry for my poor English...)
Thanks in advance!
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
Jacek_nykis
Posts: 23
Joined: Fri Jul 20, 2007 10:24 am

Post by Jacek_nykis »

Hi all,

This plugin is really good idea in my opinion.
I installed it (one posted by TheWitness) unfortunately it does not work porperly.

After some debugging I noticed that two database queries (graph_image_rt.php:135 and graph_image_rt.php:162) do not return proper values.
Variable used in them ($local_graph_id) has correct value so it might be query which is wrong.

It would be great if you could take a look into this.

I am using cacti 0.8.7b under Ubuntu.
Please let me know if you need any more specific information.

Regards
Jacek
niobe
Cacti User
Posts: 228
Joined: Mon Mar 10, 2008 6:52 pm
Location: Australia

Post by niobe »

Jacek_nykis wrote: This plugin is really good idea in my opinion.
Second that, great idea. especially for the big NOC-style screen.
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I'll do another whack at this shortly. I am going to make the graph generation work with Ajax instead of page refreshes and attempt to capture some of the anomalies in the plugin. Not too much work. I like this plugins very much. Thanks to the author.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests