Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Apr 24, 2019 11:54 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Zeus ZXTM templates
PostPosted: Mon Aug 07, 2006 11:39 am 
Offline

Joined: Wed Jul 05, 2006 8:24 am
Posts: 42
Location: London, UK
I've created the following templates for graphing the ZXTM load balancer product from Zeus. They represent my first tempate set for Cacti, so they might still be a bit rough around the edges- YMMV.

Attached file contains the exported templates from Cacti, along with the data query XML files and the scripts that fetch the actual data. You'll need to have SNMP enabled on your ZXTM box, the net-snmp tools installed, Perl, and the Perl Bit::Vector module. This is used to recombine the two 32 bit half counters provided by ZXTM for various values into single 64 bit counters.

Any feedback would be welcome.

Mike


Attachments:
zxtm_cacti.tar.gz [10.48 KiB]
Downloaded 1803 times
Top
 Profile  
 
 Post subject: it does not work
PostPosted: Sat Aug 26, 2006 10:09 pm 
Offline

Joined: Sun Nov 13, 2005 1:05 am
Posts: 23
hey
I installed this
but can not query data from zxtm host
Data Query [ZXTM - Get Available Nodes] Reload Associated Query
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

Data Query [ZXTM - Get Virtual Servers] Reload Associated Query
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.


problem is my snmp running on 161, but you can not enable 161 on zxtm anymore.
so I changed port to 1161
Code:
+ Running data query [12].
+ Found type = '4 '[script query].
+ Found data query XML file at '/home/httpd/htdocs/cacti/resource/script_queries/zxtm_nodes.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33 index'
+ Executing script query '/usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33 query index'
+ Executing script query '/usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33 query ip'
+ Executing script query '/usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33 query port'
+ Executing script query '/usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33 query host'
+ Found data query XML file at '/home/httpd/htdocs/cacti/resource/script_queries/zxtm_nodes.xml'
+ Found data query XML file at '/home/httpd/htdocs/cacti/resource/script_queries/zxtm_nodes.xml'
+ Found data query XML file at '/home/httpd/htdocs/cacti/resource/script_queries/zxtm_nodes.xml'


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 29, 2006 6:53 am 
Offline

Joined: Wed Jul 05, 2006 8:24 am
Posts: 42
Location: London, UK
Can you run the scripts from the command line?


What happens if you try to execute:-
Code:
/usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33 index


This should return you a list of nodes. Similarly, replacing "nodes" with "vservers" should give you list of virtual servers. The script uses snmptable to return the data - if your SNMP agent listens on something other than udp:161 you'll need to change the lines in the code that call snmptable to use the different port. For 1160, you'd need something like:-

Code:
open(NODELIST, "$snmptable -CHif : -v 1 -c $community ${address}:1161 $nodetableoid | ");


You'd need to change all the lines that call snmptable, but there are only 4 or 5.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 9:58 am 
Offline

Joined: Sun Nov 13, 2005 1:05 am
Posts: 23
/usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33 index
Was that a table? SNMPv2-SMI::enterprises.7146.1.2.4.2
[[email protected] mysql]# /usr/bin/perl /home/httpd/htdocs/cacti/scripts/query_zxtm.pl nodes public 192.168.20.33:1161 index
Was that a table? SNMPv2-SMI::enterprises.7146.1.2.4.2


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 10:20 am 
Offline

Joined: Wed Jul 05, 2006 8:24 am
Posts: 42
Location: London, UK
Hmm - maybe your ZXTM uses a different MIB?

When I download the mIB from my ZXTM box, and install it under /usr/local/share/snmp/mibs/ I can test the OID like so:-

Code:
# snmptranslate .1.3.6.1.4.1.7146.1.2.4.2
ZXTM-MIB::nodeTable


So, it should be a table. If it isn't, I suggest you have a look at the output of an snmpwalk to see:-

Code:
# snmpwalk -v 1 -c public 10.0.0.250 .1.3.6.1.4.1.7146


You can easily replace the OID values in the script once you've found the base OID, but you need to get the snmptable command to give you sensible output for the node table before the rest will start to work:-

Code:
# snmptable  -v 1 -c public 10.0.0.250 .1.3.6.1.4.1.7146.1.2.4.2
SNMP table: ZXTM-MIB::nodeTable

nodeIPAddress nodePort nodeHostName nodeState nodeBytesToNodeLo nodeBytesToNodeHi nodeBytesFromNodeLo nodeBytesFromNodeHi nodeCurrentConn nodeTotalConn nodePooledConn nodeFailures nodeNewConn
      10.0.0.1       80   "10.0.0.1"     alive        4170286545                15          1919442481                 574             159     150205862              0            4   150205862
      10.0.0.1      443   "10.0.0.1"     alive                 0                 0                   0                   0               0             0              0            0           0
     10.0.0.24       80  "10.0.0.24"     alive        4204838387                 1          4117765818                  70              23      18636308              0         5539    18636308
     10.0.0.24      443  "10.0.0.24"     alive           5344761                 0            91347631                   0               1          6326              0           51        6326
     10.0.0.25       80  "10.0.0.25"     alive        4277205700                 1            56025919                  72              22      18775887              0            0    18775887
     10.0.0.25      443  "10.0.0.25"     alive           5407660                 0            94030751                   0               1          6371              0            0        6371
     10.0.0.26       80  "10.0.0.26"     alive        4278287694                 1          3555831615                  71              23      18775881              0            0    18775881
     10.0.0.26      443  "10.0.0.26"     alive           5402503                 0            91229361                   0               1          6317              0            0        6317
     10.0.0.27       80  "10.0.0.27"     alive        4278898974                 1          3603293938                  71              25      18775867              0            0    18775867
    10.0.0.241       25 "10.0.0.241"     alive                 0                 0                   0                   0               0             0              0            0           0
    10.0.0.241       53 "10.0.0.241"     alive                 0                 0                   0                   0               0             0              0            0           0
    10.0.0.242       25 "10.0.0.242"     alive                 0                 0                   0                   0               0             0              0            0           0
    10.0.0.242       53 "10.0.0.242"     alive                 0                 0                   0                   0               0             0              0            0           0
     10.0.1.24       80  "10.0.1.24"     alive                 0                 0                   0                   0               0             0              0           50           0
     10.0.1.24      443  "10.0.1.24"     alive           4873403                 0            84797486                   0               0          5714              0           47        5714
     10.0.1.25       80  "10.0.1.25"     alive                 0                 0                   0                   0               0             0              0            0           0
     10.0.1.25      443  "10.0.1.25"     alive           4888986                 0            83538772                   0               0          5708              0            0        5708



If that works, then you should be able tp get the script to produce sensible output, and then you'll start to be able to get data into Cacti.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:12 am 
Offline

Joined: Sun Nov 13, 2005 1:05 am
Posts: 23
shall I install zxtm MIB into cacti server?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:26 am 
Offline

Joined: Wed Jul 05, 2006 8:24 am
Posts: 42
Location: London, UK
Installing the MIB will allow the snmp utilities to use nice symbolic names for things, rather than just OIDs. If your device has a different MIB to mine it should be obvious if you try what I suggested in my previous post. It's not going to actually fix stuff for you, though.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 03, 2007 5:37 am 
Offline

Joined: Sun Jun 03, 2007 5:27 am
Posts: 1
Hello,

Does anyone has a solution for this problem. I'm running Zeus 4.1 and we have the same problem.

I've tried what was suggested but I can't figure out how to find the correct OID
Code:
...
SNMPv2-SMI::enterprises.7146.1.2.4.1.0 = INTEGER: 3
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.1.195.154.98.98.80 = IpAddress: 195.154.98.98
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.1.195.154.98.99.80 = IpAddress: 195.154.98.99
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.1.195.154.98.100.80 = IpAddress: 195.154.98.100
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.2.195.154.98.98.80 = INTEGER: 80
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.2.195.154.98.99.80 = INTEGER: 80
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.2.195.154.98.100.80 = INTEGER: 80
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.3.195.154.98.98.80 = STRING: "195.154.98.98"
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.3.195.154.98.99.80 = STRING: "195.154.98.99"
SNMPv2-SMI::enterprises.7146.1.2.4.2.1.3.195.154.98.100.80 = STRING: "admin-lp.lpn.fr"
....


table doesn't seem to exist

Code:
snmptable  -m ALL -v 1 -c zeus <private>:1161 1.3.6.1.4.1.7146.1.2.4
Was that a table? ZXTM-MIB::nodes


Any suggestion ?

Thanks.


Top
 Profile  
 
 Post subject: FYI, another potential fix
PostPosted: Thu Jan 15, 2009 5:50 pm 
Offline

Joined: Thu Jan 15, 2009 5:48 pm
Posts: 1
The net-snmp tools don't load all available MIBs by default. After adding the mib (ZXTM-MIB.txt or whatever) to your /usr/share/snmp/mibs folder (location may differ), you'll need to do one of the following:

export MIBS=+ZXTM-MIB
(load it for this session only)

or

echo "mibs +ZXTM-MIB" >> $HOME/.snmp/snmp.conf
(load it every time for you)

or

echo "mibs +ZXTM-MIB" >> /etc/snmp/snmp.conf
(load it every time for everyone)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2009 8:56 am 
Offline

Joined: Tue Jan 20, 2009 8:54 am
Posts: 6
I know this post is now quite old but is there any chance you could let me know what version of cacti was used to export the xml templates?

When importing into 0.8.6j nothing happens and no errors are displayed either. I cannot find the vservers and nodes templates in my list.

Any idea?

Running the perl scripts at the command line work fine though (once the paths to snmpget and snmptable have been updated in the scripts).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 20, 2009 11:02 am 
Offline

Joined: Tue Jan 20, 2009 8:54 am
Posts: 6
I had imported the wrong xml files! d'oh...
I'm now having issues with the data sources 'Index Type' 'Index Value' and 'output Type ID' !!

It's not very obvious hehe


Top
 Profile  
 
 Post subject: ZXTM Template Problem
PostPosted: Fri Feb 13, 2009 10:02 am 
Offline

Joined: Fri Feb 13, 2009 9:55 am
Posts: 1
I have installed ZXTM template over cacte, the query works on command line. The script works on command line. But it does not show any output on the web interface. Any one can please guide me in the right direction if I am missing something here
Output of Verbose Query
Code:
Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/cacti-0.8.7a/resource/script_queries/zxtm_vservers.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/perl /usr/local/cacti-0.8.7a/scripts/query_zxtm.pl vservers xxxx 172.168.0.1 index'
+ Executing script query '/usr/bin/perl /usr/local/cacti-0.8.7a/scripts/query_zxtm.pl vservers xxxx 172.168.0.1 query name'
+ Executing script query '/usr/bin/perl /usr/local/cacti-0.8.7a/scripts/query_zxtm.pl vservers xxxx 172.168.0.1 query port'
+ Executing script query '/usr/bin/perl /usr/local/cacti-0.8.7a/scripts/query_zxtm.pl vservers xxxx 172.168.0.1 query protocol'
+ Executing script query '/usr/bin/perl /usr/local/cacti-0.8.7a/scripts/query_zxtm.pl vservers xxxx 172.168.0.1 query trafficpool'
+ Found data query XML file at '/usr/local/cacti-0.8.7a/resource/script_queries/zxtm_vservers.xml'
+ Found data query XML file at '/usr/local/cacti-0.8.7a/resource/script_queries/zxtm_vservers.xml'
+ Found data query XML file at '/usr/local/cacti-0.8.7a/resource/script_queries/zxtm_vservers.xml'


If I run the script as it is displayed on cacti web interface using the cacti user it works fine.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2009 10:07 am 
Offline

Joined: Tue Jan 20, 2009 8:54 am
Posts: 6
I had exactly the same issue. It took me ages to firgure out why it worked at the CLI and not using the verbose query link... I solved it by changing the ownership of the perl script to be 'apache:root' (or whatever user your web server runs as).

Once you have done that, re-run a verbose query and you should start seeing the actual vserver and node names in your query results.

Hope that helps.


Top
 Profile  
 
 Post subject: Re: Zeus ZXTM templates
PostPosted: Fri Jul 22, 2011 2:28 pm 
Offline

Joined: Thu May 19, 2011 10:14 pm
Posts: 29
Hello,

See the topic remains open. I would, if possible, who was returning ... I had have reported problems similar to the last two participants. I see that there is not an official template for the balancer Zeus.

grateful


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group