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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Mika2006
Cacti User
Posts: 178
Joined: Thu May 03, 2007 2:25 am

Post by Mika2006 »

you have released a new version?
with changelog?
|Cacti Version - 0.8.6j||Plugin Architecture - 1.1||Poller Type - CMD.php|
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

Mika2006 wrote:sorry for double post but the forum have problem

Code: Select all

Exception in thread "AWT-EventQueue-7" 
java.lang.NumberFormatException: For input string: "Content-type: text/html"
	at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
	at java.lang.Double.parseDouble(Unknown Source)
	at netzond.a(Unknown Source)
	at netzond.paint(Unknown Source)
	at netzond.update(Unknown Source)
	at sun.awt.RepaintArea.updateComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
ok, somewhy zond_process.php isn't returning data to the applet.

when a blank window appears - open it's source (ctrl+U) and look for the line
<PARAM name='outerParams' .....
That line will contain a very long URL, which should look like:
try open that hyperlink with your browser and paste the output here.


alternatively, you can debug the same problem from command line.
1. wirte down local_graph_id of the graph that can't be zonded (like "25068")
2. go to zond plugin folder and type:

Code: Select all

php zond_init.php 25068
3. Copy the long hyperlink i have described above, but not all - only the encoded part of it (YTozOjQ4.........HfdnA==)
4.

Code: Select all

php zond_process.php YTozOjQ4.....
5. paste the output here
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

Mika2006 wrote:you have released a new version?
with changelog?
yes, i've corrected some errors, but it is still in testing (alpha) mode.
no major changes have been made. download it and try.
hgd26
Posts: 25
Joined: Fri Oct 06, 2006 5:36 am

Post by hgd26 »

Data Template: Interface - Traffic
Data Source Item: traffic_in , traffic_out
Graph Template: Interface - Traffic (bits/sec, Total Bandwidth)

Code: Select all

Java Plug-in 1.6.0_01
Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM


netZOND charting applet v 1.02
Author johnrembo (aka johnrembo@netzond.com)

Exception in thread "AWT-EventQueue-2" java.lang.NumberFormatException: For input string: "unknown variable type []!"
	at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
	at java.lang.Double.parseDouble(Unknown Source)
	at netzond.a(Unknown Source)
	at netzond.paint(Unknown Source)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-2" java.lang.NumberFormatException: For input string: "unknown variable type []!"
	at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
	at java.lang.Double.parseDouble(Unknown Source)
	at netzond.a(Unknown Source)
	at netzond.paint(Unknown Source)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

hgd26 wrote:Data Template: Interface - Traffic
Data Source Item: traffic_in , traffic_out
Graph Template: Interface - Traffic (bits/sec, Total Bandwidth)

Code: Select all

Java Plug-in 1.6.0_01
Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM


netZOND charting applet v 1.02
Author johnrembo (aka johnrembo@netzond.com)

Exception in thread "AWT-EventQueue-2" java.lang.NumberFormatException: For input string: "unknown variable type []!"
	at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
	at java.lang.Double.parseDouble(Unknown Source)
	at netzond.a(Unknown Source)
	at netzond.paint(Unknown Source)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-2" java.lang.NumberFormatException: For input string: "unknown variable type []!"
	at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
	at java.lang.Double.parseDouble(Unknown Source)
	at netzond.a(Unknown Source)
	at netzond.paint(Unknown Source)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
can you show me a zond window html source?
thnx
hgd26
Posts: 25
Joined: Fri Oct 06, 2006 5:36 am

Post by hgd26 »

johnrembo wrote:
can you show me a zond window html source?
thnx

Code: Select all


<HTML>
 <HEAD>
    <TITLE>"172.16.100.001 - Traffic - 172.16.100.1 (eth0)"</TITLE>
 </HEAD>
 <BODY style='background-color:#F9F9F9;margin:0'>
 <APPLET id = 'applet' codebase='http://tv.com/cacti/plugins/zond/' code='netzond.class' width=700 height=250'>
    <PARAM name='dataParams' value='time,time,mm:ss,[,]'>
    <PARAM name='SWParams' value='bits per second,1000,2,true,false,100,false,0,3'>
    <PARAM name='outerParams' value='1,1,Courier New,8,8,8,"172.16.100.001 - Traffic - 172.16.100.1 (eth0)",,,, ,www.netzond.com,true,1500,http://tv.com/cacti/plugins/zond/zond_process.php?tasks=YTo2OntzOjE5OiIxOTc6OnRyYWZmaWNf
aW46OjYwIjthOjM6e3M6NDoidHlwZSI7czoxOiIyIjtzOjY6Im1ldGhvZCI7czoxOiIwIjtzOjU6InF1ZXJ5IjtzOjUxOiIxNzIuMTYuMTAwLjEsZHJ
hbi1kcmFuLTUwMDMsLjEuMy42LjEuMi4xLjIuMi4xLjEwLjEiO31zOjIwOiIxOTc6OnRyYWZmaWNfb3V0Ojo2MCI7YTozOntzOjQ6InR5cGUiO3M6MT
oiMiI7czo2OiJtZXRob2QiO3M6MToiMCI7czo1OiJxdWVyeSI7czo1MToiMTcyLjE2LjEwMC4xLGRyYW4tZHJhbi01MDAzLC4xLjMuNi4xLjIuMS4yL
jIuMS4xNi4xIjt9czoxOToiMTk4Ojp0cmFmZmljX2luOjo2MCI7YTozOntzOjQ6InR5cGUiO3M6MToiMiI7czo2OiJtZXRob2QiO3M6MToiMCI7czo1
OiJxdWVyeSI7czo1MToiMTcyLjE2LjEwMC4xLGRyYW4tZHJhbi01MDAzLC4xLjMuNi4xLjIuMS4yLjIuMS4xMC4xIjt9czoyMDoiMTk4Ojp0cmFmZml
jX291dDo6NjAiO2E6Mzp7czo0OiJ0eXBlIjtzOjE6IjIiO3M6NjoibWV0aG9kIjtzOjE6IjAiO3M6NToicXVlcnkiO3M6NTE6IjE3Mi4xNi4xMDAuMS
xkcmFuLWRyYW4tNTAwMywuMS4zLjYuMS4yLjEuMi4yLjEuMTYuMSI7fWk6MDthOjE6e3M6NDoiY2RlZiI7czo1OiJiLDgsKiI7fXM6MzoiTUFQIjthO
jE6e2k6MDtzOjE6ImIiO319'>
    <PARAM name='innerParams' value='2,5,5,40,10,40,10,0,-1,true,true,false,false,solid,1,6,2,static,false'>
    <PARAM name='colorParams' value='208,208,208;240,240,240;232,232,232;245,202,202;0,0,0;255,255,255;126,230,0;0,42,151'>
    <PARAM name='objcolsParams' value='0,0,1,1,4,2,3,0,4,4,4,4,4,5,5'>
    <PARAM name='swString' value='0,plot,6,6,188,true,true,Inbound,true,true,solid,1,true,true,false;1,line,7,7,255,true,true,Outbound,true,true,solid,1,true,true,false'>
 </APPLET>
 </BODY>
</HTML>
r_chetanjain
Cacti User
Posts: 83
Joined: Fri Aug 22, 2003 4:33 am

snmp_status error

Post by r_chetanjain »

PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27
PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27
PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27
PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27

and

[Fri Jun 22 07:53:14 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)
[Fri Jun 22 07:53:16 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)
[Fri Jun 22 07:53:18 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)
[Fri Jun 22 07:53:19 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)


I have php5.1 installed
eternal
Cacti User
Posts: 68
Joined: Thu Dec 14, 2006 4:38 pm
Location: Kingsport TN
Contact:

Post by eternal »

PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27


ditto php4
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

johnrembo, i have an output for you

Code: Select all

php zond_process.php YTo2On.....6MToiYiI7fX0=

Code: Select all

Array
(
    [2031::traffic_in::] => Array
        (
            [type] => 2
            [method] => 0
            [query] => 172.22.75.1,xxxx,.1.3.6.1.2.1.2.2.1.10.514
        )

    [2031::traffic_out::] => Array
        (
            [type] => 2
            [method] => 0
            [query] => 172.22.75.1,xxx,.1.3.6.1.2.1.2.2.1.16.514
        )

    [2032::traffic_in::] => Array
        (
            [type] => 2
            [method] => 0
            [query] => 172.22.75.1,xxx,.1.3.6.1.2.1.2.2.1.10.514
        )

    [2032::traffic_out::] => Array
        (
            [type] => 2
            [method] => 0
            [query] => 172.22.75.1,xxx,.1.3.6.1.2.1.2.2.1.16.514
        )

    [0] => Array
        (
            [cdef] => b,8,*
        )

    [MAP] => Array
        (
            [0] => b
        )

)
Notice: Undefined variable: fh in zond_process.php on line 65

Warning: Invalid argument supplied for foreach() in zond_process.php on line 65

Notice: Undefined variable: output in zond_process.php on line 106

Notice: Undefined variable: variable in rpn_calc.php on line 201

unknown variable type []!

can you help me ?

windows 2003 sp2, php5
Lcd
Posts: 6
Joined: Tue Mar 27, 2007 8:37 am

Post by Lcd »

Hi

First thanks for this really usefull plugin

I post here to give a little help

In the begining i ran it with an issue graphing the Interface Traffic In/Out bits, the graphs were always 0.
I looked at the code and after searches i found that in my version of your plugin (0.2 Alpha) there was an error.
In the snmp.php file, at the line 27, the initialisation of the $snmp_status variable is in commentary, so the variable can't be initialized.
Once i had removed it, it worked perfectly.

I don't know if it's a big help but it could be a good begining point for debugging ^^
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

johnrembo,

Please review the script_server.php in SVN. There is an important call just prior to and after you "include" the script that needs to be added to your stub function to prevent issues. Just thought I would add this. Nice tool.

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?
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

I have noticed that in zond_process.php, you have several places that call PHP scripts like this.
$php_bin_path ss.php
This was causing an issue for me, as php was then outputting a Content Type header in the results. Changing all 3 places to add -q fixed it for me.
$php_bin_path -q ss.php
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

hgd26 wrote:
johnrembo wrote:
can you show me a zond window html source?
thnx

Code: Select all


<HTML>
 <HEAD>
    <TITLE>"172.16.100.001 - Traffic - 172.16.100.1 (eth0)"</TITLE>
 </HEAD>
(...)
Uff...it took a while for me to debug this problem :o
and I am still not sure if it's solved - try the latest version.

and...if it will still fail - I will ask for you to export data-template and graph-template of currently failing graph, because there is no other way I could reproduce the same error on my machine.
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: snmp_status error

Post by johnrembo »

r_chetanjain wrote:PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27
PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27
PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27
PHP Notice: Undefined variable: snmp_status in /var/www/html/cacti_new/plugins/zond/snmp.php on line 27

and

[Fri Jun 22 07:53:14 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)
[Fri Jun 22 07:53:16 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)
[Fri Jun 22 07:53:18 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)
[Fri Jun 22 07:53:19 2007] [error] [client 10.115.100.100] request failed: URI too long (longer than 8190)


I have php5.1 installed
actualy there were some errors in previous update. try the latest version and tell me if the same will happen again. I only might suspect "URI to long" is the result of extremely hudgde graphs - now many curves are displayed on your graph that is failing?
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

Lcd wrote:Hi

First thanks for this really usefull plugin

I post here to give a little help

In the begining i ran it with an issue graphing the Interface Traffic In/Out bits, the graphs were always 0.
I looked at the code and after searches i found that in my version of your plugin (0.2 Alpha) there was an error.
In the snmp.php file, at the line 27, the initialisation of the $snmp_status variable is in commentary, so the variable can't be initialized.
Once i had removed it, it worked perfectly.

I don't know if it's a big help but it could be a good begining point for debugging ^^
Yup, that was my fault - I was emulating php4 behaviour and forgot to uncomment 1 line.
So, you all guys were running slow snmp queries for all the weekend :)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests