Realtime (graph), v0.33

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
txprog
Posts: 4
Joined: Wed Apr 02, 2008 11:05 am

Realtime (graph), v0.33

Post by txprog »

Hi everyone,

Realtime is a plugin to view a graph as a "realtime" graph.
Check interval can be down to 5 seconds ! For more information, check the "How it works" section :)

(the old path http://forums.cacti.net/viewtopic.php?p=131456#131456 is deprecated, use this plugin instead)

Enjoy,

Mathieu.

Installation
1/ Go to your plugins cacti installation

Code: Select all

cd cacti/plugins/
2/ Get the plugin attached to the post : http://forums.cacti.net/download.php?id=13431
3/ Extract him

Code: Select all

tar xzf realtime.tar.gz
cd ..
4/ Add plugin to your config by adding this to your include/config.php :

Code: Select all

$plugins[] = 'realtime';
5/ Goto Settings->Misc and configure the cache directory and other settings.
6/ Make sure that web user can write to the cache directory :

Code: Select all

chmod a+wx /var/www/html/cacti/rcache
How it works
When you want to view a graph in realtime, each call of the page launch a special realtime poller for current graph.
Poller identify which data source is needed for the graph and create all rra identified by the refresh interval + local_graph_id.
After the execution of the poller, the graph is updated :)

FAQ
1/ I've some blank in my graph with snmp value !
It's normal. Some module on snmpd cache hard data, to prevent flooding. As exemple, IF traffic is updated only each 10s. If you try a smaller interval, graph will have blank.

2/ My graph don't show anything !
Make sure that web user can write to rra directory !
Attachments
realtime-034.tar.gz
Realtime plugin, version 0.34
(35.7 KiB) Downloaded 6670 times
realtime-033.tar.gz
Realtime plugin, version 0.33
(35.59 KiB) Downloaded 930 times
realtime-032.tar.gz
Realtime plugin, version 0.32
(35.6 KiB) Downloaded 762 times
realtime.tar.gz
Realtime plugin, version 0.31
(16.45 KiB) Downloaded 855 times
Screenshot of realtime plugin
Screenshot of realtime plugin
cacti-0.8.7a-realtime.png (92.03 KiB) Viewed 73518 times
realtime.tar.gz
Realtime plugin, version 0.2
(32.02 KiB) Downloaded 1121 times
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Realtime (graph), v0.2

Post by browniebraun »

Hi txprog!
I took a short look at your lovely plugin and IMO it looks really great.

But I've also some suggestions:
At first you shouldn't create new RRDs in the RRA folder. I would suggest to use a separate one, because most of the Cacti admins (me too) won't agree to your requirements of write permissions for the apache.
You forgot to remove the .swp files. This could confuse sb., maybe.
The window size of the popup should be variable to avoid scrollbars.
Using png instead of gif for your monitor icon entails that the transparent background doesn't work with IE6. In this case it will be white.
I can replace it if you like.

Last but not least this plugin is a real big-time. Hats off!


Best regards
-Andreas-
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Dude, very nice. I guess the whole "where does the RRD go, could be a problem". Sounds like something like the boost service would be great for something like this. It would have to be adapted thought.

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?
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I would like to request the following two changes now that you are on it.

1) Allow the default interval time to be saved in a cookie
2) Make the graph time range dynamic so that you up to a certain time period, selectable from a drop down, and then have it slide with the updates.

For example, say you default update is every 5 seconds and your floating window is 1 minute. So, for the first 6 intervals, the graph would have a start time of -5, -10, -15, ..., and then from after that time, it will only show the last minute.

Then from the dropdown, you could either shift left or right, use a modified timeshift, timespan selector. When shifted, the RRD would still update, but you would only see that date range.

Very excellent.

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?
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Yep, you can also take a look at Reinhard's Timeshifter.

I've seen that Realtime creates a lot of new RRD files (one for every choosen step), so maybe it would be good to think about an automatic clean-up via the poller_bottom hook for example.

Best regards
-Andreas-
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I am thinking to make the boost server more flexible and adapt it for this purpose. I'm just blown away.

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?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

I also like the look of this plugin, but for some strange reason, I couldn't get it to work....

The popup window appears, the drop-down works, and so does the timer, but I get a red cross where the image is supposed to be. Security is not an issue, as the account that runs the poller etc has full control on the RRA directory (Windows). I also see the poller running correctly in the log.

