You are not logged in.
Pages: 1
Dears,
I need to add new info in xml file.
Well. My mini tutorial:
I add my oid in file /usr/share/fusioninventory/sysobject.ids
# IDRAC SERIAL
674.10892.2.1.1.11.0 Dell NETWORKING iDRAC SERIAL
In directory "/usr/share/fusioninventory/lib/FusionInventory/Agent/SNMP/MibSupport" I create perl script mib
My code:
####################################################
package FusionInventory::Agent::SNMP::MibSupport::idrac;
use strict;
use warnings;
use parent 'FusionInventory::Agent::SNMP::MibSupportTemplate';
use FusionInventory::Agent::Tools;
use FusionInventory::Agent::Tools::SNMP;
use constant idrac => '.1.3.6.1.4.1.674.10892';
use constant serial => idrac . '.2.1.1.11.0';
our $mibSupport = [
{
name => "idrac",
sysobjectid => getRegexpOidMatch(idrac)
}
];
sub getSerial {
my ($self) = @_;
return $self->get(serial);
}
1;
__END__
=head1 NAME
FusionInventory::Agent::SNMP::MibSupport::idrac - Inventory module for idrac
=head1 DESCRIPTION
This module enhances idc devices support.
####################################################
Well I this info add in my xml.
command: snmpwalk -v2c -c idc idc-009 .1.3.6.1.4.1.674.10892.2.1.1.11.0
result: SNMPv2-SMI::enterprises.674.10892.2.1.1.11.0 = STRING: "3K7G330"
Well as can I add this info in xml with this command "fusioninventory-netinventory --host idc-009 --credentials version:2c,community:idc --debug --debug"
Parcial Result:
######################################################
[debug] creating 1 worker threads
[debug] [thread 1] creation
[debug] [thread 1] #1, scanning 0: idrac-340694
[debug] [thread 1] #1, full match for sysobjectID .1.3.6.1.4.1.674.10892.5 in database
######################################################
My doubt as I can change sysobjectID in fusioninventory-netinventory or add info additional.
My refference example link:
https://github.com/fusioninventory/fusi … issues/824
Offline
Ready working , if your mib custom with name Idrac.pm, you name must contain in code "Idrac" --> package FusionInventory::Agent::SNMP::MibSupport::Idrac;
Final code example:
###########################
package FusionInventory::Agent::SNMP::MibSupport::Idrac;
use strict;
use warnings;
use parent 'FusionInventory::Agent::SNMP::MibSupportTemplate';
use FusionInventory::Agent::Tools;
use FusionInventory::Agent::Tools::SNMP;
use constant idrac => '.1.3.6.1.4.1.674.10892';
use constant serial => idrac . '.2.1.1.11.0';
our $mibSupport = [
{
name => "idrac",
sysobjectid => getRegexpOidMatch(idrac)
}
];
sub getSerial {
my ($self) = @_;
return $self->get(serial);
}
1;
__END__
=head1 NAME
FusionInventory::Agent::SNMP::MibSupport::Idrac - Inventory module for Idrac
=head1 DESCRIPTION
This module enhances Idrac support.
Offline
Hi spinal_df,
thank you for the sharing.
I just backported your contribution to GLPI-Agent:
https://github.com/glpi-project/glpi-ag … 95c2f04560
GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer
Offline
Pages: 1