Ad Widget
Collapse
command-line import/export facility dynamic items, triggers and graphs
Collapse
X
-
thanks ! now it works but i still have a problem with the compilation
i have this :
Host: Template_Routeur_A
IP: 10.192.2.1
Percent: 75
Comm string: SNMP
Slow: community
Groups: 5
Fan not fountd. ERROR: No response from remote host '10.192.2.1'.
ERROR: No response from remote host '10.192.2.1'.
do you now why?Comment
-
1) Configure SNMP on switch or routerthanks ! now it works but i still have a problem with the compilation
i have this :
Host: Template_Routeur_A
IP: 10.192.2.1
Percent: 75
Comm string: SNMP
Slow: community
Groups: 5
Fan not fountd. ERROR: No response from remote host '10.192.2.1'.
ERROR: No response from remote host '10.192.2.1'.
do you now why?
XXXXXX - community
Example:
snmp-server community XXXXXX RO 1
access-list 1 permit 10.0.2.0 0.0.0.255
access-list 1 deny any
2) check SNMP configuration on device
10.192.2.1 - IP of you device
XXXXXX - SNMP community
Example:
snmpwalk -v 2c -c XXXXXX 10.192.2.1 .1.3.6.1.2.1.2.2.1.1Last edited by dima_dm; 07-07-2010, 09:18.Comment
-
1) Configure SNMP on switch or router
XXXXXX - community
Example:
snmp-server community XXXXXX RO 1
access-list 1 permit 10.0.2.0 0.0.0.255
access-list 1 deny any
2) check SNMP configuration on device
10.192.2.1 - IP of you device
XXXXXX - SNMP community
Example:
snmpwalk -v 2c -c XXXXXX 10.192.2.1 .1.3.6.1.2.1.2.2.1.1
Thank you,
in your prog you use NET::SNMP to find port_num ..
I want generate
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.1 = STRING: "ftp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.2 = STRING: "http"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.3 = STRING: "egp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.4 = STRING: "gre"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.5 = STRING: "icmp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.6 = STRING: "eigrp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.7 = STRING: "ipinip"
..
..
..
i want to have in the items the name of the protocol for exemple "ftp" and not "fan_1" and make a graph for each item of NBAR protocols with their name and not the number of protocol.
how can i do?
is NET::SNMP qualfied for that work? if yes how may i use it in the program perl ?
else ?
please help
thank youComment
-
in your prog you use NET::SNMP to find port_num ..
I want generate
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.1 = STRING: "ftp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.2 = STRING: "http"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.3 = STRING: "egp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.4 = STRING: "gre"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.5 = STRING: "icmp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.6 = STRING: "eigrp"
SNMPv2-SMI::enterprises.9.9.244.1.2.1.1.2.1.7 = STRING: "ipinip"
..
..
..
i want to have in the items the name of the protocol for exemple "ftp" and not "fan_1" and make a graph for each item of NBAR protocols with their name and not the number of protocol.
how can i do?
is NET::SNMP qualfied for that work? if yes how may i use it in the program perl ?
else ?
please help
answer please !!Comment
-
Yes. If you will find corresponding MIBs.
See perldoc -m Net::SNMP
If distribution of the traffic (ftp,http, ssh,icmp etc) statistics are necessary to you, it is better to use netflow.Last edited by dima_dm; 09-07-2010, 07:45.Comment
-
The script does not work with cisco 3560, for this cisco ports are formed
592888838 packets input, 4018252900 bytes, 0 no buffer
SNMPv2-SMI::mib-2.17.4.4.1.3.24 = Counter32: 592888838
2124032910 packets output, 241446436 bytes, 0 underruns
SNMPv2-SMI::mib-2.17.4.4.1.4.24 = Counter32: 2124032910
2124032910 packets output, 241446436 bytes, 0 underruns
IF-MIB::ifOutOctets.10124 = Counter32: 241446436Comment
-
I read the perldoc, it's not very clear for me because i don't control very well objects in perl.
i found this:
se strict;
## Validate the version of Perl
BEGIN
{
die('Perl version 5.6.0 or greater is required') if ($] < 5.006);
}
## Version of the Net::SNMP module
our $VERSION = v5.2.0;
## Load our modules
use Net::SNMP:
ispatcher();
use Net::SNMP::PDU qw( :ALL );
use Net::SNMP::Security();
use Net::SNMP::Transport qw(
orts );
## Handle importing/exporting of symbols
use Exporter();
our @ISA = qw( Exporter );
our @EXPORT = qw(
INTEGER INTEGER32 OCTET_STRING OBJECT_IDENTIFIER IPADDRESS COUNTER
COUNTER32 GAUGE GAUGE32 UNSIGNED32 TIMETICKS OPAQUE COUNTER64 NOSUCHOBJECT
NOSUCHINSTANCE ENDOFMIBVIEW snmp_dispatcher
);
our @EXPORT_OK = qw( snmp_event_loop oid_context_match );
our %EXPORT_TAGS = (
asn1 => [
qw( INTEGER INTEGER32 OCTET_STRING NULL OBJECT_IDENTIFIER SEQUENCE
IPADDRESS COUNTER COUNTER32 GAUGE GAUGE32 UNSIGNED32 TIMETICKS
OPAQUE COUNTER64 NOSUCHOBJECT NOSUCHINSTANCE ENDOFMIBVIEW
GET_REQUEST GET_NEXT_REQUEST GET_RESPONSE SET_REQUEST TRAP
GET_BULK_REQUEST INFORM_REQUEST SNMPV2_TRAP REPORT )
],
debug => [
qw( DEBUG_ALL DEBUG_NONE DEBUG_MESSAGE DEBUG_TRANSPORT DEBUG_DISPATCHER
DEBUG_PROCESSING DEBUG_SECURITY snmp_debug )
],
generictrap => [
qw( COLD_START WARM_START LINK_DOWN LINK_UP AUTHENTICATION_FAILURE
EGP_NEIGHBOR_LOSS ENTERPRISE_SPECIFIC )
],
snmp => [
qw( SNMP_VERSION_1 SNMP_VERSION_2C SNMP_VERSION_3 SNMP_PORT
SNMP_TRAP_PORT snmp_debug snmp_dispatcher snmp_dispatch_once
snmp_type_ntop oid_base_match oid_lex_sort ticks_to_time )
],
translate => [
qw( TRANSLATE_NONE TRANSLATE_OCTET_STRING TRANSLATE_NULL
TRANSLATE_TIMETICKS TRANSLATE_OPAQUE TRANSLATE_NOSUCHOBJECT
TRANSLATE_NOSUCHINSTANCE TRANSLATE_ENDOFMIBVIEW TRANSLATE_UNSIGNED
TRANSLATE_ALL )
]
);
Exporter::export_ok_tags( qw( asn1 debug generictrap snmp translate ) );
$EXPORT_TAGS{ALL} = [ @EXPORT_OK ];
## Debugging bit masks
sub DEBUG_ALL() { 0xff } # All
sub DEBUG_NONE() { 0x00 } # None
sub DEBUG_MESSAGE() { 0x02 } # Message/PDU encoding/decoding
sub DEBUG_TRANSPORT() { 0x04 } # Transport Layer
sub DEBUG_DISPATCHER() { 0x08 } # Dispatcher
sub DEBUG_PROCESSING() { 0x10 } # Message Processing
sub DEBUG_SECURITY() { 0x20 } # Security
## Package variables
our $DEBUG = DEBUG_NONE; # Debug mask
our $DISPATCHER; # Dispatcher instance
our $BLOCKING = 0; # Count of blocking objects
our $NONBLOCKING = 0; # Count of non-blocking objects
BEGIN
{
# Validate the creation of the Dispatcher object.
if (!defined($DISPATCHER = Net::SNMP:
ispatcher->instance)) {
die('FATAL: Failed to create Dispatcher instance');
}
}
How may i use it to have the name of my protocol ??Comment
-
How To Ask Questions The Smart Way
Comment
-
i was looking for answers to my problem not advices about "how to ask questions"How To Ask Questions The Smart Way
http://catb.org/esr/faqs/smart-questions.htmlComment
Comment