Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cisco stack reporting issue #17281

Closed
2 tasks done
bacus99 opened this issue Jun 11, 2024 · 12 comments
Closed
2 tasks done

Cisco stack reporting issue #17281

bacus99 opened this issue Jun 11, 2024 · 12 comments

Comments

@bacus99
Copy link

bacus99 commented Jun 11, 2024

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

10.0.16

Bug description

For some time, my Cisco switches are not reporting stacks properly. It change around version 10.0.11, but I'm not sure
Now I have in most of the case 1 switch with all the ports in it. Plus on random frequency, glpi-netinventory snmp update flush all my ports (And sometime change the name of the switch 0 (ex: Site-SW-01 to Site-SW-01 - 2)

Relevant log output

188480424	2024-06-10 10:40	inventory	Last inventory date	Change 2024-06-10 08:02 to 2024-06-10 10:40
188455147	2024-06-10 08:02	inventory	Network port	Add an item: Network port (site-SW-01 - Gi3/1/4 (1743265))
188455145	2024-06-10 08:02	inventory	Network port	Add an item: Network port (site-SW-01 - Gi3/1/3 (1743264))
188455143	2024-06-10 08:02	inventory	Network port	Add an item: Network port (site-SW-01 - Gi3/1/2 (1743263))
188454884	2024-06-10 08:02	inventory	Firmware	Delete a component: C9200L-48P-4G-F (83683)
188454881	2024-06-10 08:02	inventory	Firmware	Add a component: C9200L-48P-4G-F (83684)
188454880	2024-06-10 08:02	inventory	Last inventory date	Change 2024-06-10 07:25 to 2024-06-10 08:02
188439063	2024-06-10 07:25	inventory	Last inventory date	Change 2024-06-10 07:19 to 2024-06-10 07:25
188436222	2024-06-10 07:19	inventory	Network port	Delete an item: Network port (site-SW-01 - Po1 (1740521))
188436221	2024-06-10 07:19	inventory	Network port	Delete an item: Network port (site-SW-01 - Vl599 (1740512))
188436219	2024-06-10 07:19	inventory	Network port	Delete an item: Network port (site-SW-01 - VLAN-599 (1740511))
188436218	2024-06-10 07:19	inventory	Network port	Delete an item: Network port (site-SW-01 - VLAN-440 (1740510))
188436217	2024-06-10 07:19	inventory	Network port	Delete an item: Network port (site-SW-01 - VLAN-421 (1740509))

Page URL

No response

Steps To reproduce

Simply create an SNMP scan with glpi-netinventory, then scan

Your GLPI setup information

GLPI is filling my logs (up to 30 GB) with this

2024-06-06 15:04:07] glpiphplog.WARNING: *** PHP User Warning (512): Wired non unique! in /usr/share/glpi/src/NetworkPort_NetworkPort.php at line 273
Backtrace :
src/NetworkPort_NetworkPort.php:273 trigger_error()
src/CommonDBTM.php:1297 NetworkPort_NetworkPort->prepareInputForAdd()
src/NetworkPort_NetworkPort.php:172 CommonDBTM->add()
src/Inventory/Asset/NetworkPort.php:892 NetworkPort_NetworkPort->connectToHub()
src/Inventory/Asset/NetworkPort.php:369 Glpi\Inventory\Asset\NetworkPort->handleHub()
src/Inventory/Asset/NetworkPort.php:611 Glpi\Inventory\Asset\NetworkPort->handleMacConnection()
src/Inventory/Asset/NetworkPort.php:633 Glpi\Inventory\Asset\NetworkPort->handleConnections()
src/Inventory/Asset/NetworkPort.php:623 Glpi\Inventory\Asset\NetworkPort->portChanged()
src/Inventory/Asset/InventoryNetworkPort.php:519 Glpi\Inventory\Asset\NetworkPort->portUpdated()
src/Inventory/Asset/InventoryNetworkPort.php:121 Glpi\Inventory\Asset\NetworkPort->handleUpdates()
src/Inventory/Asset/NetworkPort.php:835 Glpi\Inventory\Asset\NetworkPort->handlePortsTrait()
src/Inventory/Asset/NetworkPort.php:618 Glpi\Inventory\Asset\NetworkPort->handlePorts()
src/Inventory/Asset/MainAsset.php:1001 Glpi\Inventory\Asset\NetworkPort->handle()
src/Inventory/Asset/MainAsset.php:916 Glpi\Inventory\Asset\MainAsset->handleAssets()
src/Inventory/Asset/NetworkEquipment.php:231 Glpi\Inventory\Asset\MainAsset->rulepassed()
src/RuleImportAsset.php:981 Glpi\Inventory\Asset\NetworkEquipment->rulepassed()
src/Rule.php:1531 RuleImportAsset->executeActions()
src/RuleCollection.php:1660 Rule->process()
src/Inventory/Asset/MainAsset.php:582 RuleCollection->processAllRules()
src/Inventory/Inventory.php:724 Glpi\Inventory\Asset\MainAsset->handle()
src/Inventory/Inventory.php:355 Glpi\Inventory\Inventory->handleItem()
...inc/communicationnetworkinventory.class.php:170 Glpi\Inventory\Inventory->doInventory()
marketplace/glpiinventory/hook.php:1088 PluginGlpiinventoryCommunicationNetworkInventory->import()
src/Plugin.php:1730 plugin_glpiinventory_network_inventory()
src/Inventory/Request.php:280 Plugin::doHookFunction()
src/Inventory/Request.php:252 Glpi\Inventory\Request->network()
src/Inventory/Request.php:98 Glpi\Inventory\Request->networkInventory()
src/Agent/Communication/AbstractRequest.php:332 Glpi\Inventory\Request->handleAction()
src/Agent/Communication/AbstractRequest.php:269 Glpi\Agent\Communication\AbstractRequest->handleXMLRequest()
front/inventory.php:95 Glpi\Agent\Communication\AbstractRequest->handleRequest()
...tplace/glpiinventory/front/communication.php:72 include_once()
marketplace/glpiinventory/index.php:45 include_once()

