Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jul 18, 2019 10:49 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Juniper/Netscreen ScreenOS 5.3 Policy Counters
PostPosted: Wed Mar 14, 2007 12:11 pm 
Offline

Joined: Fri Mar 02, 2007 8:44 pm
Posts: 19
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]


Attachments:
File comment: Image of the graph created (hadn't run very long yet)
graph_image.php.png
graph_image.php.png [ 18.66 KiB | Viewed 17686 times ]
File comment: Netscreen policy counter templates &amp; script
netscreen-policy-counters.zip [9.69 KiB]
Downloaded 1447 times
Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 1:39 pm 
Offline
Cacti User

Joined: Fri Jul 16, 2004 1:59 pm
Posts: 166
Location: Oregon
I couldn't import the data query netscreen policy counters without removing the "&#34" from the sv_graph and sv_data_source items. Then everything imported fine...just an FYI. Having problems getting it to work but I'll work on it some more...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 1:51 pm 
Offline

Joined: Fri Mar 02, 2007 8:44 pm
Posts: 19
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).


Top
 Profile  
 
 Post subject: RE: Policy Counters
PostPosted: Thu Mar 29, 2007 1:25 pm 
Offline

Joined: Thu Mar 29, 2007 9:10 am
Posts: 30
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 6:34 am 
Offline

Joined: Mon Mar 19, 2007 12:43 am
Posts: 10
Hi

I was having problems to work with cacti 0.8.7b. So i patched this template.
Now works fine


Attachments:
File comment: for cacti 0.8.7b
netscreen-policy-counters_cacti-0.8.7b.zip [10.21 KiB]
Downloaded 1145 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 19, 2008 10:35 pm 
Offline

Joined: Wed May 28, 2008 4:39 am
Posts: 3
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?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 12, 2009 9:27 am 
Offline

Joined: Thu Nov 12, 2009 7:41 am
Posts: 4
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?


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 2 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