|
|
| Author |
Message |
txprog
Joined: 02 Apr 2008 Posts: 4
|
Posted: Thu Apr 03, 2008 3:57 am Post subject: Realtime (graph), v0.33 |
|
|
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
2/ Get the plugin attached to the post : http://forums.cacti.net/download.php?id=13431
3/ Extract him
| Code: | tar xzf realtime.tar.gz
cd ..
|
4/ Add plugin to your config by adding this to your include/config.php :
| Code: | | $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: | | 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 !
| Description: |
| Screenshot of realtime plugin |
|
| Filesize: |
92.03 KB |
| Viewed: |
14390 Time(s) |

|
| Description: |
| Realtime plugin, version 0.34 |
|
 Download |
| Filename: |
realtime-034.tar.gz |
| Filesize: |
35.7 KB |
| Downloaded: |
1339 Time(s) |
| Description: |
| Realtime plugin, version 0.33 |
|
 Download |
| Filename: |
realtime-033.tar.gz |
| Filesize: |
35.59 KB |
| Downloaded: |
211 Time(s) |
| Description: |
| Realtime plugin, version 0.32 |
|
 Download |
| Filename: |
realtime-032.tar.gz |
| Filesize: |
35.6 KB |
| Downloaded: |
113 Time(s) |
| Description: |
| Realtime plugin, version 0.31 |
|
 Download |
| Filename: |
realtime.tar.gz |
| Filesize: |
16.45 KB |
| Downloaded: |
130 Time(s) |
| Description: |
| Realtime plugin, version 0.2 |
|
 Download |
| Filename: |
realtime.tar.gz |
| Filesize: |
32.02 KB |
| Downloaded: |
350 Time(s) |
|
|
| Back to top |
|
 |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Fri Apr 04, 2008 1:51 am Post subject: Re: Realtime (graph), v0.2 |
|
|
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-
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9697 Location: MI, USA
|
Posted: Fri Apr 04, 2008 6:48 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9697 Location: MI, USA
|
Posted: Fri Apr 04, 2008 6:58 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Fri Apr 04, 2008 8:30 am Post subject: |
|
|
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-
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9697 Location: MI, USA
|
Posted: Fri Apr 04, 2008 12:49 pm Post subject: |
|
|
I am thinking to make the boost server more flexible and adapt it for this purpose. I'm just blown away.
Larry
|
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Fri Apr 04, 2008 12:56 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Fri Apr 04, 2008 11:56 pm Post subject: |
|
|
| 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-
|
|
| Back to top |
|
 |
txprog
Joined: 02 Apr 2008 Posts: 4
|
Posted: Sat Apr 05, 2008 3:55 am Post subject: |
|
|
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;
|
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Sat Apr 05, 2008 7:39 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9697 Location: MI, USA
|
Posted: Sat Apr 05, 2008 11:41 am Post subject: |
|
|
| 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
|
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Sat Apr 05, 2008 2:01 pm Post subject: |
|
|
| 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...
|
|
| Back to top |
|
 |
laamidd
Joined: 17 Feb 2006 Posts: 48
|
Posted: Mon Apr 07, 2008 2:10 pm Post subject: |
|
|
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/realtime/graph_image_rt.php?local_graph_id=469&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
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9697 Location: MI, USA
|
Posted: Mon Apr 07, 2008 2:45 pm Post subject: |
|
|
I can say that it is not working on Windows at this time. I am looking into this sometime tonight.
TheWitness
|
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 978
|
Posted: Mon Apr 07, 2008 2:53 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|