Anything else?

It worked perfectly some time ago, but I did not check back network devices often.

I tried:

  • Delete all network assets
  • flush networkport table
  • reset rules
    The only common point in my situation is my firewall is wire connected on the 3 nodes of my switch (port 1/1 on switch a-b-c for exemple)

Using either SNMPv3 or SNMP v2c, same behavior

@trasher
Copy link
Contributor

trasher commented Jun 11, 2024

Plese provide XML/JSON inventory file we can use to reproduce.

@steph461
Copy link

steph461 commented Jun 11, 2024

@hello bacus99

i have bug similary Stack 2 or 3 or 4 or 5

Try this command :

  1. glpi-netdiscovery.bat --host YourIP --credentials version:3,username:yourname,authprotocol:SHA,authpassword:XXXXXX,privprotocol:AES128,privpassword:XXXXXXX -i -s c:\folder
    image

  2. delete the stack and purge, its very important

  3. Import only in the c:\folder\netinventory\yourip.xml

  4. import
    image

  5. Normally it's ok

  6. perform an update, you lose the information
    I lose the information on all my stacks

I have this bug for 10.0.3

example :

before
image

if i udpate ( after): ko
image

@bacus99
Copy link
Author

bacus99 commented Jun 11, 2024

OK, I tried your way.
image

Seems importing says OK, but only 1 port discovered

when I export my xml from GLPI, i can see all the config and ports... Something is blocking. Logs are empty

Waiting for security to approve cleaned xml

@bacus99
Copy link
Author

bacus99 commented Jun 11, 2024

networkequipment_4_4977 1.txt
Here's the XML

@trasher
Copy link
Contributor

trasher commented Jun 12, 2024

I cannot see your original issue with provided XML. With this one, there is only one network equipment imported; with one port in it.

Plus on random frequency, glpi-netinventory snmp update flush all my ports (And sometime change the name of the switch 0 (ex: Site-SW-01 to Site-SW-01 - 2)

This looks like a rule issue.

@steph461 please provide inventory file to reproduce.

@bacus99
Copy link
Author

bacus99 commented Jun 12, 2024

So you are right, it's not the common point. I reset the rules, still add/remove the ports and don't see 2 switches. Just found in my file that we DON'T see the second serial number switch like I can see in Orion
image

I'll do more tests, but it makes sense it will not create the second switch... Now why

@bacus99
Copy link
Author

bacus99 commented Jun 12, 2024

@steph461 not 100% sure if related, but I have 2 sites OK

My faulty switches: Cisco IOS Software [Fuji], Catalyst L3 Switch Software (CAT9K_LITE_IOSXE), Version 16.9.4
My good switches: Cisco IOS Software [Bengaluru], Catalyst L3 Switch Software (CAT9K_LITE_IOSXE), Version 17.6.5

What is the version of your switches?

@steph461
Copy link

steph461 commented Jun 13, 2024

@steph461 not 100% sure if related, but I have 2 sites OK

My faulty switches: Cisco IOS Software [Fuji], Catalyst L3 Switch Software (CAT9K_LITE_IOSXE), Version 16.9.4 My good switches: Cisco IOS Software [Bengaluru], Catalyst L3 Switch Software (CAT9K_LITE_IOSXE), Version 17.6.5

What is the version of your switches?

Aruba 2930F VSF VC, revision WC.16.10.0009,

other example :
i have stack*5 If i update my stack, its ko . I must to delete stack *5 and I create the good XML folder netinventory
image

@steph461
Copy link

steph461 commented Jun 13, 2024

When you have test, you took the files in the folder in this folder ?
image

@trasher
Copy link
Contributor

trasher commented Jun 14, 2024

My faulty switches: Cisco IOS Software [Fuji], Catalyst L3 Switch Software (CAT9K_LITE_IOSXE), Version 16.9.4 My good switches: Cisco IOS Software [Bengaluru], Catalyst L3 Switch Software (CAT9K_LITE_IOSXE), Version 17.6.5

That looks like an issue on switch support on agent side. Please open a discussion on agent repository.

@bacus99
Copy link
Author

bacus99 commented Jun 18, 2024

OK based on my tests, agent 1.9 installed on Linux

glpi-netdiscovery --first 172.16.10.1 --last 172.16.10.254 --credentials version:2c,community:community1 --credentials version:2c,community:community2 --credentials version:2c,community:public --credentials 'version:3,username:snmp-glpi,authprotocol:SHA,authpassword:aaaa,privprotocol:AES,privpassword:ssss' --debug --control --backend-collect-timeout 30 --timeout 5 --retries 1 --threads 10000 -i -s /tmp

glpi-injector --no-ssl-check -v --recursive --directory /tmp/netinventory -u https://glpi.mycompany/glpi/marketplace/glpiinventory/

Import all switches with stacks

From GLPI inventory interface, stack are single switch and delete ports after few passes

Copy link
Contributor

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue.
If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

@github-actions github-actions bot added the Stale label Aug 18, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants