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

UNKNOWN]: No 'systems' property found in root path '/redfish/v1' for CIMC #148

Open
XWippie opened this issue Jan 10, 2025 · 12 comments
Open
Labels
awaiting reply waiting for a reply, close issue after 14 days of no response

Comments

@XWippie
Copy link

XWippie commented Jan 10, 2025

Hi,

First of all, best wishes for 2025
I am experiencing an issue with the check_redfish plugin when attempting to retrieve storage, memory, and processor information from my Cisco Integrated Management Controller (CIMC). The plugin consistently returns an UNKNOWN error with the following messages:
[UNKNOWN]: No 'systems' property found in root path '/redfish/v1'
or
[UNKNOWN]: Request error: No 'systems' property found in root path '/redfish/v1'

I've tried:

  • Different versions of the check_redfish plugin
  • Adjusted file permissions and session files
  • Running the command with root (which does works)
[nagios@xxx check_redfish-1.9.0]$  python3 ./check_redfish.py -H x.x.x.x -u ... -p ... --storage
[UNKNOWN]: No 'systems' property found in root path '/redfish/v1'

[root@xxx check_redfish-1.9.0]# python3 ./check_redfish.py -H x.x.x.x -u ... -p ... --storage
[OK]: All storage controllers (1), logical drives (1) and physical drives (2) are in good condition.

Any tips or suggestions to fix this would be awesome. If you need more info, just let me know.

@bb-Ricardo
Copy link
Owner

Hi,

there must be still some old cached session files for the user nagios. Just delete them from the temp directory and then it should work again.

@XWippie
Copy link
Author

XWippie commented Jan 13, 2025

Hi,

Is there a way to avoid manually deleting old cached files? It's really annoying to have to do this repeatedly.

@bb-Ricardo
Copy link
Owner

Hi,

This happens repeatedly? Very unusual. But you can try the --nosession option.

@XWippie
Copy link
Author

XWippie commented Jan 14, 2025

Hi,

I will try this thursday and keep you up-to-date.

@bb-Ricardo bb-Ricardo added the awaiting reply waiting for a reply, close issue after 14 days of no response label Jan 16, 2025
@XWippie
Copy link
Author

XWippie commented Jan 23, 2025

Hi,

The --nosession doesn't see to be working

[nagios@xxx check_redfish]$ python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --storage
[OK]: All storage controllers ...
[nagios@xxx check_redfish]$ python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --storage --nosession
[CRITICAL]: Unable to connect to Host 'x.x.x.x': HTTP 400: Failed to created the session
The session establishment failed due to the number of simultaneous sessions exceeding the limit of the implementation.
[nagios@xxx check_redfish]$ python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --storage --nosession
Traceback (most recent call last):
  File "check_redfish.py", line 178, in <module>
    plugin.do_exit()
  File "/usr/lib64/nagios/plugins/check_redfish/cr_module/classes/plugin.py", line 379, in do_exit
    self.rf.terminate_session()
  File "/usr/lib64/nagios/plugins/check_redfish/cr_module/classes/redfish.py", line 359, in terminate_session
    self.connection.logout()
  File "/usr/local/lib/python3.6/site-packages/redfish/rest/v1.py", line 1033, in logout
    "return code: %d" % (session_loc, resp.status))
redfish.rest.v1.BadRequestError: Invalid session resource: /redfish/v1/SessionService/Sessions/15, return code: 403

@bb-Ricardo
Copy link
Owner

Where does this message come from?

The session establishment failed due to the number of simultaneous sessions exceeding the limit of the implementation.

@XWippie
Copy link
Author

XWippie commented Jan 23, 2025

This is the return if I use this command
python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --storage --nosession

@bb-Ricardo
Copy link
Owner

Hi,

this happens if too many checks are running at the same time on the same machine. Also if other tools are connected to the CIMC.

The plugin stores the session in a session file to avoid exhausting the maximum amount of concurrent session on the CIMC. And on every start it checks if there is a session file for that particular IP address and reuses it. If not, then it creates a new one.

The option --nosession does NOT create a session file. I logs in, creates a session, reads all the information and logs out. The logout should delete the session on the CIMC. Could possibly be that even after logout the session is not deleted and filling up the session pool.

That leaves you only with the option to find out what the original cause of the issue might be and why the data can't be read from the session file.

if you run the plugin first with root then it will create a session file which belongs to the root user. And if you then continue to run it with nagios then the user maybe is able to read the file but able to do anything else possibly causing the error.

Otherwise I'm out of ideas. sorry

@XWippie
Copy link
Author

XWippie commented Jan 24, 2025

Hi,

I was just checking the permissions and I saw this

-rw-------   1 nagios  nagois 5042 Jan 24 08:55 check_redfish_......session

The permissions have change and don't seem to be haven execution permission while I gave the file chmod 700 last week.

@bb-Ricardo
Copy link
Owner

the 600 file permissions are fine, it does not need and can't be executed. You need to make sure that all files belong to th moniroting user.

@XWippie
Copy link
Author

XWippie commented Jan 24, 2025

Ok, I tried the --nosession but it just doesn't work while all the files are from nagios
things I tried:

[nagios@xxx check_redfish]$ python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --storage
[OK]: All storage controllers (1), volumes (1) and disk drives (2) are in good condition

[nagios@xxx check_redfish]$ ls -la /tmp/ | grep session
-rw-------   1 nagios nagios           5580 Jan 24 10:06 check_redfish_....session

[nagios@xxx check_redfish]$ python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --sessionfile sessions/temp_session --storage
[OK]: All storage controllers (1), volumes (1) and disk drives (2) are in good condition

[nagios@xxx check_redfish]$ ls -la /tmp/sessions/
-rw-------  1 nagios nagios     5580 Jan 24 10:09 temp_session.session

[nagios@xxx check_redfish]$ python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --nosession --storage
Traceback (most recent call last):
  File "check_redfish.py", line 178, in <module>
    plugin.do_exit()
  File "/usr/lib64/nagios/plugins/check_redfish/cr_module/classes/plugin.py", line 379, in do_exit
    self.rf.terminate_session()
  File "/usr/lib64/nagios/plugins/check_redfish/cr_module/classes/redfish.py", line 359, in terminate_session
    self.connection.logout()
  File "/usr/local/lib/python3.6/site-packages/redfish/rest/v1.py", line 1033, in logout
    "return code: %d" % (session_loc, resp.status))
redfish.rest.v1.BadRequestError: Invalid session resource: /redfish/v1/SessionService/Sessions/29971, return code: 403

[nagios@xxx check_redfish]$ ls -la /tmp/ | grep session
-rw-------   1 nagios nagios           5580 Jan 24 10:06 check_redfish_.....session
drwxrwx---   2 nagios nagios         6 Jan 24 10:17 sessions


[nagios@xxx check_redfish]$ python3 check_redfish.py -H x.x.x.x -u '...' -p '...' --sessionfile sessions/temp_session --nosession --storage
Traceback (most recent call last):
  File "check_redfish.py", line 178, in <module>
    plugin.do_exit()
  File "/usr/lib64/nagios/plugins/check_redfish/cr_module/classes/plugin.py", line 379, in do_exit
    self.rf.terminate_session()
  File "/usr/lib64/nagios/plugins/check_redfish/cr_module/classes/redfish.py", line 359, in terminate_session
    self.connection.logout()
  File "/usr/local/lib/python3.6/site-packages/redfish/rest/v1.py", line 1033, in logout
    "return code: %d" % (session_loc, resp.status))
redfish.rest.v1.BadRequestError: Invalid session resource: /redfish/v1/SessionService/Sessions/29972, return code: 403

[nagios@xxx check_redfish]$ ls -la /tmp/sessions/ | grep session

@bb-Ricardo
Copy link
Owner

Yes, there seems to be a big when the attemped logout fails. Will fix that. But otherwise it seems to work when you use it with a session file.

Will look into the issue with logout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply waiting for a reply, close issue after 14 days of no response
Projects
None yet
Development

No branches or pull requests

2 participants