Zeus ZXTM templates

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
sauron
Posts: 42
Joined: Wed Jul 05, 2006 8:24 am
Location: London, UK

Zeus ZXTM templates

Post by sauron »

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 2216 times
suse
Posts: 23
Joined: Sun Nov 13, 2005 1:05 am

it does not work

Post by suse »

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: Select all

+ 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'
sauron
Posts: 42
Joined: Wed Jul 05, 2006 8:24 am
Location: London, UK

Post by sauron »

Can you run the scripts from the command line?


What happens if you try to execute:-

Code: Select all

/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: Select all

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.
suse
Posts: 23
Joined: Sun Nov 13, 2005 1:05 am

Post by suse »

/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
[root@bk2 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
sauron
Posts: 42
Joined: Wed Jul 05, 2006 8:24 am
Location: London, UK

Post by sauron »

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: Select all

# 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: Select all

# 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: Select all

# 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.
suse
Posts: 23
Joined: Sun Nov 13, 2005 1:05 am

Post by suse »

shall I install zxtm MIB into cacti server?
sauron
Posts: 42
Joined: Wed Jul 05, 2006 8:24 am
Location: London, UK

Post by sauron »

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.
doussot
Posts: 1
Joined: Sun Jun 03, 2007 5:27 am

Post by doussot »

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: Select all

...
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: Select all

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.
elentar
Posts: 1
Joined: Thu Jan 15, 2009 5:48 pm

FYI, another potential fix

Post by elentar »

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)
griffinboy
Posts: 6
Joined: Tue Jan 20, 2009 8:54 am

Post by griffinboy »

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).
griffinboy
Posts: 6
Joined: Tue Jan 20, 2009 8:54 am

Post by griffinboy »

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
mali
Posts: 1
Joined: Fri Feb 13, 2009 9:55 am

ZXTM Template Problem

Post by mali »

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: Select all

 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.
griffinboy
Posts: 6
Joined: Tue Jan 20, 2009 8:54 am

Post by griffinboy »

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.
jcb
Posts: 29
Joined: Thu May 19, 2011 10:14 pm

Re: Zeus ZXTM templates

Post by jcb »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest