Here's the stuff I just finished up for getting policy counter data out of a Netscreen. There's only one graph template, for the total bytes, but you can see from there how to create other graphs.
I'm using cacti 0.8.6i, and polling a Netscreen NS-500 running ScreenOS 5.3.x - so some of the OIDs may change based on whatever you're running; I know for a fact that earlier versions of ScreenOS did their OIDs differently, for example the policy ID branch was 1.3.6.1.4.1.3224.10.2.1.1.<number> while I think starting with 5.x they're at
1.3.6.1.4.1.3224.10.2.1.1.<number>.0 - as are all the values - which is why a standard SNMP query won't work right (or if it would, I couldn't figure out how to massage it properly).
Standard disclaimers apply - no warranty, no support, if it breaks something you keep the pieces, if it runs off with your wife you can cry in your beer next to me (you supply the beer).
[edit - changed version of "starting with 5.x" since I think it was consistent through the 5.x series but changed from 4.x]
Juniper/Netscreen ScreenOS 5.3 Policy Counters
Moderators: Developers, Moderators
Juniper/Netscreen ScreenOS 5.3 Policy Counters
- Attachments
-
- netscreen-policy-counters.zip
- Netscreen policy counter templates & script
- (9.69 KiB) Downloaded 1526 times
-
- Image of the graph created (hadn't run very long yet)
- graph_image.php.png (18.66 KiB) Viewed 19165 times
Ahh, those were the quotes around the policy name. Just thought it looked cleaner in the templates and such - but something must've translated them into those characters in the process of downloading the XML from cacti here.
I did note that of the two graphs I've created so far, one exports fine and one does not, but I've yet to figure out why that is.
And don't forget, before you'll get any data back from the queries, you have to turn on the "Counting" option in the policy you're interested in (look in "Advanced" in the Web UI of the firewall).
I did note that of the two graphs I've created so far, one exports fine and one does not, but I've yet to figure out why that is.
And don't forget, before you'll get any data back from the queries, you have to turn on the "Counting" option in the policy you're interested in (look in "Advanced" in the Web UI of the firewall).
RE: Policy Counters
Hi,
I was unable to get this working. By data query shows 0 items 0 rows. Anyone know what I should try? I have:
1. Copied the xx.xml files from "resources" and "scripts" folder over to the Cacti Server.
2. Imported the 3 xxx.xml templates.
3. Created new device.
4. Assigned data query
5. Unable to create graph
We have other Cacti Templates working. Specifically, the previous post regarding tunnel interfaces. We monitor the BW associated with each VPN. Any help would be appreciated.
Thank you!
John
I was unable to get this working. By data query shows 0 items 0 rows. Anyone know what I should try? I have:
1. Copied the xx.xml files from "resources" and "scripts" folder over to the Cacti Server.
2. Imported the 3 xxx.xml templates.
3. Created new device.
4. Assigned data query
5. Unable to create graph
We have other Cacti Templates working. Specifically, the previous post regarding tunnel interfaces. We monitor the BW associated with each VPN. Any help would be appreciated.
Thank you!
John
Hi
I was having problems to work with cacti 0.8.7b. So i patched this template.
Now works fine
I was having problems to work with cacti 0.8.7b. So i patched this template.
Now works fine
- Attachments
-
- netscreen-policy-counters_cacti-0.8.7b.zip
- for cacti 0.8.7b
- (10.21 KiB) Downloaded 1217 times
I run:
# /usr/bin/php -q /usr/share/cacti/scripts/snmp_netscreen_policy_counters.php a.b.c.d cacti 1 161 500 "" "" get PlyMonTotByte 1
Ok no problem.
But, inside Cacti, can't draw the graph...
# tail /var/log/cacti/cacti.log
...
CMDPHP: Poller[0] Host[1] DS[x] WARNING: Result from CMD not valid. Partial Result:
What should I check?
# /usr/bin/php -q /usr/share/cacti/scripts/snmp_netscreen_policy_counters.php a.b.c.d cacti 1 161 500 "" "" get PlyMonTotByte 1
Ok no problem.
But, inside Cacti, can't draw the graph...
# tail /var/log/cacti/cacti.log
...
CMDPHP: Poller[0] Host[1] DS[x] WARNING: Result from CMD not valid. Partial Result:
What should I check?
I too have exactly the same problem... PHP is returning the correct values:
GGCWCacti01:/var/log/cacti# /usr/bin/php -q /usr/share/cacti/site/scripts/snmp_netscreen_policy_counters.php 10.1.2.1 publiv 1 161 500 "" "" get PlyMonTotByte 30
543021816
but the log file is showing all sorts of crazy stuff...
11/12/2009 02:15:03 PM - SYSTEM STATS: Time:1.1450 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:20 RRDsProcessed:14
11/12/2009 02:20:01 PM - CMDPHP: Poller[0] Host[2] DS[40] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:20:02 PM - CMDPHP: Poller[0] Host[2] DS[39] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:20:02 PM - CMDPHP: Poller[0] Host[2] DS[41] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:20:02 PM - SYSTEM STATS: Time:1.1438 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:20 RRDsProcessed:14
11/12/2009 02:25:02 PM - CMDPHP: Poller[0] Host[2] DS[40] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:25:02 PM - CMDPHP: Poller[0] Host[2] DS[39] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:25:02 PM - CMDPHP: Poller[0] Host[2] DS[41] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:25:03 PM - SYSTEM STATS: Time:1.1456 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:20 RRDsProcessed:14
Has any one resolved this?
GGCWCacti01:/var/log/cacti# /usr/bin/php -q /usr/share/cacti/site/scripts/snmp_netscreen_policy_counters.php 10.1.2.1 publiv 1 161 500 "" "" get PlyMonTotByte 30
543021816
but the log file is showing all sorts of crazy stuff...
11/12/2009 02:15:03 PM - SYSTEM STATS: Time:1.1450 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:20 RRDsProcessed:14
11/12/2009 02:20:01 PM - CMDPHP: Poller[0] Host[2] DS[40] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:20:02 PM - CMDPHP: Poller[0] Host[2] DS[39] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:20:02 PM - CMDPHP: Poller[0] Host[2] DS[41] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:20:02 PM - SYSTEM STATS: Time:1.1438 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:20 RRDsProcessed:14
11/12/2009 02:25:02 PM - CMDPHP: Poller[0] Host[2] DS[40] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:25:02 PM - CMDPHP: Poller[0] Host[2] DS[39] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:25:02 PM - CMDPHP: Poller[0] Host[2] DS[41] WARNING: Result from CMD not valid. Partial Result:
11/12/2009 02:25:03 PM - SYSTEM STATS: Time:1.1456 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:20 RRDsProcessed:14
Has any one resolved this?
Who is online
Users browsing this forum: No registered users and 0 guests