Any ideas as to what I'm missing ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

mcutting wrote:I also like the look of this plugin, but for some strange reason, I couldn't get it to work....

The popup window appears, the drop-down works, and so does the timer, but I get a red cross where the image is supposed to be. Security is not an issue, as the account that runs the poller etc has full control on the RRA directory (Windows). I also see the poller running correctly in the log.

Any ideas as to what I'm missing ?

Thanks
The web user needs write access to the RRA folder (and that's a security hole).

Best regards
-Andreas-
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
txprog
Posts: 4
Joined: Wed Apr 02, 2008 11:05 am

Post by txprog »

Thank for all,

Yes, it's not good to save temporary rra in the same folder as actual rra :)
I'll manage to move the rra in a temporary folder.
And i'll change some ui as The Witness said :)

++tito;
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Andreas - Thanks, although the apache service account (I run WAMP under Windows) already has the required rights to the RRA folder.

Txprog - Any ideas ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

mcutting wrote:Andreas - Thanks, although the apache service account (I run WAMP under Windows) already has the required rights to the RRA folder.

Txprog - Any ideas ?

Thanks
As BSOD2600 would say, use "Filemon" and see where the permissions are being clobbered.

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?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

TheWitness wrote:
mcutting wrote:Andreas - Thanks, although the apache service account (I run WAMP under Windows) already has the required rights to the RRA folder.

Txprog - Any ideas ?

Thanks
As BSOD2600 would say, use "Filemon" and see where the permissions are being clobbered.

TheWitness
Thanks Larry. However, even with "EVERYONE\Full Control", this is still happening...
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
laamidd
Posts: 48
Joined: Fri Feb 17, 2006 10:31 am

Post by laamidd »

Hey guys,

I'd love to get this going, but I'm not a programmer and I have no clue where to start.

Cacti Version 0.8.7b
Cacti OS win32
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.5


I'm having a problem where when I click on the realtime icon next to my graph, I get the pop up window with the image icon. The icon changes from solid to broken and I never see a graph.

I right clicked on the image icon and got this:

http://10.6.184.106/cacti/plugins/realt ... ds_step=15

The graph id is correct and it's the built in graph template for traffic/bytes with bandwidth.

I ran poller_rt.php from the command line and got:

D:\cacti8.7b\plugins\realtime>php poller_rt.php
PHP Warning: include(include/global.php): failed to open stream: No such file or directory in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 27
PHP Warning: include(): Failed opening 'include/global.php' for inclusion (include_path='.;C:\php5\pear') in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 27
PHP Notice: Undefined variable: config in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 28
PHP Warning: include_once(/lib/poller.php): failed to open stream: No such file or directory in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 28
PHP Warning: include_once(): Failed opening '/lib/poller.php' for inclusion (include_path='.;C:\php5\pear') in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 28
PHP Notice: Undefined variable: config in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 29
PHP Warning: include_once(/lib/data_query.php): failed to open stream: No such file or directory in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 29
PHP Warning: include_once(): Failed opening '/lib/data_query.php' for inclusion (include_path='.;C:\php5\pear') in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 29
PHP Notice: Undefined variable: config in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 30
PHP Warning: include_once(/lib/graph_export.php): failed to open stream: No such file or directory in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 30
PHP Warning: include_once(): Failed opening '/lib/graph_export.php' for inclusion (include_path='.;C:\php5\pear') in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 30
PHP Notice: Undefined variable: config in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 31
PHP Warning: include_once(/lib/rrd.php): failed to open stream: No such file or directory in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 31
PHP Warning: include_once(): Failed opening '/lib/rrd.php' for inclusion (include_path='.;C:\php5\pear') in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 31
ERROR: No --graph=ID specified

PHP Fatal error: Call to undefined function db_fetch_cell() in D:\cacti8.7b\plugins\realtime\poller_rt.php on line 147

My cacti lives at http://hostname/cacti and I have this in my global.php:
$config['url_path'] = '/cacti/';

I imported the .sql file after placing the realtime directory in plugins and enabling it in global.php because the table for poller_output_rt didn't exist/wasn't created I guess.

Any ideas?

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

Post by TheWitness »

I can say that it is not working on Windows at this time. I am looking into this sometime tonight.

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?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Thanks Larry - at least it wasn't me going nuts...

If you'd like me to test, PM me - my time zone is BST (UK based)

Regds
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests