Check_redfish plugin in ubuntu

Hi, I have trying to install and configure check_redfish plugin with icinga. My icinga backend runs on an ubuntu machine. I followed the GitHub - 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..

The plugin got installed, but when I tried check_redfish.py, I always got, check_redfish.py: command not found.

If someone has worked with it on ubuntu. Can someone please help me here.

Thanks.

Thanks for posting.

Could you please show how exactly you have installed the check command?

Afterwards, when is the “command not found”? If you type check_redfish.py in a command line?

I just created a new Python venv, cloned the git repo there and installed the dependencies, as documented. Now I am able to execute the Python script from the current directory, but it is not present in my PATH.

To be precise:

$ cd $(mktemp -d)
$ python -m venv .
$ . bin/activate
(tmp.LE7fz66XfG) $ git clone https://github.com/bb-Ricardo/check_redfish.git
[ . . . ]
(tmp.LE7fz66XfG) $ cd check_redfish
(tmp.LE7fz66XfG) $ pip install -r requirements.txt
[ . . . ]
(tmp.LE7fz66XfG) $ ./check_redfish.py --help
usage: check_redfish.py [-H HOST] [-u USERNAME] [-p PASSWORD] [-f AUTHFILE] [--sessionfile SESSIONFILE] [--sessionfiledir SESSIONFILEDIR] [--sessionlock] [--nosession] [-h]
                        [-w WARNING] [-c CRITICAL] [-v] [-d] [-m MAX] [-r RETRIES] [-t TIMEOUT] [--log_exclude LOG_EXCLUDE] [--ignore_missing_ps] [--enable_bmc_security_warning]
                        [--storage] [--proc] [--memory] [--power] [--temp] [--fan] [--nic] [--bmc] [--info] [--firmware] [--sel] [--mel] [--all] [-i] [--inventory_id INVENTORY_ID]
                        [--inventory_name INVENTORY_NAME] [--inventory_file INVENTORY_FILE]

This is 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.

[ . . . ]

# Of course, you can also invoke this command with a full path.
/tmp/nix-shell-41660-0/tmp.LE7fz66XfG/check_redfish
(tmp.LE7fz66XfG) $ version/tmp/nix-shell-41660-0/tmp.LE7fz66XfG/check_redfish
(tmp.LE7fz66XfG) $ /tmp/nix-shell-41660-0/tmp.LE7fz66XfG/check_redfish/check_redfish.py --help
usage: check_redfish.py [-H HOST] [-u USERNAME] [-p PASSWORD] [-f AUTHFILE] [--sessionfile SESSIONFILE] [--sessionfiledir SESSIONFILEDIR] [--sessionlock] [--nosession] [-h]
                        [-w WARNING] [-c CRITICAL] [-v] [-d] [-m MAX] [-r RETRIES] [-t TIMEOUT] [--log_exclude LOG_EXCLUDE] [--ignore_missing_ps] [--enable_bmc_security_warning]
                        [--storage] [--proc] [--memory] [--power] [--temp] [--fan] [--nic] [--bmc] [--info] [--firmware] [--sel] [--mel] [--all] [-i] [--inventory_id INVENTORY_ID]
                        [--inventory_name INVENTORY_NAME] [--inventory_file INVENTORY_FILE]
[ . . .]

Thus, you should be able to invoke the script by its full path. If you have followed the project’s README, /usr/lib64/nagios/plugins/check_redfish/check_redfish.py could work.

As an alternative installation path, you could also use the Netways Package Repository which ships a lot of Monitoring Plugins include check_redfish.