Command line vs gui commands

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Command line vs gui commands

Post by emartine »

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Command line vs gui commands

Post by scottwilkerson »

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

Code: Select all

locate UcsSdk
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Command line vs gui commands

Post by emartine »

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

Post by scottwilkerson »

scottwilkerson wrote: Can you run

Code: Select all

locate UcsSdk
what is the output?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Command line vs gui commands

Post by emartine »

I was able to resolve this by adding scl enable python27 to the command.

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

Post by scottwilkerson »

emartine wrote:I was able to resolve this by adding scl enable python27 to the command.

scl enable python27 "$USER1$/cisco_ucs_nagios -H
Great! Glad it is resolved1

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked