I applied the configuration for the check and the output it gave me in the web was as follows
(No output on stdout) stderr: Traceback (most recent call last):
File "/usr/local/nagios/libexec/cisco_ucs_nagios", line 25, in <module>
from UcsSdk import *
ImportError: No module named UcsSdk
But as the nagios user it works fine on the command line.
Command line vs gui commands
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
I wonder if this package isn't in a path that allows python to find it when running without the full environment
Can you run
Can you run
Code: Select all
locate UcsSdkRe: Command line vs gui commands
How can I fix it?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
what is the output?scottwilkerson wrote: Can you runCode: Select all
locate UcsSdk
Re: Command line vs gui commands
I was able to resolve this by adding scl enable python27 to the command.
scl enable python27 "$USER1$/cisco_ucs_nagios -H
scl enable python27 "$USER1$/cisco_ucs_nagios -H
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command line vs gui commands
Great! Glad it is resolved1emartine wrote:I was able to resolve this by adding scl enable python27 to the command.
scl enable python27 "$USER1$/cisco_ucs_nagios -H
Locking thread