glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
43 stars 24 forks source link

Inventory Cisco Switch in Stack #472

Closed francisco-vilaca closed 4 months ago

francisco-vilaca commented 4 months ago

Describe the bug

GLPIis doubling the number of ports on each Unit.

I have 2 Cisco SG500 in stack mode, each one with 52 ports, but on my GLPI inventory each unity came with 105 Ports:

fa1/2/1 to fa1/2/48 with a question mark on the connection status

gi1/1/2 to gi1/1/49 this one can show a few devises, even though some of those devises are other switch that are already inventory by glpi, and they show up in red as Hub > Hub link

image

image

image

image

To reproduce

.

Expected behavior

.

Operating system

Linux

GLPI Agent version

Other (See additional context below)

GLPI version

10.0.10

GLPIInventory plugin

1.3.4

Additional context

No response

trasher commented 4 months ago

First, try with latest GLPI release. If you can reproduce, we need an inventory file we can inspect and use to reproduce.

francisco-vilaca commented 4 months ago

how can i download the inventory file to send you ?

trasher commented 4 months ago

On the main tab of the asset, there is a download icon at the right of the " Inventory information " panel.

trasher commented 4 months ago

Maybe fixed as of https://github.com/glpi-project/glpi/pull/15759

trasher commented 4 months ago

I did not pay attention you were using an outdated GLPI version...

francisco-vilaca commented 4 months ago

ok i have updated my GLPI to the latest version 10.0.12. but the problem persists. Here is my inventory file so you can have a look

networkequipment_0_99.txt networkequipment_0_98.txt

stonebuzz commented 4 months ago

Concerning networkequipment_0_99.txt

The agent pulls up two stacks with their own serial

<COMPONENT>
  <CONTAINEDININDEX>64</CONTAINEDININDEX>
  <DESCRIPTION>SG500-52 52-Port Gigabit Stackable Managed Switch</DESCRIPTION>
  <FIRMWARE>1.4.0.02</FIRMWARE>
  <FRU>2</FRU>
  <INDEX>67108992</INDEX>
  <MANUFACTURER>Cisco Systems, Inc.</MANUFACTURER>
  <MODEL>SG500-52-K9</MODEL>
  <NAME>SG500-52 Stack Unit 1</NAME>
  <REVISION>V04</REVISION>
  <SERIAL>DNI20380ACP</SERIAL>
  <TYPE>chassis</TYPE>
  <VERSION>1.4.11.5</VERSION>
</COMPONENT>

and

<COMPONENT>
  <CONTAINEDININDEX>64</CONTAINEDININDEX>
  <DESCRIPTION>SG500-52 52-Port Gigabit Stackable Managed Switch</DESCRIPTION>
  <FIRMWARE>1.4.0.02</FIRMWARE>
  <FRU>2</FRU>
  <INDEX>134217856</INDEX>
  <MANUFACTURER>Cisco Systems, Inc.</MANUFACTURER>
  <MODEL>SG500-52-K9</MODEL>
  <NAME>SG500-52 Stack Unit 2</NAME>
  <REVISION>V04</REVISION>
  <SERIAL>DNI21440632</SERIAL>
  <TYPE>chassis</TYPE>
  <VERSION>1.4.11.5</VERSION>
</COMPONENT>

so for me the distribution of network ports (Gi or Fa) is correct

GLPI will not separate Gi and Fa network port, as this means creating a new stack with no information and which is not seen by the inventory agent.

stonebuzz commented 4 months ago

To clarify, GLPI currently links all network ports Fa1 and Gi1 to the first stack and links network ports Fa2 and Gi2 to the second stack.

what is good behaviour

trasher commented 4 months ago

I should not have reopen; I was not totally woke up :D @stonebuzz is right

It seems there is nothing much GLPI can do with such inventories. You did not tell which agent/version you're using (try latest if it's not already the one you use); maybe agent could be improved, I really have no idea.

From a GLPI point of view, there is no bug so far.

francisco-vilaca commented 4 months ago

OK, if you say that is the behaviour expected... But honestly I find very odd that the GLPI getting those informations that I cannot find in my switch configurations here is the output of all interfaces of the switch

SWTRANSITO#show interfaces status Flow Link Back Mdix Port Type Duplex Speed Neg ctrl State Pressure Mode


gi1/1/1 1G-Copper -- -- -- -- Down -- -- gi1/1/2 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/3 1G-Copper -- -- -- -- Down -- -- gi1/1/4 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/5 1G-Copper Full 100 Enabled Off Up Disabled On gi1/1/6 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/7 1G-Copper -- -- -- -- Down -- -- gi1/1/8 1G-Copper -- -- -- -- Down -- -- gi1/1/9 1G-Copper -- -- -- -- Down -- -- gi1/1/10 1G-Copper -- -- -- -- Down -- -- gi1/1/11 1G-Copper -- -- -- -- Down -- -- gi1/1/12 1G-Copper -- -- -- -- Down -- -- gi1/1/13 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/14 1G-Copper -- -- -- -- Down -- -- gi1/1/15 1G-Copper -- -- -- -- Down -- -- gi1/1/16 1G-Copper -- -- -- -- Down -- -- gi1/1/17 1G-Copper -- -- -- -- Down -- -- gi1/1/18 1G-Copper -- -- -- -- Down -- -- gi1/1/19 1G-Copper -- -- -- -- Down -- -- gi1/1/20 1G-Copper -- -- -- -- Down -- -- gi1/1/21 1G-Copper -- -- -- -- Down -- -- gi1/1/22 1G-Copper -- -- -- -- Down -- -- gi1/1/23 1G-Copper -- -- -- -- Down -- -- gi1/1/24 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/25 1G-Copper Half 10 Disabled Off Up Disabled On gi1/1/26 1G-Copper -- -- -- -- Down -- -- gi1/1/27 1G-Copper -- -- -- -- Down -- -- gi1/1/28 1G-Copper -- -- -- -- Down -- -- gi1/1/29 1G-Copper -- -- -- -- Down -- -- gi1/1/30 1G-Copper -- -- -- -- Down -- -- gi1/1/31 1G-Copper -- -- -- -- Down -- -- gi1/1/32 1G-Copper -- -- -- -- Down -- -- gi1/1/33 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/34 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/35 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/36 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/37 1G-Copper -- -- -- -- Down -- -- gi1/1/38 1G-Copper -- -- -- -- Down -- -- gi1/1/39 1G-Copper -- -- -- -- Down -- -- gi1/1/40 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/41 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/42 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/43 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/44 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/45 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/46 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/47 1G-Copper Full 1000 Enabled Off Up Disabled Off gi1/1/48 1G-Copper Full 1000 Enabled Off Up Disabled On gi1/1/49 1G-Combo-F Full 1000 Disabled Off Up Disabled Off gi1/1/50 1G-Combo-C -- -- -- -- Down -- -- gi2/1/1 1G-Copper -- -- -- -- Down -- -- gi2/1/2 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/3 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/4 1G-Copper -- -- -- -- Down -- -- gi2/1/5 1G-Copper -- -- -- -- Down -- -- gi2/1/6 1G-Copper -- -- -- -- Down -- -- gi2/1/7 1G-Copper -- -- -- -- Down -- -- gi2/1/8 1G-Copper -- -- -- -- Down -- -- gi2/1/9 1G-Copper -- -- -- -- Down -- -- gi2/1/10 1G-Copper -- -- -- -- Down -- -- gi2/1/11 1G-Copper -- -- -- -- Down -- -- gi2/1/12 1G-Copper -- -- -- -- Down -- -- gi2/1/13 1G-Copper -- -- -- -- Down -- -- gi2/1/14 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/15 1G-Copper Full 1000 Enabled Off Up Disabled On gi2/1/16 1G-Copper Full 1000 Enabled Off Up Disabled On gi2/1/17 1G-Copper Full 1000 Enabled Off Up Disabled On gi2/1/18 1G-Copper Full 1000 Enabled Off Up Disabled On gi2/1/19 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/20 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/21 1G-Copper Full 1000 Enabled Off Up Disabled On gi2/1/22 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/23 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/24 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/25 1G-Copper Full 1000 Enabled Off Up Disabled On gi2/1/26 1G-Copper -- -- -- -- Down -- -- gi2/1/27 1G-Copper -- -- -- -- Down -- -- gi2/1/28 1G-Copper -- -- -- -- Down -- -- gi2/1/29 1G-Copper -- -- -- -- Down -- -- gi2/1/30 1G-Copper Full 100 Enabled Off Up Disabled Off gi2/1/31 1G-Copper -- -- -- -- Down -- -- gi2/1/32 1G-Copper -- -- -- -- Down -- -- gi2/1/33 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/34 1G-Copper Full 1000 Enabled Off Up Disabled On gi2/1/35 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/36 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/37 1G-Copper -- -- -- -- Down -- -- gi2/1/38 1G-Copper -- -- -- -- Down -- -- gi2/1/39 1G-Copper -- -- -- -- Down -- -- gi2/1/40 1G-Copper -- -- -- -- Down -- -- gi2/1/41 1G-Copper -- -- -- -- Down -- -- gi2/1/42 1G-Copper -- -- -- -- Down -- -- gi2/1/43 1G-Copper -- -- -- -- Down -- -- gi2/1/44 1G-Copper -- -- -- -- Down -- -- gi2/1/45 1G-Copper -- -- -- -- Down -- -- gi2/1/46 1G-Copper -- -- -- -- Down -- -- gi2/1/47 1G-Copper -- -- -- -- Down -- -- gi2/1/48 1G-Copper Full 1000 Enabled Off Up Disabled Off gi2/1/49 1G-Combo-C -- -- -- -- Down -- -- gi2/1/50 1G-Combo-F Full 1000 Disabled Off Up Disabled Off

                                      Flow    Link

Ch Type Duplex Speed Neg control State


Po1 1G Full 1000 Enabled Off Up Po2 1G Full 1000 Enabled Off Up Po3 1G Full 1000 Enabled Off Up Po4 1G Full 1000 Enabled Off Up Po5 1G Full 1000 Enabled Off Up Po6 1G Full 1000 Enabled Off Up Po7 1G Full 1000 Enabled Off Up Po8 1G Full 1000 Enabled Off Up Po9 -- -- -- -- -- Not Present Po10 -- -- -- -- -- Not Present Po11 -- -- -- -- -- Not Present Po12 -- -- -- -- -- Not Present Po13 1G Full 1000 Enabled Off Up Po14 -- -- -- -- -- Not Present Po15 1G Full 1000 Enabled Off Up Po16 -- -- -- -- -- Not Present Po17 -- -- -- -- -- Not Present Po18 1G Full 1000 Enabled Off Up Po19 -- -- -- -- -- Not Present Po20 -- -- -- -- -- Not Present Po21 -- -- -- -- -- Not Present Po22 -- -- -- -- -- Not Present Po23 -- -- -- -- -- Not Present Po24 -- -- -- -- -- Not Present Po25 -- -- -- -- -- Not Present Po26 -- -- -- -- -- Not Present Po27 -- -- -- -- -- Not Present Po28 -- -- -- -- -- Not Present Po29 -- -- -- -- -- Not Present Po30 1G Full 1000 Enabled Off Up Po31 -- -- -- -- -- Not Present Po32 -- -- -- -- -- Not Present SWTRANSITO#

as you can see, in the switch configuration do not have any interface with the name fa//*

same thing for the ips address, GLPI says that my switch have 0.1.134.160

As you can see here

image

But on my switch configuration that ip do not exist

SWTRANSITO#show ip interface

IP Address        I/F    I/F Status  Type   Directed  Prec Redirect Status
                         admin/oper         Broadcast

0.0.0.0/32 vlan 1 DOWN/DOWN DHCP disable No enable Not receiv ed 172.16.253.200/24 vlan 253 UP/UP Static disable No enable Valid

SWTRANSITO#

and now during the night GLPI run another inventory this is the outcome

image

networkequipment_0_98.txt

This problem of removing the ports out of the blue happens with anothers switchs as well, and the problem of the ip 0.1.134.160 occurs in most of the cisco switchs and i can guatantee the i do not have that ip address in any of my switchs

trasher commented 4 months ago

as you can see, in the switch configuration do not have any interface with the name fa*//

Well, those are present in XML file; this is therefore an agent issue. I have no idea why but there is certainly a reason why it happens (a bug or else). Consider opening a discussion on agent repository.

same thing for the ips address, GLPI says that my switch have 0.1.134.160

Well, that's another problem; but if it's present in XML file; GLPI will just handle it. No idea if it's related to something the plugin sends, or if it's related to the agent (this seems what's being discussed on #469).