(topic closed) ZOND plugin v0.32 released (beta)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

klr0514 wrote:So when I say they don't work, all numbers are 0 for an extended period of time (let's say 30 minutes). Cacti is updating the main graph with data and I can verify the IOS counters on the interface, but ZOND does not seem to report this. The graphs that are working are behaving exactly as you mentioned. The data is reported in bursts and has to be divided by 30 to make it work correctly. I am running Linux CentOS 4.3. It is just really strange that older graphs with the same template do not work, but newer graphs will.

.
ok, I managed to find-out some things.

Here's the response from ucd-snmp mailing lists about the caching problems:
The 5.x line introduced a simple build-in cache for interface statistics,
on a per-architecture basis. This is hard-coded into these early versions.
More recently, there has been a major re-write of the IF-MIB and related
groups. This includes making the timeout behaviour much more flexible.

It is now possible to set the cache timeout dynamically (for each group
individually), flush a specific cache, or flush *all* caches. This is
also common across all supported architectures, rather than being
hardcoded into particular O/S's


We suggest you try with the most recent release of the software (5.4.1).
ABX
Cacti User
Posts: 68
Joined: Thu Mar 01, 2007 5:55 am

Post by ABX »

My Zond plugin just stopped working. :(
How can I start the debug?


---------------------------------------------------------

Forget about it, Java just got FUBAR.

Stupid Group policy.
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

ABX wrote:My Zond plugin just stopped working. :(
How can I start the debug?


---------------------------------------------------------

Forget about it, Java just got FUBAR.

Stupid Group policy.
well, you must have possibly performed some upgrades or other configuration changes to the system?

read my first post here:
http://forums.cacti.net/viewtopic.php?t ... 637d17fd51
Marcelo
Posts: 48
Joined: Tue May 02, 2006 4:46 pm

Post by Marcelo »

I can't see the little icon of zond next to zoom button...any clue?

Cacti Version: 0.8.6j with patches (http://cacti.net/download_patches.php)
PHP 5.1.2


PS: I cannot either see the icon of plugin telnet (http://cactiusers.org/forums/topic963.html) if the info is usefull.

Thanks in advance.
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

Marcelo wrote:I can't see the little icon of zond next to zoom button...any clue?

Cacti Version: 0.8.6j with patches (http://cacti.net/download_patches.php)
PHP 5.1.2


PS: I cannot either see the icon of plugin telnet (http://cactiusers.org/forums/topic963.html) if the info is usefull.

Thanks in advance.
before proceeding futher, please try read plugin installation manual:
http://www.debianhelp.co.uk/cactipluginsarch.htm

if you fail - submit details about your system here as well as logs, screenshots etc., and maybe community will help.
eegilbert
Posts: 10
Joined: Thu Sep 21, 2006 2:10 pm

netzond class not found

Post by eegilbert »

Hi, I read through this entire post and I did see a small thread where someone also couldn't find the netzond.class file. I've tried Sun's JDK 1.6, JRE 1.6 and JRE 1.5 for my browser VM but none of these work. In fact, the 1.6 version freezes on my system when I click the zond window. I have to kill the apache process. If I use JRE 1.5 I just get a little red X and a note at the bottom saying applet failed to initialize. I've attached a screen cap of this.

Java Debug:


load: class ./netzond.class not found.
java.lang.ClassNotFoundException: ..netzond.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:168)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:599)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:721)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1804)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:650)
at sun.applet.AppletPanel.run(AppletPanel.java:324)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:271)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:158)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:155)
... 9 more

John's command line debugging:

php zond_init.php 1230

<HTML>
<HEAD>
<TITLE>Localhost - BIND 9 0.0.127.in-addr Statistics</TITLE>
</HEAD>
<SCRIPT LANGUAGE=javascript>
function resize_window(w,h) {
var refresh=2;
var wW = screen.width;
var wH = screen.height;

while (1) {

if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
var ww = document.body.clientWidth;
var wh = document.body.clientHeight;
} else {
var ww = window.innerWidth;
var wh = window.innerHeight;
}

var diff_w = Math.round((w - ww)/refresh);
var diff_h = Math.round((h - wh)/refresh);

if (diff_w <1 && diff_h <1) {
self.resizeBy(diff_w,diff_h);
self.moveTo((wW-ww)/2,(wH-wh)/2);
return;
}

self.moveTo((wW-ww)/2,(wH-wh)/2);
self.resizeBy(diff_w,diff_h);
}
}
</SCRIPT>
<BODY onLoad="resize_window(600,246)" style='background-color:#F9F9F9;margin:0'>
<APPLET id = 'applet' codebase='http://H_O_S_Thttps://REMOVED/cacti/plugins/zond/' code='./netzond.class' width=600 height=246'>
<PARAM name='dataParams' value='time,time,mm:ss,,'>
<PARAM name='SWParams' value=',1000,2,true,false,100,true,0,3'>
<PARAM name='outerParams' value='1,1,Courier New,8,8,8,Localhost - BIND 9 0.0.127.in-addr Statistics,,,,queries per 5 minutes,netzond,true,1500,http://H_O_S_Thttps://REMOVED/cacti/plugins/zond/zond_process.php?s_i_d=536e7f64861841dd4fd34124a1e97dd4&tasks=OjpzdWNjZXM3OiIzNDA4NzOjpsb2NhbGhvc3Rfc3YTo1OntzOjVjY2Vzc18xMzk1IjthOjoxOiIzIjtzdHlwZSI7czOjY6Im1ldGhvZCI7czoxQ6e3M6NDoiOiIwIjtzOjU6InF1ZXJ5c3Qgbm90NHJsb2NhbGhvB1YmxpYyAuMS4zLjYuMSIjtzOjU4Oi40LjEuMjAyMS41NS4zLjtzOjQ6ImNkdD0yMDAwIjZWYiO3M6NzoiYSwzMDAsUgMyB2PTEgKiI7fXM6Mzc6IjM0MDk6aG9zdF9zdWU6OmxvY2FsNjZXNzXzEzOTUiO2E6NDOmZhaWx1cmp7czo0OiJ0eXBlIjtzOj9kIjtzOjE6NjoibWV0aGIjAiO3M6NToicXVlcnkiE6IjMiO3M6O3M6NTg6ImxvY2FsaG9zLjMuNi4xLjVibGljIC4xQuMS4yMDIxLjU1LjQuNSdCBub3Q0cHAzIHY9MSB0PTIwMDAiO3JiLDMwMCwqZiI7czo3OiIjt9czozODoiMzQxMDo6M6NDoiY2Rlbnhkb21haW46OmxvY2FsOTUiO2E6NDNjZXNzXzEzp7czo0OiJ0eXBlIjtzOjaG9zdF9zdWE6IjMiO3M6NjoibWV0aGoicXVlcnkiIjAiO3M6NTO3M6NTg6ImxvY2FsaG9z9kIjtzOjE6dCBub3Q0cHVibGljIC4xLjU1LjUuNSQuMS4yMDIxAzIHY9MSB0PTIwMDAiO3LjMuNi4xLjM6NDoiY2RlZiI7czo3OiJQUklOVCI7Ijt9czo1OiYTozOntpOjA7czoxOiJhJjLDMwMCwqIjtpOjE7czoxOiJiIjtpOiJNQVAiO2JjIjt9czozE6Mzp7czozNzoiMzQwODOjI7czoxOio6c3VjY2Vzczo6bG9jYWM5NSI7czoxY2Nlc3NfMTOiJhIjtzOjM3OiIzNDA5xob3N0X3N1OjpmYWlsdXJlOjpsb2NhMzk1IjtzOjVjY2Vzc18xE6ImIiO3M6Mzg6IjM0MTbGhvc3Rfc3A6Om54ZG9tYWluOjpsb2c3VjY2Vzc1NhbGhvc3Rf8xMzk1IjtzOjE6ImMiO319'>
<PARAM name='innerParams' value='2,5,5,40,10,40,10,0,-1,false,true,false,false,solid,1,6,1,static,false'>
<PARAM name='colorParams' value='208,208,208;240,240,240;232,232,232;245,202,202;0,0,0;255,255,255;0,207,0;255,0,0;255,96,68'>
<PARAM name='objcolsParams' value='0,0,1,1,4,2,3,0,4,4,4,4,4,5,5,4'>
<PARAM name='swString' value='0,line,6,6,255,true,true,Successful Queries,true,true,solid,1,false,false,false;1,line,7,7,255,true,true,Failed Queries,true,true,solid,1,false,false,false;2,line,8,8,255,true,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OjVjY2Vzc18xE6ImIiO3M6Mzg6IjM0MTbGhvc3Rfc3A6Om54ZG9tYWluOjpsb2c3VjY2Vzc1NhbGhvc3Rf8xMzk1IjtzOjE6ImMiO319

At this point though i never get anything back. The command just sits there indefinitely. Any thoughts?
Attachments
this is using JRE 1.5 on Gentoo Linux with Apache 2.0.58 and PHP 5.2.4
this is using JRE 1.5 on Gentoo Linux with Apache 2.0.58 and PHP 5.2.4
applet_failed.png (20.57 KiB) Viewed 4752 times
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: netzond class not found

Post by johnrembo »

eegilbert wrote:Hi, I read through this entire post and I did see a small thread where someone also couldn't find the netzond.class file. I've tried Sun's JDK 1.6, JRE 1.6 and JRE 1.5 for my browser VM but none of these work. In fact, the 1.6 version freezes on my system when I click the zond window. I have to kill the apache process. If I use JRE 1.5 I just get a little red X and a note at the bottom saying applet failed to initialize. I've attached a screen cap of this.

Java Debug:

(...)

At this point though i never get anything back. The command just sits there indefinitely. Any thoughts?
firstly, I would like you to check if the line
$config['url_path']='' is present in include/config.php

if yes - it should not contain any urls - for example if your cacti is at http://myhost/cacti, then find a row
$config = array();
at config.php and add
$config['url_path']='/cacti/' at the next line.

after setting this correctly, try debug zond plugin once again to be sure that no more records like
http://H_O_S_Thttps://REMOVED/cacti/plugins/zond/zond_process.php?s_i_d=536e7f6486184
are returned by the script - this row is the cause of your problems.


now, about zond_process.php problem - there has allready been a discussion on retrieving script commands it executes.

to sum up:
open zond_process.php with an editor,
uncomment line 55
//print_r($req);die;
run
php zond_process.php xxxxx
see an output:
(...)
[query] => perl /opt/cacti/scripts/linux_memory.pl MemFree:
(...)
if you are able to find [query] and able to run
perl /opt/cacti/scripts/linux_memory.pl MemFree:
- it should all work fine, otherwise - paste array it returns here (you can change snmp passwords if necesary)
eegilbert
Posts: 10
Joined: Thu Sep 21, 2006 2:10 pm

Post by eegilbert »

Hi John,

scratchy zond # php zond_process.php YTo0OntzOjQwOiI4NDo6bWVtX2J1ZmZlcnM6OmxvY2FsaG9zdF9tZW1fYnVmZmVyc18zIjthOjQ6e3M6NT
oibWF0Y2giO3M6OToia2lsb2J5dGVzIjtzOjQ6InR5cGUiO3M6MToiMSI7czo2OiJtZXRob2QiO3M6MToiMSI7czo1OiJxdWVyeSI7czo2OToicGVybCAvdmFyL3d3dy9sb2NhbGhvc3QvaHRkb2NzL2NhY3RpL3NjcmlwdHMvbGludXhfbWVtb3J5LnBsIE1lbUZyZWU6Ijt9czozNDoiODU6Om1lbV9zd2FwOjpsb2NhbGhvc3RfbWVtX3N3YXBfNCI7YTo0OntzOjU6Im1hdGNoIjtzOjk6ImtpbG9ieXRlcyI7czo0OiJ0eXBlIjtzOjE6IjEiO3M6NjoibWV0aG9kIjtzOjE6IjEiO3M6NToicXVlcnkiO3M6NzA6InBlcmwgL3Zhci93d3cvbG9jYWxob3N0L2h0ZG9jcy9jYWN0aS9zY3JpcHRzL2xpbnV4X21lbW9yeS5wbCBTd2FwRnJlZToiO31zOjU6IlBSSU5UIjthOjI6e2k6MDtzOjE6ImEiO2k6MTtzOjE6ImIiO31zOjM6Ik1BUCI7YToyOntzOjQwOiI4NDo6bWVtX2J1ZmZlcnM6OmxvY2FsaG9zdF9tZW1fYnVmZmVyc18zIjtzOjE6ImEiO3M6MzQ6Ijg1OjptZW1fc3dhcDo6bG9jYWxob3N0X21lbV9zd2FwXzQiO3M6MToiYiI7fX0
Array
(
[84::mem_buffers::localhost_mem_buffers_3] => Array
(
[match] => kilobytes
[type] => 1
[method] => 1
[query] => perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl MemFree:
)

[85::mem_swap::localhost_mem_swap_4] => Array
(
[match] => kilobytes
[type] => 1
[method] => 1
[query] => perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl SwapFree:
)

[PRINT] => Array
(
[0] => a
[1] => b
)

[MAP] => Array
(
[84::mem_buffers::localhost_mem_buffers_3] => a
[85::mem_swap::localhost_mem_swap_4] => b
)

)

scratchy zond # perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl MemFree:

returns a value (which of course varies depending on what's going on in my system)

I still get the applet failing to initialize as before but I did correct the URL in the include/config.php

If I view the page source of the applet window, and then copy the URL as mentioned by you in a previous post, i get the values for
Attachments
URL from applet window page source
URL from applet window page source
cacti.png (42.13 KiB) Viewed 4707 times
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

I still get the applet failing to initialize as before but I did correct the URL in the include/config.php

If I view the page source of the applet window, and then copy the URL as mentioned by you in a previous post, i get the values for
ok, half of problem is sovled.

now, could you please check you web servers logs - I am wondering what it tells when you click zond button.

ps: you could play with zond-security settings. As far as I saw you are using https - try enter https username and password under zond settings.
[/quote]
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

..... again problems...

Post by zorrosam »

Sorry but i have problem with network interfaces graphs .... again .... but on many others zond works perfectly ....

any idea?

sam
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: ..... again problems...

Post by johnrembo »

zorrosam wrote:Sorry but i have problem with network interfaces graphs .... again .... but on many others zond works perfectly ....

any idea?

sam
you have allready mentioned this problem, but, also, it would be very nice to have more details on this subject, because "problem with network interfaces graphs" is to abstract.

are you experiencing gaps in graphs? are charts refreshing only every 30 seconds or event more rare?

i am currently working on graph template support in zond(95% finished), next step will be ucd-snmp 5.4 testing (5.1, 5.2 have problems with update intervals on some machines).
eegilbert
Posts: 10
Joined: Thu Sep 21, 2006 2:10 pm

SOLVED

Post by eegilbert »

johnrembo wrote:
I still get the applet failing to initialize as before but I did correct the URL in the include/config.php

If I view the page source of the applet window, and then copy the URL as mentioned by you in a previous post, i get the values for
ok, half of problem is sovled.

now, could you please check you web servers logs - I am wondering what it tells when you click zond button.

ps: you could play with zond-security settings. As far as I saw you are using https - try enter https username and password under zond settings.
[/quote]

Hi John,

The web server logs show:

192.168.1.67 - - [06/Sep/2007:09:20:24 -0700] "GET /cacti/plugins/zond/zond_init.php?lgid=1&s_i_d=a95a87f488d547840d56d99
c53eab7de HTTP/1.1" 200 2696

With nothing in the error log. I tried this via HTTPS and normal HTTP but I get the same entry in the log files.

As far as the security settings for the plugin, I've tried adding the account name and password I log in with, but I get the same messages.

--------Solved-------------

Hi, after thinking about this some more, I realized it was indeed a path issue. I manually diffed each file in my install with the src packages:

scratchy zond # diff /var/www/localhost/htdocs/cacti/plugins/zond/zond_init.php zond_init.php
431c431
< <APPLET id = 'applet' codebase='".$path."' code='./netzond.class' width=$width height=$height'>
---
> <APPLET id = 'applet' codebase='".$path."' code='netzond.class' width=$width height=$height'>

Little typos make a huge difference! I had modified zond_init.php when I first installed this a week ago while troubleshooting before I posted here. Anyways, the JAVA console wasn't lying, it couldn't find netzond.class.

Thanks for the help John!
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

Re: ..... again problems...

Post by zorrosam »

zorrosam wrote:Sorry but i have problem with network interfaces graphs .... again .... but on many others zond works perfectly ....

any idea?

sam

the problem is on the default interface traffic template .... the xml ... is the unique the has problem ... but will be very useful ....

please help me ...

sam
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: ..... again problems...

Post by johnrembo »

zorrosam wrote:
zorrosam wrote:Sorry but i have problem with network interfaces graphs .... again .... but on many others zond works perfectly ....

any idea?

sam

the problem is on the default interface traffic template .... the xml ... is the unique the has problem ... but will be very useful ....

please help me ...

sam
As I have allready mentioned above - this might be realated with snmp-daemon, not zond plug-in.
cbrmig
Posts: 14
Joined: Mon Sep 24, 2007 5:02 am

Re: ZOND plugin v0.32 released (beta)

Post by cbrmig »

johnrembo wrote:Everybody,

one more version of ZOND plug-in (with lot of internal changes).

This plug-in allows you to see real-time (live) charts with refresh interval of several seconds and less.

requirements:
java virtual machine compatible browser (tested with Internet Explorer 6/7,FireFox 1.5,2.0)

java runtime (1.5, 1.6) http://www.java.com/en/

some screenshots (note time scale - minutes:seconds) :

Image

Image

Image

Image

Image

Image

Install it like any toher plug-in. Don't forget to enable "ZOND button next to charts" for your user (or guest) under "User Management" as displayed in 3rd screenshot.

I am looking forward for your collaboration in catching-out all the bugs.

Please also share your suggestions on this thing - what features you find annoying, what other functionalities you'd like to see etc....

I already do all this, but the ZOND button is still missing in the graphs area.
I have the cacti EZ installed, mysql, php, Java 1.5..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest