Zeus ZXTM templates
Moderators: Developers, Moderators
Zeus ZXTM templates
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
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
it does not work
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
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'
Can you run the scripts from the command line?
What happens if you try to execute:-
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:-
You'd need to change all the lines that call snmptable, but there are only 4 or 5.
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
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.
/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
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
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:-
So, it should be a table. If it isn't, I suggest you have a look at the output of an snmpwalk to see:-
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:-
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.
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
Code: Select all
# snmpwalk -v 1 -c public 10.0.0.250 .1.3.6.1.4.1.7146
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.
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
table doesn't seem to exist
Any suggestion ?
Thanks.
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"
....
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
Thanks.
FYI, another potential fix
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)
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)
-
- Posts: 6
- Joined: Tue Jan 20, 2009 8:54 am
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).
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).
-
- Posts: 6
- Joined: Tue Jan 20, 2009 8:54 am
ZXTM Template Problem
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
If I run the script as it is displayed on cacti web interface using the cacti user it works fine.
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'
-
- Posts: 6
- Joined: Tue Jan 20, 2009 8:54 am
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.
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.
Re: Zeus ZXTM templates
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
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
Who is online
Users browsing this forum: No registered users and 1 guest