bb-Ricardo / check_redfish

A monitoring/inventory plugin to check components and health status of systems which support Redfish. It will also create a inventory of all components of a system.
MIT License
113 stars 34 forks source link

ALREADY IN INVENTORY message in --nic #109

Closed lgmu closed 1 year ago

lgmu commented 1 year ago

Discussed in https://github.com/bb-Ricardo/check_redfish/discussions/107

Originally posted by **lgmu** March 10, 2023 Hi, I have a quick question regarding this: https://github.com/bb-Ricardo/check_redfish/blob/main/cr_module/nic.py#L141 A customer of us uses the --nic mode on a Dell Inc. PowerEdge C6420 We get the following output: ALREADY in INVENTORY: NIC.Mezzanine.3-1 ALREADY in INVENTORY: NIC.Mezzanine.3-1 ALREADY in INVENTORY: NIC.Mezzanine.3-1 ALREADY in INVENTORY: NIC.Mezzanine.3-2 ALREADY in INVENTORY: NIC.Mezzanine.3-2 ALREADY in INVENTORY: NIC.Mezzanine.3-2 [OK]: All network adapter (3) and ports (5) are in good condition Is the "ALREADY in INVENTORY" really neccessary on stdout? Maybe it could only be printed in verbose. Or is this something they can avoid by configuring the device itself in a different way?
bb-Ricardo commented 1 year ago

Hi, this means that these items are not added to the inventory as they use same ID for the same subsystem. Of course this message can be omitted but then you would never know this is data missing in the inventory.

lgmu commented 1 year ago

Thanks for your feedback, I'll ask them to check their configuration

SirScruffy commented 1 year ago

Hi,

we use check_redfish very intensive to inventory our servers, since the update to version 1.5.0 we have a similar problem with the generated JSONs on some servers. The beginning of the '--inventory --all' response starts with 'ALREADY in INVENTORY: NIC.Integrated.1' which is not valid JSON syntax and leads to problems with subsequent parsing attempts. It would be annoying if the JSON processing fails on servers that have a 4 port NIC.

Thanks for the great tool.

Many greetings, Scruffy

bb-Ricardo commented 1 year ago

Hi, I think this is caused by this change: https://github.com/bb-Ricardo/check_redfish/commit/c39bf410f3d8ad65393cddb6b33029373cd124b2

would you be able to provide me with an MockUp of the server so I could test and fix the issue?

SirScruffy commented 1 year ago

Hi, thanks for the quick reply! I can send you an anonymized mockup of the server. Where should I send it to?

bb-Ricardo commented 1 year ago

That would be amazing. You can find my mail address in the upper part of check_redish.py

Thank you

SirScruffy commented 1 year ago

Hi, is there anything new on the problem?

Cheers, Scruffy

bb-Ricardo commented 1 year ago

Hi, currently not. There is alot going on at the moment.

Maybe I find some time tonight.

bb-Ricardo commented 1 year ago

Hey @SirScruffy,

I just pushed a commit to next-release branch-. can you check if this works better now?

Thank you

SirScruffy commented 1 year ago

Hi @bb-Ricardo,

I just tested it and the JSON looks fine. Thank you for very much.

Cheers, Scruffy