Cacti and Packeteer

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
h17m4n
Posts: 4
Joined: Sat Sep 10, 2005 12:52 pm

Cacti and Packeteer

Post by h17m4n »

Hi,

Is there any way to graph the Partitions and/or classes of the shaper?

Thank you
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Yes, several people have made scripts. Search the script forum.
h17m4n
Posts: 4
Joined: Sat Sep 10, 2005 12:52 pm

Post by h17m4n »

Hi,

Dont mean to seem stupid, but I cant find anything usin criterias 'packeteer', 'shaper', packet shaper', etc...

:oops:
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

I'm graphing PacketShapers 6.2 and 7.2; you can find the OIDs here : http://www.packeteer.com/support/util_m ... ?page=snmp
I tried to write a host template, but I don't have much time now :(
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
h17m4n
Posts: 4
Joined: Sat Sep 10, 2005 12:52 pm

Post by h17m4n »

Hi,

Did anyone get a chance to write a template for this thing? :oops:

Its really killing me, I got the Packeteer mibs, done an snmpwalk. So I got the IFMibs (I Think) I need. When I enter the info, I get nothing...

I am obviously doing something wrong...

Can anyone point me in the right direction? Tips, examples?

Thanks... :o
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

There's an example in the docs at http://www.cacti.net/downloads/docs/htm ... H_SNMP_OID. This will show you some single OID. For more complex ones, an XML would be the better choice (see docs for this).
Reinhard
eshine
Posts: 30
Joined: Fri Feb 25, 2005 11:38 am
Location: Sao Paulo - Brazil

Post by eshine »

Hi,

Packeteer don´t support (at least in older versions) snmp vs 2 or 3, so you´ll have some problems to walk inside the device.

And its OIDs have many limitations in comparison to the CLI info. For example, you can´t collect the total free partitions in one polling.
That´s the reason I´ve decided to write a script to telnet in the box and save some CLI commands outputs in a clear text file. After this, filter this text with another script and make it work with Cacti.
rgds,
Edgar Shine
h17m4n
Posts: 4
Joined: Sat Sep 10, 2005 12:52 pm

Post by h17m4n »

Hi,

Is i possible for you to forward these scripts? And directions for use.

Or is it availble on the net already?

Thanks for your reply, I was busy pulling out my hair at this end...
eshine
Posts: 30
Joined: Fri Feb 25, 2005 11:38 am
Location: Sao Paulo - Brazil

Post by eshine »

It's not difficult... here is a sample:
--- BEGIN---
#!/usr/bin/perl
use Net::Telnet;
my $session;
my @output;
my $passwd = "<password>";
$session = new Net::Telnet( Telnetmode => 1);
$session->input_log('/tmp/packeteer_monitor.txt');
$session->open( Host => '<packeteer_ip_address>',
Port => 23);
$session->waitfor('/Password:.*$/i');
$session->print("$passwd");
$session->waitfor('/#.*$/i');
$session->print("sys health \n");
$session->waitfor('/#.*$/i');
$session->print("sys limit \n");
$session->waitfor('/#.*$/i');
$session->print("net nic \n");
$session->waitfor('/#.*$/i');
$session->close;
---EOT---
Using this program sample, I collect 3 CLI commands outputs and put it in a text file. So, I run this script every 5 minutes (cron) to have a "fresh" info. The crontab:
3,8,13,18,23,28,33,38,43,48,53,58 * * * * /<path>/<program_file>
Don't forget to change the <program_file> permissions to +x :wink:

Using a very simple shell script, I collect the info I need point to Cacti:
---BEGIN---
#!/bin/bash
packeteer_cpu ()
{
average=`grep Average /tmp/packeteer_monitor.txt | awk '{ print $5 }'`
current=`grep "Current %" /tmp/packeteer_monitor.txt | awk '{ print $5 }'`
echo "average:$[100-$average] current:$[100-$current]"
exit 0
}

packeteer_dynamic_partitions ()
{
usage=`grep "Dynamic Partitions" /tmp/packeteer_monitor.txt | awk '{ print $3 }'`
available=`grep "Dynamic Partitions" /tmp/packeteer_monitor.txt | awk '{ print $4 }'`
echo "usage:$usage available:$available"
exit 0
}

packeteer_rx_late_drops ()
{
nic0=`grep RxLateDrops /tmp/packeteer_monitor.txt | awk '{ print $6 }' | head -n 1`
nic1=`grep RxLateDrops /tmp/packeteer_monitor.txt | awk '{ print $6 }' | tail -n 1`
echo "nic0:$nic0 nic1:$nic1"
exit 0
}
case "$1" in
cpu)
packeteer_cpu
;;
partition)
packeteer_dynamic_partitions
;;
latedrops)
packeteer_rx_late_drops
;;
*)
echo "Usage: packeteer {cpu|partition|latedrops}"
exit 1
;;
esac
---EOT---
And just put this script work with Cacti.
rgds,
Edgar Shine
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest